st/mesa: limit MaxComputeWorkGroupCount to INT_MAX - 1 due to failing tests

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
This commit is contained in:
Marek Olšák 2022-06-05 23:16:29 -04:00
parent 9c7256fb8d
commit 0081925856

View file

@ -1634,7 +1634,8 @@ void st_init_extensions(struct pipe_screen *screen,
consts->MaxComputeSharedMemorySize = max_local_size;
for (i = 0; i < 3; i++) {
consts->MaxComputeWorkGroupCount[i] = grid_size[i];
/* There are tests that fail if we report more that INT_MAX - 1. */
consts->MaxComputeWorkGroupCount[i] = MIN2(grid_size[i], INT_MAX - 1);
consts->MaxComputeWorkGroupSize[i] = block_size[i];
}