Skip to content

Commit

Permalink
pin wgpu and spirv-std, reconcile glam dep
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Jan 11, 2025
1 parent a0f1746 commit 858eab2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions crates/renderling/src/atlas/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,14 @@ impl StagedResources {

// write the new image from the CPU to the new texture
runtime.queue.write_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &new_texture_array.texture,
mip_level: 0,
origin,
aspect: wgpu::TextureAspect::All,
},
&bytes,
wgpu::TexelCopyBufferLayout {
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(4 * size_px.x),
rows_per_image: Some(size_px.y),
Expand All @@ -551,7 +551,7 @@ impl StagedResources {
// copy the frame from the old texture to the new texture
// in a new destination
encoder.copy_texture_to_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &old_texture_array.texture,
mip_level: 0,
origin: wgpu::Origin3d {
Expand All @@ -561,7 +561,7 @@ impl StagedResources {
},
aspect: wgpu::TextureAspect::All,
},
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &new_texture_array.texture,
mip_level: 0,
origin: wgpu::Origin3d {
Expand Down
6 changes: 3 additions & 3 deletions crates/renderling/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn new_instance(backends: Option<wgpu::Backends>) -> wgpu::Instance {
);
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let backends = backends.unwrap_or(wgpu::Backends::PRIMARY);
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends,
..Default::default()
});
Expand Down Expand Up @@ -338,9 +338,9 @@ impl Frame {
// Copy the data from the surface texture to the buffer
encoder.copy_texture_to_buffer(
texture.as_image_copy(),
wgpu::TexelCopyBufferInfo {
wgpu::ImageCopyBuffer {
buffer: &buffer,
layout: wgpu::TexelCopyBufferLayout {
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(dimensions.padded_bytes_per_row as u32),
rows_per_image: None,
Expand Down
4 changes: 2 additions & 2 deletions crates/renderling/src/stage/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,13 @@ impl Stage {
});
let bloom_mix_texture = self.bloom.get_mix_texture();
encoder.copy_texture_to_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &self.hdr_texture.read().unwrap().texture,
mip_level: 0,
origin: wgpu::Origin3d { x: 0, y: 0, z: 0 },
aspect: wgpu::TextureAspect::All,
},
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &bloom_mix_texture.texture,
mip_level: 0,
origin: wgpu::Origin3d { x: 0, y: 0, z: 0 },
Expand Down
20 changes: 10 additions & 10 deletions crates/renderling/src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ impl Texture {
let index = i * mip_levels as usize + mip_level;
let texture = &face_textures[index].texture;
encoder.copy_texture_to_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &cubemap_texture,
mip_level: mip_level as u32,
origin: wgpu::Origin3d {
Expand Down Expand Up @@ -195,14 +195,14 @@ impl Texture {

if !data.is_empty() {
queue.write_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
data,
wgpu::TexelCopyBufferLayout {
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(color_channels * color_channel_bytes * width),
rows_per_image: None,
Expand Down Expand Up @@ -331,14 +331,14 @@ impl Texture {
});

queue.write_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
img.as_bytes(),
wgpu::TexelCopyBufferLayout {
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(channels * dimensions.0),
rows_per_image: Some(dimensions.1),
Expand Down Expand Up @@ -393,14 +393,14 @@ impl Texture {
});

runtime.queue.write_texture(
wgpu::TexelCopyTextureInfo {
wgpu::ImageCopyTexture {
texture: &texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
img.deref(),
wgpu::TexelCopyBufferLayout {
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(P::CHANNEL_COUNT as u32 * dimensions.0),
rows_per_image: Some(dimensions.1),
Expand Down Expand Up @@ -558,9 +558,9 @@ impl Texture {
// Copy the data from the surface texture to the buffer
encoder.copy_texture_to_buffer(
source,
wgpu::TexelCopyBufferInfo {
wgpu::ImageCopyBuffer {
buffer: &buffer,
layout: wgpu::TexelCopyBufferLayout {
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(dimensions.padded_bytes_per_row as u32),
rows_per_image: None,
Expand Down

0 comments on commit 858eab2

Please sign in to comment.