Commit 51045556 by Nicolas Capens Committed by Nicolas Capens

Clarify DepthGreater/Less/Unchanged execution modes are unused

These SPIR-V execution modes can be used to optimize early depth test, but are currently ignored, which is fine from a correctness point of view. We need to handle these execution modes because they can appear in any shader, without the implementation having to support using them for optimizations. Also, we can keep the SpirvShader::Modes fields that correspond to them for debugging purposes (e.g. an application might incorrectly rely on early depth test optimization to happen). Bug: b/177915067 Change-Id: I851fdfbcdde5be6287bc4ee689fdbd6549e2900f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51908 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 4d22b2c3
...@@ -936,12 +936,15 @@ void SpirvShader::ProcessExecutionMode(InsnIterator insn) ...@@ -936,12 +936,15 @@ void SpirvShader::ProcessExecutionMode(InsnIterator insn)
modes.DepthReplacing = true; modes.DepthReplacing = true;
break; break;
case spv::ExecutionModeDepthGreater: case spv::ExecutionModeDepthGreater:
// TODO(b/177915067): Can be used to optimize depth test, currently unused.
modes.DepthGreater = true; modes.DepthGreater = true;
break; break;
case spv::ExecutionModeDepthLess: case spv::ExecutionModeDepthLess:
// TODO(b/177915067): Can be used to optimize depth test, currently unused.
modes.DepthLess = true; modes.DepthLess = true;
break; break;
case spv::ExecutionModeDepthUnchanged: case spv::ExecutionModeDepthUnchanged:
// TODO(b/177915067): Can be used to optimize depth test, currently unused.
modes.DepthUnchanged = true; modes.DepthUnchanged = true;
break; break;
case spv::ExecutionModeLocalSize: case spv::ExecutionModeLocalSize:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment