pan/mdg: Lower PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK on Midgard
The register file on Midgard is not large enough to sustain 256 threads in a threadgroup when all ISA-defined registers are used. As such, we want to advertise the smallest MAX_THREADS_PER_BLOCK permissible by the spec to avoid compiling shaders that will necessarily spill. The minimum-maximum in OpenGL ES 3.1 is 128, so set that on Midgard. 6 compute shaders LOST in shader-db due to exceeding this new limit. These shaders would fault if they were attempted to be executed. Cc: mesa-stable Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19092>
This commit is contained in:

committed by
Marge Bot

parent
5c95be85ab
commit
9b19104a30
@@ -692,7 +692,15 @@ panfrost_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_t
|
||||
RET(((uint64_t []) { 256, 256, 256 }));
|
||||
|
||||
case PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK:
|
||||
RET((uint64_t []) { 256 });
|
||||
/* On Bifrost and newer, all GPUs can support at least 256 threads
|
||||
* regardless of register usage, so we report 256.
|
||||
*
|
||||
* On Midgard, with maximum register usage, the maximum
|
||||
* thread count is only 64. We would like to report 64 here, but
|
||||
* the GLES3.1 spec minimum is 128, so we report 128 and limit
|
||||
* the register allocation of affected compute kernels.
|
||||
*/
|
||||
RET((uint64_t []) { dev->arch >= 6 ? 256 : 128 });
|
||||
|
||||
case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE:
|
||||
RET((uint64_t []) { 1024*1024*512 /* Maybe get memory */ });
|
||||
|
Reference in New Issue
Block a user