From 48a49c4e04e433f0802ea011db6f88d02b5287b9 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 6 Aug 2024 15:28:43 +0800 Subject: [PATCH] radeonsi: enable KHR_shader_subgroup Signed-off-by: Qiang Yu Part-of: --- docs/features.txt | 1 + docs/relnotes/new_features.txt | 1 + src/gallium/drivers/radeonsi/si_get.c | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/docs/features.txt b/docs/features.txt index d28f3ed4818..8eebb35d4ae 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -335,6 +335,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve GL_EXT_texture_norm16 DONE (freedreno, r600, radeonsi, nvc0i, softpipe, zink, iris, crocus) GL_EXT_texture_sRGB_R8 DONE (all drivers that support GLES 3.0+) GL_KHR_blend_equation_advanced_coherent DONE (freedreno/a6xx, panfrost, zink, asahi, iris/gen9+) + GL_KHR_shader_subgroup DONE (radeonsi) 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+) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 460ed6c02bd..0fe808986b5 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -3,3 +3,4 @@ VK_EXT_descriptor_buffer on nvk VK_EXT_post_depth_coverage on nvk VK_KHR_video_maintenance1 on radv VK_EXT_legacy_vertex_attributes on nvk +GL_KHR_shader_subgroup on radeonsi diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 28555157059..3c36c2cb055 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -414,6 +414,15 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) /* Conversion to nanos from cycles per millisecond */ return DIV_ROUND_UP(1000000, sscreen->info.clock_crystal_freq); + case PIPE_CAP_SHADER_SUBGROUP_SIZE: + return 64; + case PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_STAGES: + return BITFIELD_MASK(PIPE_SHADER_TYPES); + case PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_FEATURES: + return BITFIELD_MASK(PIPE_SHADER_SUBGROUP_NUM_FEATURES); + case PIPE_CAP_SHADER_SUBGROUP_QUAD_ALL_STAGES: + return true; + default: return u_pipe_screen_get_param_defaults(pscreen, param); }