radeonsi: fix compute-only contexts
authorMarek Olšák <marek.olsak@amd.com>
Tue, 26 Sep 2023 00:09:17 +0000 (20:09 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Sep 2023 15:49:34 +0000 (15:49 +0000)
We can't skip redundant register updates on compute queues, at least
not all of them.

Fixes: 315231b5a519bdc14 - radeonsi: eliminate redundant compute SH register changes

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

src/gallium/drivers/radeonsi/si_compute.c

index d4d71a2..642acb7 100644 (file)
@@ -1000,8 +1000,8 @@ static void si_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info
    if (sctx->bo_list_add_all_compute_resources)
       si_compute_resources_add_all_to_bo_list(sctx);
 
-   /* Don't optimize any registers on certain CDNA chips, otherwise it would break. */
-   if (sctx->family >= CHIP_GFX940 && !sctx->screen->info.has_graphics)
+   /* Skipping setting redundant registers on compute queues breaks compute. */
+   if (!sctx->has_graphics)
       sctx->tracked_regs.other_reg_saved_mask = 0;
 
    /* First emit registers. */