iris: Enable GL_KHR_shader_subgroup_* extensions for Gfx >= 9 when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

For platforms that don't have native float64 support, skip the
arithmetic and clustered ops.  While they would work, the lowering
for float64 for those increase significantly the shader for some
of those operations.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35844>
This commit is contained in:
Caio Oliveira 2025-06-30 11:37:11 -07:00 committed by Marge Bot
parent 4f628c9e8c
commit a8449171d3
2 changed files with 15 additions and 1 deletions

View file

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

View file

@ -499,6 +499,20 @@ iris_init_screen_caps(struct iris_screen *screen)
* shift it right by one, so the highest valid address bit gets unset.
*/
caps->max_vma = intel_48b_address(UINT64_MAX) >> 1;
if (devinfo->ver >= 9) {
caps->shader_subgroup_size = 32;
caps->shader_subgroup_supported_stages = BITFIELD_MASK(MESA_SHADER_STAGES);
caps->shader_subgroup_supported_features =
devinfo->has_64bit_float ? BITFIELD_MASK(PIPE_SHADER_SUBGROUP_NUM_FEATURES)
: (PIPE_SHADER_SUBGROUP_FEATURE_BASIC |
PIPE_SHADER_SUBGROUP_FEATURE_VOTE |
PIPE_SHADER_SUBGROUP_FEATURE_BALLOT |
PIPE_SHADER_SUBGROUP_FEATURE_SHUFFLE |
PIPE_SHADER_SUBGROUP_FEATURE_SHUFFLE_RELATIVE |
PIPE_SHADER_SUBGROUP_FEATURE_QUAD);
caps->shader_subgroup_quad_all_stages = true;
}
}
static uint64_t