Switch pipeline flag to mutation of depth/stencil

This commit is contained in:
Dzmitry Malyshau committed 2020-07-23 22:24:21 -04:00
1 parent da34c918d3
commit 33d6eff6c9
3 files changed
+5 -7

No files matched your search

+2 -4
View File
@@ -1083,10 +1083,8 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
if !context.compatible(&pipeline.pass_context) {
return Err(RenderCommandError::IncompatiblePipeline.into());
}
if pipeline
.flags
.contains(PipelineFlags::DEPTH_STENCIL_READ_ONLY)
&& !is_ds_read_only
if pipeline.flags.contains(PipelineFlags::WRITES_DEPTH_STENCIL)
&& is_ds_read_only
{
return Err(RenderCommandError::IncompatibleReadOnlyDepthStencil.into());
}
+2 -2
View File
@@ -2396,8 +2396,8 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
if ds.needs_stencil_reference() {
flags |= pipeline::PipelineFlags::STENCIL_REFERENCE;
}
if ds.is_read_only() {
flags |= pipeline::PipelineFlags::DEPTH_STENCIL_READ_ONLY;
if !ds.is_read_only() {
flags |= pipeline::PipelineFlags::WRITES_DEPTH_STENCIL;
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ bitflags::bitflags! {
pub struct PipelineFlags: u32 {
const BLEND_COLOR = 1;
const STENCIL_REFERENCE = 2;
const DEPTH_STENCIL_READ_ONLY = 4;
const WRITES_DEPTH_STENCIL = 4;
}
}