Mesa (main): panfrost: Fix full_threads calculation on v6

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 13 12:45:26 UTC 2021


Module: Mesa
Branch: main
Commit: c689a1dcb3f099a3a6848389151c62ac952cd818
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c689a1dcb3f099a3a6848389151c62ac952cd818

Author: Icecream95 <ixn at disroot.org>
Date:   Tue Jul 13 18:29:13 2021 +1200

panfrost: Fix full_threads calculation on v6

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c
index 2ff9dfd28fb..74c8c015d0b 100644
--- a/src/panfrost/lib/pan_blitter.c
+++ b/src/panfrost/lib/pan_blitter.c
@@ -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,



More information about the mesa-commit mailing list