From 5cd75418105aeeb1a616534eed1968024e7601cc Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Wed, 11 Jan 2023 16:49:10 +0800 Subject: [PATCH] rebase upstream/master --- wgpu-types/src/lib.rs | 2 +- wgpu/examples/stencil-triangles/main.rs | 1 + wgpu/src/lib.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index c1961303315..04f02dc9d54 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -4401,7 +4401,7 @@ impl TextureDescriptor { /// dimension: wgpu::TextureDimension::D3, /// format: wgpu::TextureFormat::Rgba8Sint, /// usage: wgpu::TextureUsages::empty(), - /// view_formats: &[] + /// view_formats: vec![] /// }; /// /// assert_eq!(desc.mip_level_size(0), Some(wgpu::Extent3d { width: 100, height: 60, depth_or_array_layers: 1 })); diff --git a/wgpu/examples/stencil-triangles/main.rs b/wgpu/examples/stencil-triangles/main.rs index 1de2ae8eb9f..87c8ae143af 100644 --- a/wgpu/examples/stencil-triangles/main.rs +++ b/wgpu/examples/stencil-triangles/main.rs @@ -153,6 +153,7 @@ impl framework::Example for Triangles { sample_count: 1, dimension: wgpu::TextureDimension::D2, format: wgpu::TextureFormat::Stencil8, + view_formats: &[], usage: wgpu::TextureUsages::RENDER_ATTACHMENT, }); diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 66069a41ef5..c10bb9d2b33 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -2075,6 +2075,7 @@ impl Device { owned: true, descriptor: TextureDescriptor { label: None, + view_formats: &[], ..desc.clone() }, } @@ -2111,6 +2112,7 @@ impl Device { owned: true, descriptor: TextureDescriptor { label: None, + view_formats: &[], ..desc.clone() }, } @@ -4108,6 +4110,7 @@ impl Surface { mip_level_count: 1, sample_count: 1, dimension: TextureDimension::D2, + view_formats: &[], }; texture_id