Skip to content

Commit

Permalink
radeonsi: don't use SET_SH_REG_INDEX on gfx7-9
Browse files Browse the repository at this point in the history
It was accidentally used with geometry shaders. It might have caused hangs.

Fixes: ccaaf8f - amd: massively simplify how info->spi_cu_en is applied

Reviewed-by: Qiang Yu <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22833>
(cherry picked from commit d98501f)
  • Loading branch information
Marek Olšák authored and 1ace committed Jun 7, 2023
1 parent 4224ef0 commit 8c92afe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pick_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@
"description": "radeonsi: don't use SET_SH_REG_INDEX on gfx7-9",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ccaaf8fe04c956d9f16f98b7f7fa69a2526283bc"
},
Expand Down
9 changes: 7 additions & 2 deletions src/gallium/drivers/radeonsi/si_build_pm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,13 @@
#define radeon_set_sh_reg_idx3_seq(sctx, reg, num) do { \
SI_CHECK_SHADOWED_REGS(reg, num); \
assert((reg) >= SI_SH_REG_OFFSET && (reg) < SI_SH_REG_END); \
radeon_emit(PKT3(PKT3_SET_SH_REG_INDEX, num, 0)); \
radeon_emit((((reg) - SI_SH_REG_OFFSET) >> 2) | ((sctx)->gfx_level >= GFX10 ? 3 << 28 : 0)); \
if ((sctx)->gfx_level >= GFX10) { \
radeon_emit(PKT3(PKT3_SET_SH_REG_INDEX, num, 0)); \
radeon_emit((((reg) - SI_SH_REG_OFFSET) >> 2) | (3 << 28)); \
} else { \
radeon_emit(PKT3(PKT3_SET_SH_REG, num, 0)); \
radeon_emit(((reg) - SI_SH_REG_OFFSET) >> 2); \
} \
} while (0)

#define radeon_set_sh_reg(reg, value) do { \
Expand Down

0 comments on commit 8c92afe

Please sign in to comment.