radv: update the check to determine if dynamic discard rectangle is needed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 2 Jun 2022 08:43:05 +0000 (10:43 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 13 Jun 2022 16:46:32 +0000 (16:46 +0000)
Use radv_graphics_pipeline_info instead of pCreateInfo.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16958>

src/amd/vulkan/radv_pipeline.c

index a129cc3..380ed45 100644 (file)
@@ -1390,7 +1390,7 @@ radv_pipeline_needed_dynamic_state(const struct radv_graphics_pipeline *pipeline
       states &= ~(RADV_DYNAMIC_STENCIL_COMPARE_MASK | RADV_DYNAMIC_STENCIL_WRITE_MASK |
                   RADV_DYNAMIC_STENCIL_REFERENCE | RADV_DYNAMIC_STENCIL_OP);
 
-   if (!vk_find_struct_const(pCreateInfo->pNext, PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT))
+   if (!info->dr.count)
       states &= ~RADV_DYNAMIC_DISCARD_RECTANGLE;
 
    if (!pCreateInfo->pMultisampleState ||