On Mon Mar 30 12:31:17 2026 +0000, Rémi Bernon wrote:
Additional proof that GLES extensions don't magically become valid GL extensions, is that there are plenty of extensions that are equivalent but have different names between GL and GLES. And even with GL_ARB_ESx_compatibility, the general case is that the GLES extensions are still not exposed with GL contexts, but they are (and GL extensions aren't) exposed in contexts created with GLES compatibility. This can be seen by comparing the glxinfo extension list. This is pretty clear from Mesa source code, and in `extension_table.h` source you can find a long list of duplicated entries, each behind the same driver feature flag but with a disjoint GL / GLES flag, as each extension is only registered into one of the categories (matching the GL registry XML we use): ``` EXT(EXT_bgra , dummy_true , GLL, x , x , x , 1995) EXT(MESA_bgra , dummy_true , x , x , x , ES2, 2021) EXT(EXT_blend_func_separate , dummy_true , GLL, x , x , x , 1999) EXT(INGR_blend_func_separate , dummy_true , GLL, x , x , x , 1999) EXT(OES_blend_func_separate , dummy_true , x , x , ES1, x , 2009) EXT(EXT_blend_subtract , dummy_true , GLL, x , x , x , 1995) EXT(OES_blend_subtract , dummy_true , x , x , ES1, x , 2009) EXT(ARB_clear_texture , dummy_true , GLL, GLC, x , x , 2013) EXT(EXT_clear_texture , dummy_true , x , x , x , 31, 2016) EXT(ARB_depth_texture , dummy_true , GLL, x , x , x , 2001) EXT(OES_depth_texture , dummy_true , x , x , x , ES2, 2006) EXT(ARB_draw_buffers , dummy_true , GLL, GLC, x , x , 2002) EXT(ATI_draw_buffers , dummy_true , GLL, x , x , x , 2002) EXT(EXT_draw_buffers , dummy_true , x , x , x , ES2, 2012) EXT(NV_draw_buffers , dummy_true , x , x , x , ES2, 2011) EXT(EXT_EGL_sync , dummy_true , GLL, GLC, x , x , 2019) EXT(OES_EGL_sync , dummy_true , x , x , ES1, ES2, 2010) EXT(EXT_framebuffer_object , dummy_true , GLL, GLC, x , x , 2000) EXT(OES_framebuffer_object , dummy_true , x , x , ES1, x , 2005) EXT(ARB_get_program_binary , dummy_true , GLL, GLC, x , x , 2010) EXT(OES_get_program_binary , dummy_true , x , x , x , ES2, 2008) EXT(EXT_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2005) EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000) EXT(OES_packed_depth_stencil , dummy_true , x , x , ES1, ES2, 2007) EXT(ARB_pixel_buffer_object , dummy_true , GLL, GLC, x , x , 2004) EXT(EXT_pixel_buffer_object , dummy_true , GLL, GLC, x , x , 2004) EXT(NV_pixel_buffer_object , dummy_true , x , x , x , ES2, 2012) EXT(ARB_point_sprite , dummy_true , GLL, GLC, x , x , 2003) EXT(OES_point_sprite , dummy_true , x , x , ES1, x , 2004) EXT(ARB_sampler_objects , dummy_true , GLL, GLC, x , x , 2009) EXT(MESA_sampler_objects , dummy_true , x , x , x , ES2, 2019) EXT(ARB_separate_shader_objects , dummy_true , GLL, GLC, x , x , 2010) EXT(EXT_separate_shader_objects , dummy_true , x , x , x , ES2, 2013) EXT(EXT_stencil_wrap , dummy_true , GLL, x , x , x , 2002) EXT(OES_stencil_wrap , dummy_true , x , x , ES1, x , 2002) EXT(ARB_texture_border_clamp , dummy_true , GLL, GLC, x , x , 2000) EXT(EXT_texture_border_clamp , dummy_true , x , x , x , ES2, 2014) EXT(OES_texture_border_clamp , dummy_true , x , x , x , ES2, 2014) EXT(SGIS_texture_border_clamp , dummy_true , GLL, x , x , x , 1997) EXT(ARB_texture_cube_map , dummy_true , GLL, x , x , x , 1999) EXT(EXT_texture_cube_map , dummy_true , GLL, x , x , x , 2001) EXT(OES_texture_cube_map , dummy_true , x , x , ES1, x , 2007) EXT(EXT_texture_edge_clamp , dummy_true , GLL, x , x , x , 1997) EXT(SGIS_texture_edge_clamp , dummy_true , GLL, x , x , x , 1997) EXT(ARB_texture_env_crossbar , dummy_true , GLL, x , x , x , 2001) EXT(OES_texture_env_crossbar , dummy_true , x , x , ES1, x , 2005) EXT(ARB_texture_mirrored_repeat , dummy_true , GLL, x , x , x , 2001) EXT(IBM_texture_mirrored_repeat , dummy_true , GLL, x , x , x , 1998) EXT(OES_texture_mirrored_repeat , dummy_true , x , x , ES1, x , 2005) EXT(ARB_vertex_array_object , dummy_true , GLL, GLC, x , x , 2006) EXT(OES_vertex_array_object , dummy_true , x , x , ES1, ES2, 2010) EXT(ARB_base_instance , ARB_base_instance , GLL, GLC, x , x , 2011) EXT(EXT_base_instance , ARB_base_instance , x , x , x , 30, 2014) EXT(ATI_blend_equation_separate , EXT_blend_equation_separate , GLL, GLC, x , x , 2003) EXT(EXT_blend_equation_separate , EXT_blend_equation_separate , GLL, GLC, x , x , 2003) EXT(OES_blend_equation_separate , EXT_blend_equation_separate , x , x , ES1, x , 2009) EXT(ARB_blend_func_extended , ARB_blend_func_extended , GLL, GLC, x , x , 2009) EXT(EXT_blend_func_extended , ARB_blend_func_extended , x , x , x , ES2, 2015) EXT(ARB_buffer_storage , ARB_buffer_storage , GLL, GLC, x , x , 2013) EXT(EXT_buffer_storage , ARB_buffer_storage , x , x , x , 31, 2015) EXT(ARB_clip_control , ARB_clip_control , GLL, GLC, x , x , 2014) EXT(EXT_clip_control , ARB_clip_control , x , x , x , ES2, 2017) EXT(AMD_conservative_depth , ARB_conservative_depth , GLL, GLC, x , x , 2009) EXT(ARB_conservative_depth , ARB_conservative_depth , GLL, GLC, x , x , 2011) EXT(EXT_conservative_depth , ARB_conservative_depth , x , x, x , 30, 2016) EXT(ARB_depth_clamp , ARB_depth_clamp , GLL, GLC, x , x , 2003) EXT(NV_depth_clamp , ARB_depth_clamp , GLL, GLC, x , x , 2001) EXT(EXT_depth_clamp , ARB_depth_clamp , x , x , x , ES2, 2019) EXT(ARB_draw_elements_base_vertex , ARB_draw_elements_base_vertex , GLL, GLC, x , x , 2009) EXT(EXT_draw_elements_base_vertex , ARB_draw_elements_base_vertex , x , x , x , ES2, 2014) EXT(OES_draw_elements_base_vertex , ARB_draw_elements_base_vertex , x , x , x , ES2, 2014) EXT(ARB_gpu_shader5 , ARB_gpu_shader5 , GLL, GLC, x , x , 2010) EXT(EXT_gpu_shader5 , ARB_gpu_shader5 , x , x , x , 31, 2014) EXT(OES_gpu_shader5 , ARB_gpu_shader5 , x , x , x , 31, 2014) EXT(ARB_instanced_arrays , ARB_instanced_arrays , GLL, GLC, x , x , 2008) EXT(EXT_instanced_arrays , ARB_instanced_arrays , x , x , x , ES2, 2012) EXT(ARB_map_buffer_range , ARB_map_buffer_range , GLL, GLC, x , x , 2008) EXT(EXT_map_buffer_range , ARB_map_buffer_range , x , x , ES1, ES2, 2012) EXT(AMD_multi_draw_indirect , ARB_draw_indirect , GLL, GLC, x , x , 2011) EXT(ARB_multi_draw_indirect , ARB_draw_indirect , GLL, GLC, x , x , 2012) EXT(EXT_multi_draw_indirect , ARB_draw_indirect , x , x, x , 31, 2014) EXT(EXT_primitive_bounding_box , OES_primitive_bounding_box , x , x , x , 31, 2014) EXT(OES_primitive_bounding_box , OES_primitive_bounding_box , x , x , x , 31, 2014) EXT(ARB_shader_clock , ARB_shader_clock , GLL, GLC, x , x , 2015) EXT(EXT_shader_clock , ARB_shader_clock , GLL, GLC, x , 31, 2025) EXT(ARB_shader_group_vote , ARB_shader_group_vote , GLL, GLC, x , x , 2013) EXT(EXT_shader_group_vote , ARB_shader_group_vote , x, x, x , 30, 2013) EXT(APPLE_sync , ARB_sync , x , x , ES1, ES2, 2012) EXT(ARB_sync , ARB_sync , GLL, GLC, x , x , 2003) EXT(ARB_tessellation_shader , ARB_tessellation_shader , GLL, GLC, x , x , 2009) EXT(EXT_tessellation_shader , ARB_tessellation_shader , x , x , x , 31, 2013) EXT(OES_tessellation_shader , ARB_tessellation_shader , x , x , x , 31, 2014) EXT(EXT_texture_buffer , OES_texture_buffer , x , x , x , 31, 2014) EXT(OES_texture_buffer , OES_texture_buffer , x , x , x , 31, 2014) EXT(ARB_texture_compression_bptc , ARB_texture_compression_bptc , GLL, GLC, x , x , 2010) EXT(EXT_texture_compression_bptc , ARB_texture_compression_bptc , x , x , x , 30, 2017) EXT(ARB_texture_compression_rgtc , ARB_texture_compression_rgtc , GLL, GLC, x , x , 2004) EXT(EXT_texture_compression_rgtc , ARB_texture_compression_rgtc , GLL, GLC, x , 30, 2004) EXT(ARB_texture_mirror_clamp_to_edge , ARB_texture_mirror_clamp_to_edge , GLL, GLC, x , x , 2013) EXT(EXT_texture_mirror_clamp_to_edge , ARB_texture_mirror_clamp_to_edge , x , x , x , ES2, 2017) EXT(ARB_texture_query_lod , ARB_texture_query_lod , GLL, GLC, x , x , 2009) EXT(EXT_texture_query_lod , ARB_texture_query_lod , x , x , x , 30, 2019) EXT(ARB_texture_rg , ARB_texture_rg , GLL, GLC, x , x , 2008) EXT(EXT_texture_rg , ARB_texture_rg , x , x , x , ES2, 2011) EXT(ARB_texture_stencil8 , ARB_texture_stencil8 , GLL, GLC, x , x , 2013) EXT(OES_texture_stencil8 , ARB_texture_stencil8 , x , x , x , 31, 2014) ``` Compared to this long list of correctly listed extensions, there are a handful of incorrectly listed ones, among which: ``` EXT(ANGLE_texture_compression_dxt3 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2011) EXT(ANGLE_texture_compression_dxt5 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2011) EXT(EXT_demote_to_helper_invocation , EXT_demote_to_helper_invocation , GLL, GLC, ES1, ES2, 2019) EXT(EXT_texture_compression_dxt1 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2004) ``` These four extensions are incorrectly classified (there are two or three extra ones, some GL ones incorrectly listed as GLES), compared to the registry XML, possibly for some implementation specific reason and this is some Mesa issue at best and not something we should bother with. The registry XML is the reference and it should be trusted. If there's some inconsistency that actually matters we can consider some tweaking, but it should preferably be fixed in the registry or in Mesa first before considering adding some workarounds on our side. I'm even very tempted to remove the workarounds I kept because it seems like my attempt to find a middle ground wasn't even worthwhile. In other words, if you pick examples that support your claim and ignore those that do not, you somehow prove something?
Another way to look at it is that drivers may or may not expose those extensions as they see fit. This way, you do not need to cherry-pick "evidences". -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10472#note_134544