@@ -2111,6 +2111,34 @@ static void GLimp_InitExtensions()
21112111
21122112 logger.Notice (" ...using shading language version %i" , glConfig.shadingLanguageVersion );
21132113
2114+ glConfig.incrementalShaderCompilation = r_incrementalShaderCompilation.Get ();
2115+
2116+ glConfig.mat3x2Available = r_useMat3x2.Get ();
2117+
2118+ if ( glConfig.driverVendor == glDriverVendor_t::GL4ES )
2119+ {
2120+ if ( glConfig.shadingLanguageVersion <= 120
2121+ && workaround_glDriver_gl4es_assumeSmoothstep.Get () )
2122+ {
2123+ logger.Notice ( " Found GLSL 1.20 on GL4ES translation layer, assuming smoothstep() is always declared." );
2124+ glConfig.assumeSmoothstep = true ;
2125+ }
2126+
2127+ if ( glConfig.incrementalShaderCompilation
2128+ && workaround_glDriver_gl4es_disableIncrementalShaderCompilation.Get () )
2129+ {
2130+ logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable incremental shader compilation." );
2131+ glConfig.incrementalShaderCompilation = false ;
2132+ }
2133+
2134+ if ( glConfig.mat3x2Available
2135+ && workaround_glDriver_gl4es_disableMat3x2.Get () )
2136+ {
2137+ logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable mat3x2 GLSL support." );
2138+ glConfig.mat3x2Available = false ;
2139+ }
2140+ }
2141+
21142142
21152143 // OpenGL driver constants.
21162144
@@ -2717,34 +2745,6 @@ static void GLimp_InitExtensions()
27172745 }
27182746#endif
27192747
2720- glConfig.incrementalShaderCompilation = r_incrementalShaderCompilation.Get ();
2721-
2722- glConfig.mat3x2Available = r_useMat3x2.Get ();
2723-
2724- if ( glConfig.driverVendor == glDriverVendor_t::GL4ES )
2725- {
2726- if ( glConfig.shadingLanguageVersion <= 120
2727- && workaround_glDriver_gl4es_assumeSmoothstep.Get () )
2728- {
2729- logger.Notice ( " Found GLSL 1.20 on GL4ES translation layer, assuming smoothstep() is always declared." );
2730- glConfig.assumeSmoothstep = true ;
2731- }
2732-
2733- if ( glConfig.incrementalShaderCompilation
2734- && workaround_glDriver_gl4es_disableIncrementalShaderCompilation.Get () )
2735- {
2736- logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable incremental shader compilation." );
2737- glConfig.incrementalShaderCompilation = false ;
2738- }
2739-
2740- if ( glConfig.mat3x2Available
2741- && workaround_glDriver_gl4es_disableMat3x2.Get () )
2742- {
2743- logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable mat3x2 GLSL support." );
2744- glConfig.mat3x2Available = false ;
2745- }
2746- }
2747-
27482748 // Shader limits.
27492749
27502750 // From GL_ARB_vertex_shader.
0 commit comments