Skip to content

Commit

Permalink
ignore ready_only as it relates to texture uses if the flag is not pr…
Browse files Browse the repository at this point in the history
…esent
  • Loading branch information
teoxoy committed Aug 11, 2023
1 parent f88fd54 commit b85f58b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,15 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {
}
}

if at.depth.read_only || at.stencil.read_only {
device.require_downlevel_flags(wgt::DownlevelFlags::READ_ONLY_DEPTH_STENCIL)?;
}

(is_depth_read_only, is_stencil_read_only) = at.depth_stencil_read_only(ds_aspects)?;

let usage = if is_depth_read_only && is_stencil_read_only {
let usage = if is_depth_read_only
&& is_stencil_read_only
&& device
.downlevel
.flags
.contains(wgt::DownlevelFlags::READ_ONLY_DEPTH_STENCIL)
{
hal::TextureUses::DEPTH_STENCIL_READ | hal::TextureUses::RESOURCE
} else {
hal::TextureUses::DEPTH_STENCIL_WRITE
Expand Down

0 comments on commit b85f58b

Please sign in to comment.