radv: fix indirect dispatches on compute queue with conditional rendering on GFX7
COND_EXEC needs to happen right before PKT3_DISPATCH_INDIRECT.
Like this combination will probably never happen but better to have
it fixed anyways.
Fixes: 5c03cdbd02a ("radv: fix indirect dispatches on the compute queue on GFX7")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27655>
(cherry picked from commit 9ae8f0f9d7444cd54d817bb2bfff59b8fd6e543f)
This commit is contained in:
parent
21090c8d3e
commit
76bb6e7f8e
2 changed files with 8 additions and 4 deletions
|
|
@ -1564,7 +1564,7 @@
|
||||||
"description": "radv: fix indirect dispatches on compute queue with conditional rendering on GFX7",
|
"description": "radv: fix indirect dispatches on compute queue with conditional rendering on GFX7",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "5c03cdbd02a69884ce759e0cbd0cf76dc212e2d3",
|
"because_sha": "5c03cdbd02a69884ce759e0cbd0cf76dc212e2d3",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -9665,12 +9665,16 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, const struct radv
|
||||||
|
|
||||||
if (radv_cmd_buffer_uses_mec(cmd_buffer)) {
|
if (radv_cmd_buffer_uses_mec(cmd_buffer)) {
|
||||||
uint64_t indirect_va = info->va;
|
uint64_t indirect_va = info->va;
|
||||||
|
const bool needs_align32_workaround =
|
||||||
|
cmd_buffer->device->physical_device->rad_info.has_async_compute_align32_bug &&
|
||||||
|
cmd_buffer->qf == RADV_QUEUE_COMPUTE && !radv_is_aligned(indirect_va, 32);
|
||||||
|
const unsigned ace_predication_size =
|
||||||
|
4 /* DISPATCH_INDIRECT */ + (needs_align32_workaround ? 6 * 3 /* 3x COPY_DATA */ : 0);
|
||||||
|
|
||||||
radv_cs_emit_compute_predication(&cmd_buffer->state, cs, cmd_buffer->mec_inv_pred_va,
|
radv_cs_emit_compute_predication(&cmd_buffer->state, cs, cmd_buffer->mec_inv_pred_va,
|
||||||
&cmd_buffer->mec_inv_pred_emitted, 4 /* DISPATCH_INDIRECT size */);
|
&cmd_buffer->mec_inv_pred_emitted, ace_predication_size);
|
||||||
|
|
||||||
if (cmd_buffer->device->physical_device->rad_info.has_async_compute_align32_bug &&
|
if (needs_align32_workaround) {
|
||||||
cmd_buffer->qf == RADV_QUEUE_COMPUTE && !radv_is_aligned(indirect_va, 32)) {
|
|
||||||
const uint64_t unaligned_va = indirect_va;
|
const uint64_t unaligned_va = indirect_va;
|
||||||
UNUSED void *ptr;
|
UNUSED void *ptr;
|
||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue