radeonsi: fix templated si_draw_rectangle callback for Navi14
authorMarek Olšák <marek.olsak@amd.com>
Fri, 18 Aug 2023 16:05:58 +0000 (12:05 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 19 Aug 2023 19:36:56 +0000 (19:36 +0000)
Navi14 is the only gfx10 chip that doesn't enable NGG.

Fixes: cd7e20f51388 ("radeonsi: specialize si_draw_rectangle using a C++ template")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24759>

src/gallium/drivers/radeonsi/si_state_draw.cpp

index 3f9d1ef..656b658 100644 (file)
@@ -2450,7 +2450,7 @@ static void si_init_draw_vbo_all_pipeline_options(struct si_context *sctx)
     */
    if (GFX_VERSION >= GFX11 && sctx->screen->info.has_set_pairs_packets)
       sctx->blitter->draw_rectangle = si_draw_rectangle<GFX_VERSION, NGG_ON, HAS_PAIRS_ON>;
-   else if (GFX_VERSION >= GFX10 && !(sctx->screen->debug_flags & DBG(NO_NGG)))
+   else if (GFX_VERSION >= GFX10 && sctx->screen->use_ngg)
       sctx->blitter->draw_rectangle = si_draw_rectangle<GFX_VERSION, NGG_ON, HAS_PAIRS_OFF>;
    else
       sctx->blitter->draw_rectangle = si_draw_rectangle<GFX_VERSION, NGG_OFF, HAS_PAIRS_OFF>;