diff options
author | Dave Airlie <[email protected]> | 2017-05-02 15:29:28 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-10 11:26:17 +0100 |
commit | 9b808c5748ff162be8f3cf2958c7c5ecb5436b25 (patch) | |
tree | 6620fdea940c11d8243ffed6e3ae88b9dee14ba6 /src/amd | |
parent | 9105e36765baaf242836da95d2e44bdc3ef04233 (diff) |
radv: fix stencil only clears.
If we are clearing stencil only, we still need to provide a
a valid Z output from the vertex shader, we can't rely
on the depth clear value having any meaning, as we use this
for the position output, and it could get clipped, so we
don't end up clearing anything.
Fixes:
dEQP-VK.renderpass.simple.stencil
since I added S8 support.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 3c730639740f9b1243e95d06e6608cb54649be9a)
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_meta_clear.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index cbb90a4f280..a5502ce53f2 100644 --- a/src/amd/vulkan/radv_meta_clear.c +++ b/src/amd/vulkan/radv_meta_clear.c @@ -693,6 +693,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] = { { .position = { |