mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] Update wgpu for texture descriptor changes
This commit is contained in:
@@ -26,17 +26,20 @@ vulkan = ["wgn/vulkan-portability"]
|
||||
[dependencies.wgn]
|
||||
package = "wgpu-native"
|
||||
version = "0.5"
|
||||
#git = "https://github.com/gfx-rs/wgpu"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
|
||||
|
||||
[dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
version = "0.5"
|
||||
#git = "https://github.com/gfx-rs/wgpu"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
version = "0.5"
|
||||
#git = "https://github.com/gfx-rs/wgpu"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.5"
|
||||
|
||||
@@ -43,7 +43,6 @@ async fn run() {
|
||||
// The render pipeline renders data into this texture
|
||||
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||
size: texture_extent,
|
||||
array_layer_count: 1,
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
|
||||
@@ -167,7 +167,6 @@ impl framework::Example for Example {
|
||||
};
|
||||
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||
size: texture_extent,
|
||||
array_layer_count: 1,
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
|
||||
@@ -258,7 +258,6 @@ impl framework::Example for Example {
|
||||
};
|
||||
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||
size: texture_extent,
|
||||
array_layer_count: 1,
|
||||
mip_level_count,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
|
||||
@@ -95,7 +95,6 @@ impl Example {
|
||||
};
|
||||
let multisampled_frame_descriptor = &wgpu::TextureDescriptor {
|
||||
size: multisampled_texture_extent,
|
||||
array_layer_count: 1,
|
||||
mip_level_count: 1,
|
||||
sample_count: sample_count,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
|
||||
@@ -176,7 +176,7 @@ impl Example {
|
||||
const SHADOW_SIZE: wgpu::Extent3d = wgpu::Extent3d {
|
||||
width: 512,
|
||||
height: 512,
|
||||
depth: 1,
|
||||
depth: Self::MAX_LIGHTS as u32,
|
||||
};
|
||||
const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth32Float;
|
||||
|
||||
@@ -341,7 +341,6 @@ impl framework::Example for Example {
|
||||
|
||||
let shadow_texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||
size: Self::SHADOW_SIZE,
|
||||
array_layer_count: Self::MAX_LIGHTS as u32,
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
@@ -635,7 +634,6 @@ impl framework::Example for Example {
|
||||
height: sc_desc.height,
|
||||
depth: 1,
|
||||
},
|
||||
array_layer_count: 1,
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
@@ -683,7 +681,6 @@ impl framework::Example for Example {
|
||||
height: sc_desc.height,
|
||||
depth: 1,
|
||||
},
|
||||
array_layer_count: 1,
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
|
||||
@@ -180,15 +180,12 @@ impl framework::Example for Skybox {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let texture_extent = wgpu::Extent3d {
|
||||
width: image_width,
|
||||
height: image_height,
|
||||
depth: 1,
|
||||
};
|
||||
|
||||
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||
size: texture_extent,
|
||||
array_layer_count: 6,
|
||||
size: wgpu::Extent3d {
|
||||
width: image_width,
|
||||
height: image_height,
|
||||
depth: 6,
|
||||
},
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
@@ -219,7 +216,11 @@ impl framework::Example for Skybox {
|
||||
array_layer: i as u32,
|
||||
origin: wgpu::Origin3d::ZERO,
|
||||
},
|
||||
texture_extent,
|
||||
wgpu::Extent3d {
|
||||
width: image_width,
|
||||
height: image_height,
|
||||
depth: 1,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -442,9 +442,6 @@ pub struct TextureDescriptor<'a> {
|
||||
/// The size of the texture.
|
||||
pub size: Extent3d,
|
||||
|
||||
/// The array layer count.
|
||||
pub array_layer_count: u32,
|
||||
|
||||
/// The mip level count.
|
||||
pub mip_level_count: u32,
|
||||
|
||||
@@ -942,7 +939,6 @@ impl Device {
|
||||
&wgt::TextureDescriptor {
|
||||
label: owned_label.as_ptr(),
|
||||
size: desc.size,
|
||||
array_layer_count: desc.array_layer_count,
|
||||
mip_level_count: desc.mip_level_count,
|
||||
sample_count: desc.sample_count,
|
||||
dimension: desc.dimension,
|
||||
|
||||
Reference in New Issue
Block a user