@@ -135,10 +135,6 @@ static Cvar::Cvar<bool> workaround_glDriver_amd_oglp_disableBindlessTexture(
135135 " workaround.glDriver.amd.oglp.disableBindlessTexture" ,
136136 " Disable ARB_bindless_texture on AMD OGLP driver" ,
137137 Cvar::NONE, true );
138- static Cvar::Cvar<bool > workaround_glDriver_mesa_ati_rv300_disableRgba16Blend (
139- " workaround.glDriver.mesa.ati.rv300.disableRgba16Blend" ,
140- " Disable misdetected RGBA16 on Mesa driver on RV300 hardware" ,
141- Cvar::NONE, true );
142138static Cvar::Cvar<bool > workaround_glDriver_mesa_ati_rv300_useFloatVertex (
143139 " workaround.glDriver.mesa.ati.rv300.useFloatVertex" ,
144140 " Use float vertex instead of supported-but-slower half-float vertex on Mesa driver on ATI RV300 hardware" ,
@@ -2108,75 +2104,6 @@ static void GLimp_InitExtensions()
21082104 // made required in OpenGL 3.0
21092105 glConfig2.textureFloatAvailable = LOAD_EXTENSION_WITH_TEST ( ExtFlag_CORE, ARB_texture_float, r_ext_texture_float.Get () );
21102106
2111- glConfig2.internalFormatQuery2Available = LOAD_EXTENSION_WITH_TEST ( ExtFlag_NONE, ARB_internalformat_query2, r_arb_internalformat_query2.Get () );
2112-
2113- if ( glConfig2.internalFormatQuery2Available )
2114- {
2115- GLint64 param;
2116- glGetInternalformati64v ( GL_TEXTURE_2D, GL_RGBA16, GL_FRAMEBUFFER_BLEND, 1 , ¶m );
2117-
2118- if ( param == GL_FULL_SUPPORT || param == GL_TRUE )
2119- {
2120- /* There is a discrepancy between OpenGL specification and OpenGL reference pages.
2121-
2122- The OpenGL 4.3 Core specification says the query should return either GL_FULL_SUPPORT,
2123- GL_CAVEAT_SUPPORT, or GL_NONE:
2124-
2125- - https://registry.khronos.org/OpenGL/specs/gl/glspec43.core.pdf#page=517
2126-
2127- The ARB_internalformat_query2 document says the same:
2128-
2129- - https://registry.khronos.org/OpenGL/extensions/ARB/ARB_internalformat_query2.txt
2130-
2131- The OpenGL wiki page for glGetInternalformat says the same:
2132-
2133- - https://www.khronos.org/opengl/wiki/GLAPI/glGetInternalformat
2134-
2135- But the glGetInternalformat reference page says the query should return GL_TRUE
2136- or GL_FALSE:
2137-
2138- - https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetInternalformat.xhtml
2139-
2140- The meaning of GL_CAVEAT_SUPPORT as a return of a GL_FRAMEBUFFER_BLEND query is
2141- unknown. See this thread for details:
2142-
2143- - https://github.com/KhronosGroup/OpenGL-Refpages/issues/157
2144-
2145- Because of this discrepancy in documentation, drivers may have implemented
2146- either GL_FULL_SUPPORT or GL_TRUE as a return for feature availability. */
2147- glConfig2.textureRGBA16BlendAvailable = 1 ;
2148- }
2149- else if ( param == GL_CAVEAT_SUPPORT || param == GL_NONE )
2150- {
2151- /* Older Mesa versions were mistakenly reporting full support for every driver on
2152- every hardware. A return that is not GL_FULL_SUPPORT and not GL_TRUE is the only
2153- value we can trust. See those threads for details:
2154-
2155- - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30612
2156- - https://gitlab.freedesktop.org/mesa/mesa/-/issues/11669#note_2521403
2157-
2158- GL_FALSE has same value as GL_NONE. */
2159- glConfig2.textureRGBA16BlendAvailable = 0 ;
2160- }
2161- }
2162- else
2163- {
2164- /* Assume this is an old driver without the query extension but the RGBA16 blending is
2165- available, as the feature is much older than the extension to check for it, the feature
2166- is very likely supported. */
2167- glConfig2.textureRGBA16BlendAvailable = -1 ;
2168- }
2169-
2170- /* Workaround for drivers not implementing the feature query or wrongly reporting the feature
2171- to be supported, for various reasons. */
2172- if ( workaround_glDriver_mesa_ati_rv300_disableRgba16Blend.Get () )
2173- {
2174- if ( glConfig2.textureRGBA16BlendAvailable != 0 && glConfig.hardwareType == glHardwareType_t::GLHW_R300 )
2175- {
2176- glConfig2.textureRGBA16BlendAvailable = 0 ;
2177- }
2178- }
2179-
21802107 bool gpuShader4Enabled = r_ext_gpu_shader4.Get ();
21812108
21822109 if ( gpuShader4Enabled
@@ -2708,7 +2635,6 @@ bool GLimp_Init()
27082635
27092636 Cvar::Latch ( workaround_glDriver_amd_adrenalin_disableBindlessTexture );
27102637 Cvar::Latch ( workaround_glDriver_amd_oglp_disableBindlessTexture );
2711- Cvar::Latch ( workaround_glDriver_mesa_ati_rv300_disableRgba16Blend );
27122638 Cvar::Latch ( workaround_glDriver_mesa_ati_rv300_useFloatVertex );
27132639 Cvar::Latch ( workaround_glDriver_mesa_ati_rv600_disableHyperZ );
27142640 Cvar::Latch ( workaround_glDriver_mesa_broadcom_vc4_useFloatVertex );
0 commit comments