tu/a7xx: Emit HLSQ_CS_LAST_LOCAL_SIZE dynamically

We'll need this to implement unaligned dispatches.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
This commit is contained in:
Connor Abbott
2024-03-13 08:27:35 -04:00
committed by Marge Bot
parent 92f043465d
commit 1bee1a9301
2 changed files with 7 additions and 5 deletions
+7
View File
@@ -6768,6 +6768,13 @@ tu_dispatch(struct tu_cmd_buffer *cmd,
HLSQ_CS_NDRANGE_5(CHIP, .globalsize_z = local_size[2] * num_groups[2]),
HLSQ_CS_NDRANGE_6(CHIP, .globaloff_z = 0));
if (CHIP >= A7XX) {
tu_cs_emit_regs(cs,
A7XX_HLSQ_CS_LAST_LOCAL_SIZE(.localsizex = local_size[0] - 1,
.localsizey = local_size[1] - 1,
.localsizez = local_size[2] - 1));
}
if (info->indirect) {
uint64_t iova = info->indirect->iova + info->indirect_offset;
-5
View File
@@ -1552,11 +1552,6 @@ tu6_emit_cs_config(struct tu_cs *cs,
WORKITEMRASTORDER_LINEAR :
WORKITEMRASTORDER_TILED, ));
tu_cs_emit_regs(
cs, A7XX_HLSQ_CS_LAST_LOCAL_SIZE(.localsizex = v->local_size[0] - 1,
.localsizey = v->local_size[1] - 1,
.localsizez = v->local_size[2] - 1, ));
tu_cs_emit_regs(cs, A7XX_SP_CS_UNKNOWN_A9BE(0)); // Sometimes is 0x08000000
}
}