Mesa (main): radv: update the check to determine if rasterization is enabled

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 13 17:09:28 UTC 2022


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jun  2 10:57:16 2022 +0200

radv: update the check to determine if rasterization is enabled

Use radv_graphics_pipeline_info instead of pCreateInfo.

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

---

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

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index a06fda726d8..0ff0cbaf2ac 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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. */



More information about the mesa-commit mailing list