panfrost: Fix full_threads calculation on v6
authorIcecream95 <ixn@disroot.org>
Tue, 13 Jul 2021 06:29:13 +0000 (18:29 +1200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Jul 2021 12:32:47 +0000 (12:32 +0000)
Fixes: 8ba2f9f6985 ("panfrost: Create a blitter library to replace the existing preload helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11842>

src/panfrost/lib/pan_blitter.c

index 2ff9dfd..74c8c01 100644 (file)
@@ -417,7 +417,8 @@ pan_blitter_get_blend_shaders(struct panfrost_device *dev,
                                         nir_type_float32, /* unused */
                                         i);
 
-                ASSERTED unsigned full_threads = (dev->arch < 7) ? 4 : 32;
+                ASSERTED unsigned full_threads =
+                        (dev->arch >= 7) ? 32 : ((dev->arch == 6) ? 64 : 4);
                 assert(b->work_reg_count <= full_threads);
                 struct panfrost_ptr bin =
                         pan_pool_alloc_aligned(dev->blitter.shaders.pool,