From: Dave Airlie <airl...@redhat.com>

If we are clearing stencil only, we still need to provide a
a valid Z output from the vertex shader.

I'm not 100% sure if this is the super correct fix, but it
does fix:
dEQP-VK.renderpass.simple.stencil
since I added S8 support.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/amd/vulkan/radv_meta_clear.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 3e79cd8..2479989 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -672,6 +672,9 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,
                           VK_IMAGE_ASPECT_STENCIL_BIT));
        assert(pass_att != VK_ATTACHMENT_UNUSED);
 
+       if (!(aspects & VK_IMAGE_ASPECT_DEPTH_BIT))
+               clear_value.depth = 1.0f;
+
        const struct depthstencil_clear_vattrs vertex_data[3] = {
                {
                        .depth_clear = clear_value.depth,
-- 
2.9.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to