panfrost: Generalize pan_blitter's reg count assert

Needed to avoid crashing on Bifrost/Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733>
This commit is contained in:
Alyssa Rosenzweig 2021-06-24 11:55:27 -04:00 committed by Marge Bot
parent 8ac4156d19
commit 4a79bbdb38

View file

@ -417,7 +417,8 @@ pan_blitter_get_blend_shaders(struct panfrost_device *dev,
nir_type_float32, /* unused */
i);
assert(b->work_reg_count <= 4);
ASSERTED unsigned full_threads = (dev->arch < 7) ? 4 : 32;
assert(b->work_reg_count <= full_threads);
struct panfrost_ptr bin =
pan_pool_alloc_aligned(dev->blitter.shaders.pool,
b->binary.size,