Commit 345cb856 by Tobin Ehlis Committed by Commit Bot

Vulkan:Clamp stencil ref value

We were casting stencil ref value instead of clamping it as the spec requires. Fixing that which allows a number of new dEQP tests to pass. Bug: angleproject:3244 Bug: angleproject:3245 Bug: angleproject:3247 Bug: angleproject:3248 Change-Id: I59242d59982b990e82395f5a1e77b9a54254dc2b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1541751 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent 8116d646
...@@ -698,7 +698,7 @@ void State::setStencilTest(bool enabled) ...@@ -698,7 +698,7 @@ void State::setStencilTest(bool enabled)
void State::setStencilParams(GLenum stencilFunc, GLint stencilRef, GLuint stencilMask) void State::setStencilParams(GLenum stencilFunc, GLint stencilRef, GLuint stencilMask)
{ {
mDepthStencil.stencilFunc = stencilFunc; mDepthStencil.stencilFunc = stencilFunc;
mStencilRef = (stencilRef > 0) ? stencilRef : 0; mStencilRef = gl::clamp(stencilRef, 0, std::numeric_limits<uint8_t>::max());
mDepthStencil.stencilMask = stencilMask; mDepthStencil.stencilMask = stencilMask;
mDirtyBits.set(DIRTY_BIT_STENCIL_FUNCS_FRONT); mDirtyBits.set(DIRTY_BIT_STENCIL_FUNCS_FRONT);
} }
...@@ -708,7 +708,7 @@ void State::setStencilBackParams(GLenum stencilBackFunc, ...@@ -708,7 +708,7 @@ void State::setStencilBackParams(GLenum stencilBackFunc,
GLuint stencilBackMask) GLuint stencilBackMask)
{ {
mDepthStencil.stencilBackFunc = stencilBackFunc; mDepthStencil.stencilBackFunc = stencilBackFunc;
mStencilBackRef = (stencilBackRef > 0) ? stencilBackRef : 0; mStencilBackRef = gl::clamp(stencilBackRef, 0, std::numeric_limits<uint8_t>::max());
mDepthStencil.stencilBackMask = stencilBackMask; mDepthStencil.stencilBackMask = stencilBackMask;
mDirtyBits.set(DIRTY_BIT_STENCIL_FUNCS_BACK); mDirtyBits.set(DIRTY_BIT_STENCIL_FUNCS_BACK);
} }
......
...@@ -287,30 +287,6 @@ ...@@ -287,30 +287,6 @@
3254 VULKAN NVIDIA : dEQP-GLES2.functional.clipping.point.point_clip_viewport_center = FAIL 3254 VULKAN NVIDIA : dEQP-GLES2.functional.clipping.point.point_clip_viewport_center = FAIL
3254 VULKAN NVIDIA : dEQP-GLES2.functional.clipping.point.point_clip_viewport_corner = FAIL 3254 VULKAN NVIDIA : dEQP-GLES2.functional.clipping.point.point_clip_viewport_corner = FAIL
// Fragment ops failures
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.stencil_fail_replace = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.depth_fail_replace = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.depth_pass_replace = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.incr_wrap_stencil_fail = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.zero_stencil_fail = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.invert_stencil_fail = FAIL
3244 VULKAN : dEQP-GLES2.functional.fragment_ops.stencil.cmp_not_equal = FAIL
3245 VULKAN : dEQP-GLES2.functional.fragment_ops.depth_stencil.random.11 = FAIL
3245 VULKAN : dEQP-GLES2.functional.fragment_ops.depth_stencil.random.20 = FAIL
3245 VULKAN : dEQP-GLES2.functional.fragment_ops.depth_stencil.random.24 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.2 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.19 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.48 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.67 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.74 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.84 = FAIL
3247 VULKAN : dEQP-GLES2.functional.fragment_ops.random.91 = FAIL
3248 VULKAN : dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.46 = FAIL
3248 VULKAN : dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.70 = FAIL
3248 VULKAN : dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.71 = FAIL
3248 VULKAN : dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.85 = FAIL
3248 VULKAN : dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.97 = FAIL
// Completeness failures // Completeness failures
3239 VULKAN : dEQP-GLES2.functional.texture.completeness.2d.npot_size = FAIL 3239 VULKAN : dEQP-GLES2.functional.texture.completeness.2d.npot_size = FAIL
3239 VULKAN : dEQP-GLES2.functional.texture.completeness.2d.npot_size_level_1 = FAIL 3239 VULKAN : dEQP-GLES2.functional.texture.completeness.2d.npot_size_level_1 = FAIL
......
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