Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ By @cwfitzgerald in [#8388](https://github.com/gfx-rs/wgpu/pull/8388).
- In the MSL backend, `subgroupBallot` now keeps lanes 32-63, which were lost on GPUs with 64-wide SIMD groups (AMD GPUs on macOS). By @ErkoRisthein in [#10797](https://github.com/gfx-rs/wgpu/pull/10797).
- Report a WGSL error instead of panicking when the condition of a `const_assert` is a composite value, such as `const_assert(vec2i());`. By @MilosLord in [#10897](https://github.com/gfx-rs/wgpu/pull/10897).
- Fix WGSL `continuing` blocks falsely rejecting declarations that shadow variables from the loop body (e.g., `loop { let x = a; continuing { let x = b; } }`) as redefinitions. By @ekarad1um in [#10980](https://github.com/gfx-rs/wgpu/pull/10980).
- Stop marking multisampled depth textures as depth images in SPIR-V (the `Depth` operand of `OpTypeImage`). Arm's proprietary Mali driver (seen with `r20p0` on a Mali-G52) failed to create any pipeline whose shader declares a `texture_depth_multisampled_2d`. By @matthargett in [#XXXXX](https://github.com/gfx-rs/wgpu/pull/XXXXX).

#### Validation

Expand Down
16 changes: 15 additions & 1 deletion naga/src/back/spv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,21 @@ impl LocalImageType {
width: 4,
},
dim,
flags: make_flags(multi, ImageTypeFlags::DEPTH | ImageTypeFlags::SAMPLED),
// Vulkan ignores the `Depth` operand of `OpTypeImage`, and a
// multisampled image cannot be used with a comparison sampler
// anyway. Arm's Mali driver (seen on a Mali-G52, driver
// r20p0) fails pipeline creation with
// `VK_ERROR_INITIALIZATION_FAILED` for any shader that
// declares a multisampled image with `Depth` set to 1, so
// leave it at 0 for those.
flags: make_flags(
multi,
if multi {
ImageTypeFlags::SAMPLED
} else {
ImageTypeFlags::DEPTH | ImageTypeFlags::SAMPLED
},
),
image_format: spirv::ImageFormat::Unknown,
},
crate::ImageClass::Storage { format, access: _ } => LocalImageType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OpDecorate %89 Location 0
%7 = OpTypeVector %6 2
%8 = OpTypeImage %5 2D 1 1 0 1 Unknown
%9 = OpTypeInt 32 0
%10 = OpTypeImage %5 2D 1 0 1 1 Unknown
%10 = OpTypeImage %5 2D 0 0 1 1 Unknown
%11 = OpTypeVector %5 4
%13 = OpTypePointer UniformConstant %4
%12 = OpVariable %13 UniformConstant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OpDecorate %100 Location 0
%7 = OpTypeVector %6 2
%8 = OpTypeImage %5 2D 1 1 0 1 Unknown
%9 = OpTypeInt 32 0
%10 = OpTypeImage %5 2D 1 0 1 1 Unknown
%10 = OpTypeImage %5 2D 0 0 1 1 Unknown
%11 = OpTypeVector %5 4
%13 = OpTypePointer UniformConstant %4
%12 = OpVariable %13 UniformConstant
Expand Down
Loading
Loading