Allow unrestricted depth bounds

SwiftShader exposes VK_EXT_depth_range_unrestricted which allows depth values outside [0, 1]. depthBoundsTest code asserted on values outside that range and were causing test failures. Bug: b/181655689 Tests: dEQP-VK.pipeline.depth_range_unrestricted.* Change-Id: Iae9103b802672960f2f0f67710f75165780f1368 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54110Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Commit-Queue: Sean Risser <srisser@google.com> Tested-by: 's avatarSean Risser <srisser@google.com>
parent 08762e3c
...@@ -630,11 +630,6 @@ const GraphicsState GraphicsState::combineStates(const DynamicState &dynamicStat ...@@ -630,11 +630,6 @@ const GraphicsState GraphicsState::combineStates(const DynamicState &dynamicStat
if(hasDynamicState(VK_DYNAMIC_STATE_DEPTH_BOUNDS) && depthBoundsTestEnable) if(hasDynamicState(VK_DYNAMIC_STATE_DEPTH_BOUNDS) && depthBoundsTestEnable)
{ {
// Unless the VK_EXT_depth_range_unrestricted extension is enabled,
// minDepthBounds and maxDepthBounds must be between 0.0 and 1.0, inclusive
ASSERT(dynamicState.minDepthBounds >= 0.0f && dynamicState.minDepthBounds <= 1.0f);
ASSERT(dynamicState.maxDepthBounds >= 0.0f && dynamicState.maxDepthBounds <= 1.0f);
combinedState.minDepthBounds = dynamicState.minDepthBounds; combinedState.minDepthBounds = dynamicState.minDepthBounds;
combinedState.maxDepthBounds = dynamicState.maxDepthBounds; combinedState.maxDepthBounds = dynamicState.maxDepthBounds;
} }
......
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