Per the spec: If VkPipelineRasterizationStateCreateInfo::depthClampEnable is enabled, before the sample’s zf is compared to za, zf is clamped to [min(n,f),max(n,f)], where n and f are the minDepth and maxDepth depth range values of the viewport used by this fragment, respectively. So when we read oDepth back from a shader that sets fragDepth, it should only be clamped when depth clamping is enabled, and it should be clamped to the viewport depth clamp values, not [0, 1]. Bug: b/184063472 Change-Id: I92e99b80f3929b8b8030f41f6a3afbfebda4e737 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54408Reviewed-by:Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Commit-Queue: Sean Risser <srisser@google.com> Tested-by:
Sean Risser <srisser@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| BUILD.gn | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| ComputeProgram.cpp | Loading commit data... | |
| ComputeProgram.hpp | Loading commit data... | |
| Constants.cpp | Loading commit data... | |
| Constants.hpp | Loading commit data... | |
| PixelProgram.cpp | Loading commit data... | |
| PixelProgram.hpp | Loading commit data... | |
| PixelRoutine.cpp | Loading commit data... | |
| PixelRoutine.hpp | Loading commit data... | |
| SamplerCore.cpp | Loading commit data... | |
| SamplerCore.hpp | Loading commit data... | |
| SetupRoutine.cpp | Loading commit data... | |
| SetupRoutine.hpp | Loading commit data... | |
| ShaderCore.cpp | Loading commit data... | |
| ShaderCore.hpp | Loading commit data... | |
| SpirvID.hpp | Loading commit data... | |
| SpirvShader.cpp | Loading commit data... | |
| SpirvShader.hpp | Loading commit data... | |
| SpirvShaderArithmetic.cpp | Loading commit data... | |
| SpirvShaderControlFlow.cpp | Loading commit data... | |
| SpirvShaderDebug.hpp | Loading commit data... | |
| SpirvShaderDebugger.cpp | Loading commit data... | |
| SpirvShaderGLSLstd450.cpp | Loading commit data... | |
| SpirvShaderGroup.cpp | Loading commit data... | |
| SpirvShaderImage.cpp | Loading commit data... | |
| SpirvShaderInstructions.cpp | Loading commit data... | |
| SpirvShaderInstructions.inl | Loading commit data... | |
| SpirvShaderMemory.cpp | Loading commit data... | |
| SpirvShaderSampling.cpp | Loading commit data... | |
| SpirvShaderSpec.cpp | Loading commit data... | |
| VertexProgram.cpp | Loading commit data... | |
| VertexProgram.hpp | Loading commit data... | |
| VertexRoutine.cpp | Loading commit data... | |
| VertexRoutine.hpp | Loading commit data... |