intel/decoder: Bump the binding table guess value to 32

Let's bump the binding table value guess to 32 instead of 8 and also stop
decoding the binding table entries as soon as we hit the zero
initialized value in the map.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22221>
This commit is contained in:
Sagar Ghuge 2023-03-30 10:18:21 -07:00 committed by Marge Bot
parent 4d2c8bf859
commit a064e8ff29

View file

@ -314,7 +314,7 @@ dump_binding_table(struct intel_batch_decode_ctx *ctx,
if (count < 0) {
count = update_count(ctx, bt_pool_base + offset,
bt_pool_base, 1, 8);
bt_pool_base, 1, 32);
}
if (offset % btp_alignment != 0 || offset >= (1u << btp_pointer_bits)) {
@ -332,8 +332,9 @@ dump_binding_table(struct intel_batch_decode_ctx *ctx,
const uint32_t *pointers = bind_bo.map;
for (int i = 0; i < count; i++) {
if (pointers[i] == 0)
continue;
if (((uintptr_t)&pointers[i] >= ((uintptr_t)bind_bo.map + bind_bo.size)) ||
pointers[i] == 0)
break;
uint64_t addr = ctx->surface_base + pointers[i];
struct intel_batch_decode_bo bo = ctx_get_bo(ctx, true, addr);