anv: Fix misplaced assertion in anv_scratch_pool_alloc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Fixes: ee42a489 ("anv: Fix scratch pool buffer allocation sizes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38861>
This commit is contained in:
Calder Young 2025-12-08 16:02:17 -08:00 committed by Marge Bot
parent 68bb5d9e49
commit 2fbc722dcf

View file

@ -1386,8 +1386,6 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
unsigned bucket = scratch_size_log2 - 11;
assert(bucket < 16);
assert(stage < ARRAY_SIZE(pool->bos[0]));
const struct intel_device_info *devinfo = device->info;
/* On GFX version 12.5, scratch access changed to a surface-based model.
@ -1398,6 +1396,7 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
if (devinfo->verx10 >= 125)
stage = MESA_SHADER_COMPUTE;
assert(stage < ARRAY_SIZE(pool->bos[0]));
struct anv_bo *bo = p_atomic_read(&pool->bos[bucket][stage]);
if (bo != NULL)