@@ -2107,6 +2107,34 @@ static void GLimp_InitExtensions()
21072107
21082108 logger.Notice (" ...using shading language version %i" , glConfig.shadingLanguageVersion );
21092109
2110+ glConfig.incrementalShaderCompilation = r_incrementalShaderCompilation.Get ();
2111+
2112+ glConfig.mat3x2Available = r_useMat3x2.Get ();
2113+
2114+ if ( glConfig.driverVendor == glDriverVendor_t::GL4ES )
2115+ {
2116+ if ( glConfig.shadingLanguageVersion <= 120
2117+ && workaround_glDriver_gl4es_assumeSmoothstep.Get () )
2118+ {
2119+ logger.Notice ( " Found GLSL 1.20 on GL4ES translation layer, assuming smoothstep() is always declared." );
2120+ glConfig.assumeSmoothstep = true ;
2121+ }
2122+
2123+ if ( glConfig.incrementalShaderCompilation
2124+ && workaround_glDriver_gl4es_disableIncrementalShaderCompilation.Get () )
2125+ {
2126+ logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable incremental shader compilation." );
2127+ glConfig.incrementalShaderCompilation = false ;
2128+ }
2129+
2130+ if ( glConfig.mat3x2Available
2131+ && workaround_glDriver_gl4es_disableMat3x2.Get () )
2132+ {
2133+ logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable mat3x2 GLSL support." );
2134+ glConfig.mat3x2Available = false ;
2135+ }
2136+ }
2137+
21102138
21112139 // OpenGL driver constants.
21122140
@@ -2713,34 +2741,6 @@ static void GLimp_InitExtensions()
27132741 }
27142742#endif
27152743
2716- glConfig.incrementalShaderCompilation = r_incrementalShaderCompilation.Get ();
2717-
2718- glConfig.mat3x2Available = r_useMat3x2.Get ();
2719-
2720- if ( glConfig.driverVendor == glDriverVendor_t::GL4ES )
2721- {
2722- if ( glConfig.shadingLanguageVersion <= 120
2723- && workaround_glDriver_gl4es_assumeSmoothstep.Get () )
2724- {
2725- logger.Notice ( " Found GLSL 1.20 on GL4ES translation layer, assuming smoothstep() is always declared." );
2726- glConfig.assumeSmoothstep = true ;
2727- }
2728-
2729- if ( glConfig.incrementalShaderCompilation
2730- && workaround_glDriver_gl4es_disableIncrementalShaderCompilation.Get () )
2731- {
2732- logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable incremental shader compilation." );
2733- glConfig.incrementalShaderCompilation = false ;
2734- }
2735-
2736- if ( glConfig.mat3x2Available
2737- && workaround_glDriver_gl4es_disableMat3x2.Get () )
2738- {
2739- logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable mat3x2 GLSL support." );
2740- glConfig.mat3x2Available = false ;
2741- }
2742- }
2743-
27442744 // Shader limits.
27452745
27462746 // From GL_ARB_vertex_shader.
0 commit comments