zink: Enable KHR_shader_subgroup

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
This commit is contained in:
Adam Jackson 2024-08-15 17:49:24 -04:00 committed by Marge Bot
parent cee77ba6ec
commit 6f5c227e2c
2 changed files with 10 additions and 1 deletions

View file

@ -339,7 +339,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_texture_sRGB_R8 DONE (all drivers that support GLES 3.0+)
GL_EXT_texture_view DONE (all drivers that support GL_OES_texture_view)
GL_KHR_blend_equation_advanced_coherent DONE (freedreno/a6xx, panfrost, zink, asahi, iris/gen9+)
GL_KHR_shader_subgroup DONE (radeonsi)
GL_KHR_shader_subgroup DONE (radeonsi, zink)
GL_KHR_texture_compression_astc_hdr DONE (core only)
GL_KHR_texture_compression_astc_sliced_3d DONE (freedreno/a4xx+, r600, radeonsi, panfrost, softpipe, v3d, zink, lima, asahi, iris/gen9+)
GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+)

View file

@ -507,6 +507,8 @@ zink_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_type,
RET((uint32_t []) { 1 });
case PIPE_COMPUTE_CAP_MAX_SUBGROUPS:
RET((uint32_t []) { screen->info.props13.maxComputeWorkgroupSubgroups });
case PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY:
case PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE:
case PIPE_COMPUTE_CAP_MAX_INPUT_SIZE:
@ -1225,6 +1227,13 @@ zink_init_screen_caps(struct zink_screen *screen)
screen->info.props.limits.maxSamplerAnisotropy : 1.0f;
caps->max_texture_lod_bias = screen->info.props.limits.maxSamplerLodBias;
if (screen->info.feats12.subgroupBroadcastDynamicId && screen->info.feats12.shaderSubgroupExtendedTypes && screen->info.feats.features.shaderFloat64) {
caps->shader_subgroup_size = screen->info.subgroup.subgroupSize;
caps->shader_subgroup_supported_stages = screen->info.subgroup.supportedStages & BITFIELD_MASK(MESA_SHADER_STAGES);
caps->shader_subgroup_supported_features = screen->info.subgroup.supportedOperations & BITFIELD_MASK(PIPE_SHADER_SUBGROUP_NUM_FEATURES);
caps->shader_subgroup_quad_all_stages = screen->info.subgroup.quadOperationsInAllStages;
}
}
static VkSampleCountFlagBits