v3d/v3dv: Use new V3D_MAX_CSD_WG_SIZE = 256

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41257>
This commit is contained in:
Jose Maria Casanova Crespo 2026-04-29 23:43:28 +02:00 committed by Marge Bot
parent e378a7d773
commit c3ba5effe2
3 changed files with 9 additions and 5 deletions

View file

@ -69,6 +69,8 @@
#define V3D_MAX_ARRAY_LAYERS 2048
#define V3D_MAX_CSD_WG_SIZE 256
#define V3D_MAX_VERTEX_ATTRIB_DIVISOR 0xffff
/* Tile allocation block sizes for the PTB, as enum values matching

View file

@ -1022,8 +1022,10 @@ get_device_properties(const struct v3dv_physical_device *device,
/* Compute limits */
.maxComputeSharedMemorySize = 32u * 1024u,
.maxComputeWorkGroupCount = { 65535, 65535, 65535 },
.maxComputeWorkGroupInvocations = 256,
.maxComputeWorkGroupSize = { 256, 256, 256 },
.maxComputeWorkGroupInvocations = V3D_MAX_CSD_WG_SIZE,
.maxComputeWorkGroupSize = { V3D_MAX_CSD_WG_SIZE,
V3D_MAX_CSD_WG_SIZE,
V3D_MAX_CSD_WG_SIZE },
.subPixelPrecisionBits = V3D_COORD_SHIFT,
.subTexelPrecisionBits = 8,
@ -1280,7 +1282,7 @@ get_device_properties(const struct v3dv_physical_device *device,
/* VK_EXT_subgroup_size_control */
.minSubgroupSize = V3D_CHANNELS,
.maxSubgroupSize = V3D_CHANNELS,
.maxComputeWorkgroupSubgroups = 16, /* 256 / 16 */
.maxComputeWorkgroupSubgroups = V3D_MAX_CSD_WG_SIZE / V3D_CHANNELS,
.requiredSubgroupSizeStages = VK_SHADER_STAGE_COMPUTE_BIT,
/* VK_KHR_maintenance5 */

View file

@ -207,13 +207,13 @@ v3d_init_compute_caps(struct v3d_screen *screen)
/* GL_MAX_COMPUTE_WORK_GROUP_SIZE */
caps->max_block_size[0] =
caps->max_block_size[1] =
caps->max_block_size[2] = 256;
caps->max_block_size[2] = V3D_MAX_CSD_WG_SIZE;
/* GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS: This is
* limited by WG_SIZE in the CSD.
*/
caps->max_threads_per_block =
caps->max_variable_threads_per_block = 256;
caps->max_variable_threads_per_block = V3D_MAX_CSD_WG_SIZE;
/* GL_MAX_COMPUTE_SHARED_MEMORY_SIZE */
caps->max_local_size = 32768;