Module: Mesa
Branch: staging/23.2
Commit: 5f9b2b3dde0218ea2bd9630e3f5d7817036b3dcd
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f9b2b3dde0218ea2bd9630e3f5d7817036b3dcd

Author: Marek Olšák <[email protected]>
Date:   Mon Sep 25 20:09:17 2023 -0400

radeonsi: fix compute-only contexts

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25390>
(cherry picked from commit b8ce0dcef5e529b40a2585b260ed8faa250c8dd4)

---

 .pick_status.json                         | 2 +-
 src/gallium/drivers/radeonsi/si_compute.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f5779415b93..a7fddd7888b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2974,7 +2974,7 @@
         "description": "radeonsi: fix compute-only contexts",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "315231b5a519bdc14b0ceaba0501e0c0b4067688",
         "notes": null
diff --git a/src/gallium/drivers/radeonsi/si_compute.c 
b/src/gallium/drivers/radeonsi/si_compute.c
index 2fb084c8f37..aa40c04ae5d 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -1003,8 +1003,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. */

Reply via email to