diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 3a08662a..814eefea 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -78,16 +78,12 @@ impl Pipeline { ], }); - let uniforms = Uniforms { - transform: Transformation::identity().into(), - }; - - let uniforms_buffer = - device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: uniforms.as_bytes(), - usage: wgpu::BufferUsage::UNIFORM | wgpu::BufferUsage::COPY_DST, - }); + let uniforms_buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: None, + size: mem::size_of::() as u64, + usage: wgpu::BufferUsage::UNIFORM | wgpu::BufferUsage::COPY_DST, + mapped_at_creation: false, + }); let constant_bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs index a115fa73..0c54db15 100644 --- a/wgpu/src/quad.rs +++ b/wgpu/src/quad.rs @@ -34,12 +34,12 @@ impl Pipeline { }], }); - let constants_buffer = - device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: Uniforms::default().as_bytes(), - usage: wgpu::BufferUsage::UNIFORM | wgpu::BufferUsage::COPY_DST, - }); + let constants_buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: None, + size: mem::size_of::() as u64, + usage: wgpu::BufferUsage::UNIFORM | wgpu::BufferUsage::COPY_DST, + mapped_at_creation: false, + }); let constants = device.create_bind_group(&wgpu::BindGroupDescriptor { label: None,