radv: update the check to determine if rasterization is enabled
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 2 Jun 2022 08:57:16 +0000 (10:57 +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 a06fda7..0ff0cba 100644 (file)
@@ -1354,7 +1354,8 @@ radv_pipeline_needed_dynamic_state(const struct radv_graphics_pipeline *pipeline
                                    const struct radv_graphics_pipeline_info *info)
 {
    bool has_color_att = radv_pipeline_has_color_attachments(&info->ri);
-   bool raster_enabled = radv_is_raster_enabled(pipeline, pCreateInfo);
+   bool raster_enabled = !info->rs.discard_enable ||
+                         (pipeline->dynamic_states & RADV_DYNAMIC_RASTERIZER_DISCARD_ENABLE);
    uint64_t states = RADV_DYNAMIC_ALL;
 
    /* Disable dynamic states that are useless to mesh shading. */