panfrost: Lower max compute size
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 7 Jun 2021 21:40:17 +0000 (17:40 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 18:06:10 +0000 (18:06 +0000)
Match the DDK's limit (Mali G52), I think there's undocumented errata
here. Fixes
KHR-GLES31.core.texture_buffer.texture_buffer_operations_image_store

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>

src/gallium/drivers/panfrost/pan_screen.c

index d0d5889..7ddccc3 100644 (file)
@@ -652,8 +652,11 @@ panfrost_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_t
        case PIPE_COMPUTE_CAP_MAX_GRID_SIZE:
                RET(((uint64_t []) { 65535, 65535, 65535 }));
 
-       case PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE:
-               RET(((uint64_t []) { 1024, 1024, 64 }));
+        case PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE:
+                /* Unpredictable behaviour at larger sizes. Mali-G52 advertises
+                 * 384x384x384. The smaller size is advertised by Mali-T628,
+                 * use min until we have a need to key by arch */
+               RET(((uint64_t []) { 256, 256, 256 }));
 
        case PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK:
                RET((uint64_t []) { 1024 });