Skip to content

Commit 171a176

Browse files
committed
Correct STORAGE_READ_ONLY exclusivity (#8490)
Fixes #8485
1 parent ccc650f commit 171a176

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ By @SupaMaggie70Incorporated in [#8206](https://github.com/gfx-rs/wgpu/pull/8206
138138
- Removed three features from `wgpu-hal` which did nothing useful: `"cargo-clippy"`, `"gpu-allocator"`, and `"rustc-hash"`. By @kpreid in [#8357](https://github.com/gfx-rs/wgpu/pull/8357).
139139
- `wgpu_types::PollError` now always implements the `Error` trait. By @kpreid in [#8384](https://github.com/gfx-rs/wgpu/pull/8384).
140140
- The texture subresources used by the color attachments of a render pass are no longer allowed to overlap when accessed via different texture views. By @andyleiserson in [#8402](https://github.com/gfx-rs/wgpu/pull/8402).
141+
- The `STORAGE_READ_ONLY` texture usage is now permitted to coexist with other read-only usages. By @andyleiserson in [#8490](https://github.com/gfx-rs/wgpu/pull/8490).
141142
- Fixed a bug where the texture aspect was not passed through when calling `copy_texture_to_buffer` in WebGPU, causing the copy to fail for depth/stencil textures. By @Tim-Evans-Seequent in [#8445](https://github.com/gfx-rs/wgpu/pull/8445).
142143

143144
#### DX12

cts_runner/test.lst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depth
126126
webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,*
127127
webgpu:api,validation,render_pass,resolve:resolve_attachment:*
128128
webgpu:api,validation,resource_usages,buffer,in_pass_encoder:*
129-
// FAIL: 8 other cases in resource_usages,texture,in_pass_encoder. https://github.com/gfx-rs/wgpu/issues/3126
129+
// FAIL: 2 other cases in resource_usages,texture,in_pass_encoder. https://github.com/gfx-rs/wgpu/issues/3126
130130
webgpu:api,validation,resource_usages,texture,in_pass_encoder:scope,*
131131
webgpu:api,validation,resource_usages,texture,in_pass_encoder:shader_stages_and_visibility,*
132132
webgpu:api,validation,resource_usages,texture,in_pass_encoder:subresources_and_binding_types_combination_for_aspect:*
133133
webgpu:api,validation,resource_usages,texture,in_pass_encoder:subresources_and_binding_types_combination_for_color:compute=false;type0="render-target";type1="render-target"
134134
webgpu:api,validation,resource_usages,texture,in_pass_encoder:unused_bindings_in_pipeline:*
135+
webgpu:api,validation,resource_usages,texture,in_render_common:subresources,multiple_bind_groups:bg0Levels={"base":0,"count":1};*
135136
webgpu:api,validation,texture,rg11b10ufloat_renderable:*
136137
webgpu:api,operation,render_pipeline,overrides:*
137138
webgpu:api,operation,rendering,basic:clear:*

wgpu-types/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5721,10 +5721,10 @@ bitflags::bitflags! {
57215721
const TRANSIENT = 1 << 12;
57225722
/// The combination of states that a texture may be in _at the same time_.
57235723
/// cbindgen:ignore
5724-
const INCLUSIVE = Self::COPY_SRC.bits() | Self::RESOURCE.bits() | Self::DEPTH_STENCIL_READ.bits();
5724+
const INCLUSIVE = Self::COPY_SRC.bits() | Self::RESOURCE.bits() | Self::DEPTH_STENCIL_READ.bits() | Self::STORAGE_READ_ONLY.bits();
57255725
/// The combination of states that a texture must exclusively be in.
57265726
/// cbindgen:ignore
5727-
const EXCLUSIVE = Self::COPY_DST.bits() | Self::COLOR_TARGET.bits() | Self::DEPTH_STENCIL_WRITE.bits() | Self::STORAGE_READ_ONLY.bits() | Self::STORAGE_WRITE_ONLY.bits() | Self::STORAGE_READ_WRITE.bits() | Self::STORAGE_ATOMIC.bits() | Self::PRESENT.bits();
5727+
const EXCLUSIVE = Self::COPY_DST.bits() | Self::COLOR_TARGET.bits() | Self::DEPTH_STENCIL_WRITE.bits() | Self::STORAGE_WRITE_ONLY.bits() | Self::STORAGE_READ_WRITE.bits() | Self::STORAGE_ATOMIC.bits() | Self::PRESENT.bits();
57285728
/// The combination of all usages that the are guaranteed to be be ordered by the hardware.
57295729
/// If a usage is ordered, then if the texture state doesn't change between draw calls, there
57305730
/// are no barriers needed for synchronization.

0 commit comments

Comments
 (0)