mesa: Add support for GL_EXT_shader_clock

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35630>
This commit is contained in:
Ashley Smith 2025-06-19 09:17:42 +01:00 committed by Marge Bot
parent b729ad1742
commit 2ce201707e
6 changed files with 9 additions and 3 deletions

View file

@ -332,6 +332,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_semaphore DONE (radeonsi, zink, d3d12, iris, crocus)
GL_EXT_semaphore_fd DONE (radeonsi, zink, iris, crocus)
GL_EXT_semaphore_win32 DONE (zink, d3d12)
GL_EXT_shader_clock DONE (all drivers that support GL_ARB_shader_clock)
GL_EXT_shader_group_vote DONE (all drivers that support GL_ARB_shader_group_vote)
GL_EXT_shader_realtime_clock DONE (panfrost/v6+)
GL_EXT_sRGB_write_control DONE (all drivers that support GLES 3.0+)

View file

@ -720,13 +720,15 @@ supports_nv_fragment_shader_interlock(const _mesa_glsl_parse_state *state)
static bool
shader_clock(const _mesa_glsl_parse_state *state)
{
return state->ARB_shader_clock_enable;
return state->ARB_shader_clock_enable ||
state->EXT_shader_clock_enable;
}
static bool
shader_clock_int64(const _mesa_glsl_parse_state *state)
{
return state->ARB_shader_clock_enable &&
return (state->ARB_shader_clock_enable ||
state->EXT_shader_clock_enable) &&
(state->ARB_gpu_shader_int64_enable ||
state->AMD_gpu_shader_int64_enable);
}

View file

@ -821,6 +821,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT_AEP(EXT_gpu_shader5),
EXT_AEP(EXT_primitive_bounding_box),
EXT(EXT_separate_shader_objects),
EXT(EXT_shader_clock),
EXT(EXT_shader_framebuffer_fetch),
EXT(EXT_shader_framebuffer_fetch_non_coherent),
EXT(EXT_shader_group_vote),

View file

@ -880,6 +880,8 @@ struct _mesa_glsl_parse_state {
bool EXT_primitive_bounding_box_warn;
bool EXT_separate_shader_objects_enable;
bool EXT_separate_shader_objects_warn;
bool EXT_shader_clock_enable;
bool EXT_shader_clock_warn;
bool EXT_shader_framebuffer_fetch_enable;
bool EXT_shader_framebuffer_fetch_warn;
bool EXT_shader_framebuffer_fetch_non_coherent_enable;

View file

@ -294,6 +294,7 @@ EXT(EXT_semaphore_fd , EXT_semaphore_fd
EXT(EXT_semaphore_win32 , EXT_semaphore_win32 , GLL, GLC, x , ES2, 2017)
EXT(EXT_separate_shader_objects , dummy_true , x , x , x , ES2, 2013)
EXT(EXT_separate_specular_color , dummy_true , GLL, x , x , x , 1997)
EXT(EXT_shader_clock , ARB_shader_clock , GLL, GLC, x , x , 2025)
EXT(EXT_shader_framebuffer_fetch , EXT_shader_framebuffer_fetch , GLL, GLC, x , ES2, 2013)
EXT(EXT_shader_framebuffer_fetch_non_coherent, EXT_shader_framebuffer_fetch_non_coherent, GLL, GLC, x, ES2, 2018)
EXT(EXT_shader_group_vote , ARB_shader_group_vote , x, x, x , 30, 2013)

View file

@ -1053,7 +1053,6 @@ void st_init_extensions(struct pipe_screen *screen,
EXT_CAP(ARB_sample_locations, programmable_sample_locations);
EXT_CAP(ARB_seamless_cube_map, seamless_cube_map);
EXT_CAP(ARB_shader_ballot, shader_ballot);
EXT_CAP(ARB_shader_clock, shader_clock);
EXT_CAP(ARB_shader_draw_parameters, draw_parameters);
EXT_CAP(ARB_shader_group_vote, shader_group_vote);
EXT_CAP(EXT_shader_image_load_formatted, image_load_formatted);