freedreno/decode: Fix bindless descriptor dumping

We shouldn't be trying to calculate an offset from the bindless base reg
we looked up, as it already contains the array index.

We could lookup the index 0 reg offset, and calculate an offset from
there, but that breaks when the registers are not consecutive.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
This commit is contained in:
Rob Clark
2025-10-29 13:18:10 -07:00
committed by Marge Bot
parent f64e4a6d3e
commit c026a8f105
+5 -10
View File
@@ -1620,25 +1620,20 @@ dump_bindless_descriptors(bool is_compute, int level)
} else {
sprintf(reg_name, "SP_GFX_BINDLESS_BASE[%u].DESCRIPTOR", i);
}
const unsigned base_reg = regbase(reg_name);
if (!base_reg)
const unsigned reg = regbase(reg_name);
if (!reg)
break;
printl(2, "%sset[%u]:\n", levels[level + 1], i);
if (!reg_written(reg))
continue;
uint64_t ext_src_addr;
if (is_64b()) {
const unsigned reg = base_reg + i * 2;
if (!reg_written(reg))
continue;
ext_src_addr = reg_val(reg) & 0xfffffffc;
ext_src_addr |= ((uint64_t)reg_val(reg + 1)) << 32;
} else {
const unsigned reg = base_reg + i;
if (!reg_written(reg))
continue;
ext_src_addr = reg_val(reg) & 0xfffffffc;
}