blorp: replace magic '2' with BLORP_NUM_BT_ENTRIES

If we ever add more entries, things won't explode.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39046>
This commit is contained in:
Paulo Zanoni 2025-11-18 17:29:25 -08:00 committed by Marge Bot
parent 814cfa909d
commit c98f5e9994

View file

@ -1322,8 +1322,8 @@ blorp_setup_binding_table(struct blorp_batch *batch,
const struct blorp_params *params)
{
const struct isl_device *isl_dev = batch->blorp->isl_dev;
uint32_t surface_offsets[2], bind_offset = 0;
void *surface_maps[2];
uint32_t surface_offsets[BLORP_NUM_BT_ENTRIES], bind_offset = 0;
void *surface_maps[BLORP_NUM_BT_ENTRIES];
if (params->use_pre_baked_binding_table) {
bind_offset = params->pre_baked_binding_table_offset;