Skip to content

Commit 32cf9d2

Browse files
bors[bot]kvark
andauthored
[rs] Merge gfx-rs#256
256: Update wgpu for texture descriptor changes r=grovesNL a=kvark Updates for gfx-rs#577 Detaches us from crates-io dependency (again). Co-authored-by: Dzmitry Malyshau <[email protected]>
2 parents 18a80e7 + 4537304 commit 32cf9d2

File tree

8 files changed

+17
-24
lines changed

8 files changed

+17
-24
lines changed

wgpu/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,20 @@ vulkan = ["wgn/vulkan-portability"]
2626
[dependencies.wgn]
2727
package = "wgpu-native"
2828
version = "0.5"
29-
#git = "https://github.com/gfx-rs/wgpu"
29+
git = "https://github.com/gfx-rs/wgpu"
30+
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
3031

3132
[dependencies.wgc]
3233
package = "wgpu-core"
3334
version = "0.5"
34-
#git = "https://github.com/gfx-rs/wgpu"
35+
git = "https://github.com/gfx-rs/wgpu"
36+
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
3537

3638
[dependencies.wgt]
3739
package = "wgpu-types"
3840
version = "0.5"
39-
#git = "https://github.com/gfx-rs/wgpu"
41+
git = "https://github.com/gfx-rs/wgpu"
42+
rev = "49dbe08f37f8396cff0d6672667a48116ec487f5"
4043

4144
[dependencies]
4245
arrayvec = "0.5"

wgpu/examples/capture/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ async fn run() {
4343
// The render pipeline renders data into this texture
4444
let texture = device.create_texture(&wgpu::TextureDescriptor {
4545
size: texture_extent,
46-
array_layer_count: 1,
4746
mip_level_count: 1,
4847
sample_count: 1,
4948
dimension: wgpu::TextureDimension::D2,

wgpu/examples/cube/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ impl framework::Example for Example {
167167
};
168168
let texture = device.create_texture(&wgpu::TextureDescriptor {
169169
size: texture_extent,
170-
array_layer_count: 1,
171170
mip_level_count: 1,
172171
sample_count: 1,
173172
dimension: wgpu::TextureDimension::D2,

wgpu/examples/mipmap/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ impl framework::Example for Example {
258258
};
259259
let texture = device.create_texture(&wgpu::TextureDescriptor {
260260
size: texture_extent,
261-
array_layer_count: 1,
262261
mip_level_count,
263262
sample_count: 1,
264263
dimension: wgpu::TextureDimension::D2,

wgpu/examples/msaa-line/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ impl Example {
9595
};
9696
let multisampled_frame_descriptor = &wgpu::TextureDescriptor {
9797
size: multisampled_texture_extent,
98-
array_layer_count: 1,
9998
mip_level_count: 1,
10099
sample_count: sample_count,
101100
dimension: wgpu::TextureDimension::D2,

wgpu/examples/shadow/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl Example {
176176
const SHADOW_SIZE: wgpu::Extent3d = wgpu::Extent3d {
177177
width: 512,
178178
height: 512,
179-
depth: 1,
179+
depth: Self::MAX_LIGHTS as u32,
180180
};
181181
const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth32Float;
182182

@@ -341,7 +341,6 @@ impl framework::Example for Example {
341341

342342
let shadow_texture = device.create_texture(&wgpu::TextureDescriptor {
343343
size: Self::SHADOW_SIZE,
344-
array_layer_count: Self::MAX_LIGHTS as u32,
345344
mip_level_count: 1,
346345
sample_count: 1,
347346
dimension: wgpu::TextureDimension::D2,
@@ -635,7 +634,6 @@ impl framework::Example for Example {
635634
height: sc_desc.height,
636635
depth: 1,
637636
},
638-
array_layer_count: 1,
639637
mip_level_count: 1,
640638
sample_count: 1,
641639
dimension: wgpu::TextureDimension::D2,
@@ -683,7 +681,6 @@ impl framework::Example for Example {
683681
height: sc_desc.height,
684682
depth: 1,
685683
},
686-
array_layer_count: 1,
687684
mip_level_count: 1,
688685
sample_count: 1,
689686
dimension: wgpu::TextureDimension::D2,

wgpu/examples/skybox/main.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,12 @@ impl framework::Example for Skybox {
180180
})
181181
.collect::<Vec<_>>();
182182

183-
let texture_extent = wgpu::Extent3d {
184-
width: image_width,
185-
height: image_height,
186-
depth: 1,
187-
};
188-
189183
let texture = device.create_texture(&wgpu::TextureDescriptor {
190-
size: texture_extent,
191-
array_layer_count: 6,
184+
size: wgpu::Extent3d {
185+
width: image_width,
186+
height: image_height,
187+
depth: 6,
188+
},
192189
mip_level_count: 1,
193190
sample_count: 1,
194191
dimension: wgpu::TextureDimension::D2,
@@ -219,7 +216,11 @@ impl framework::Example for Skybox {
219216
array_layer: i as u32,
220217
origin: wgpu::Origin3d::ZERO,
221218
},
222-
texture_extent,
219+
wgpu::Extent3d {
220+
width: image_width,
221+
height: image_height,
222+
depth: 1,
223+
},
223224
);
224225
}
225226

wgpu/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,6 @@ pub struct TextureDescriptor<'a> {
442442
/// The size of the texture.
443443
pub size: Extent3d,
444444

445-
/// The array layer count.
446-
pub array_layer_count: u32,
447-
448445
/// The mip level count.
449446
pub mip_level_count: u32,
450447

@@ -942,7 +939,6 @@ impl Device {
942939
&wgt::TextureDescriptor {
943940
label: owned_label.as_ptr(),
944941
size: desc.size,
945-
array_layer_count: desc.array_layer_count,
946942
mip_level_count: desc.mip_level_count,
947943
sample_count: desc.sample_count,
948944
dimension: desc.dimension,

0 commit comments

Comments
 (0)