Mesa (staging/19.3): anv: Initialize depth_bounds_test_enable when not explicitly set

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 14 17:02:52 UTC 2019


Module: Mesa
Branch: staging/19.3
Commit: f393c9234544ea574ae42081e02271cf0e3588f8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f393c9234544ea574ae42081e02271cf0e3588f8

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Tue Nov 12 10:42:09 2019 -0800

anv: Initialize depth_bounds_test_enable when not explicitly set

This was causing uninitialized value to end up propagated to the
3DSTATE_DEPTH_BOUNDS packet, leading to asserts on packet
building due to the value being greater than 1.

Fixes: 939ddccb7a5 ("anv: Add support for depth bounds testing.")
Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>
(cherry picked from commit 0aaf47f7cd50b9c07c1297fe8daff1b2693a6729)

---

 src/intel/vulkan/genX_pipeline.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 97dd2009b7a..324a75feb44 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -1005,6 +1005,7 @@ emit_ds_state(struct anv_pipeline *pipeline,
       pipeline->stencil_test_enable = false;
       pipeline->writes_depth = false;
       pipeline->depth_test_enable = false;
+      pipeline->depth_bounds_test_enable = false;
       memset(depth_stencil_dw, 0, sizeof(depth_stencil_dw));
       return;
    }
@@ -1023,8 +1024,6 @@ emit_ds_state(struct anv_pipeline *pipeline,
    pipeline->depth_test_enable = info.depthTestEnable;
    pipeline->depth_bounds_test_enable = info.depthBoundsTestEnable;
 
-   /* VkBool32 depthBoundsTestEnable; // optional (depth_bounds_test) */
-
 #if GEN_GEN <= 7
    struct GENX(DEPTH_STENCIL_STATE) depth_stencil = {
 #else




More information about the mesa-commit mailing list