Mesa (main): radv: ignore DYNAMIC_STENCIL_OP if stencil test isn't enabled

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 07:58:17 UTC 2022


Module: Mesa
Branch: main
Commit: c869a5d5502ec4df2039e9376b9f4543fd935d68
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c869a5d5502ec4df2039e9376b9f4543fd935d68

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon May 30 22:23:01 2022 +0200

radv: ignore DYNAMIC_STENCIL_OP if stencil test isn't enabled

Like compare/write masks and reference.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16783>

---

 src/amd/vulkan/radv_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 0051a3e3d3f..d02e2e36c14 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1378,7 +1378,7 @@ radv_pipeline_needed_dynamic_state(const struct radv_graphics_pipeline *pipeline
    if (!info->ds.stencil_test_enable &&
        !(pipeline->dynamic_states & RADV_DYNAMIC_STENCIL_TEST_ENABLE))
       states &= ~(RADV_DYNAMIC_STENCIL_COMPARE_MASK | RADV_DYNAMIC_STENCIL_WRITE_MASK |
-                  RADV_DYNAMIC_STENCIL_REFERENCE);
+                  RADV_DYNAMIC_STENCIL_REFERENCE | RADV_DYNAMIC_STENCIL_OP);
 
    if (!vk_find_struct_const(pCreateInfo->pNext, PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT))
       states &= ~RADV_DYNAMIC_DISCARD_RECTANGLE;



More information about the mesa-commit mailing list