@@ -163,6 +163,10 @@ static Cvar::Cvar<bool> workaround_glDriver_gl4es_disableMat3x2(
163163 " workaround.glDriver.gl4es.disableMat3x2" ,
164164 " Disable mat3x2 GLSL support on GL4ES" ,
165165 Cvar::NONE , true );
166+ static Cvar::Cvar<bool > workaround_glDriver_gl4es_disableTexture3D (
167+ " workaround.glDriver.gl4es.disableTexture3D" ,
168+ " Disable texture3D support on GL4ES" ,
169+ Cvar::NONE , true );
166170static Cvar::Cvar<bool > workaround_glDriver_mesa_ati_rv300_useFloatVertex (
167171 " workaround.glDriver.mesa.ati.rv300.useFloatVertex" ,
168172 " Use float vertex instead of supported-but-slower half-float vertex on Mesa driver on ATI RV300 hardware" ,
@@ -2150,6 +2154,16 @@ static void GLimp_InitExtensions()
21502154 logger.Warn ( " Missing 3D texture support because of null max size" );
21512155 }
21522156
2157+ if ( glConfig.driverVendor == glDriverVendor_t::GL4ES )
2158+ {
2159+ if ( glConfig.texture3DAvailable
2160+ && workaround_glDriver_gl4es_disableTexture3D.Get () )
2161+ {
2162+ logger.Notice ( " Found GL4ES translation layer with OpenGL ES backend, disable 3D texture support." );
2163+ glConfig.texture3DAvailable = false ;
2164+ }
2165+ }
2166+
21532167 logger.Notice ( " ...using up to %d texture size." , glConfig.maxTextureSize );
21542168
21552169 if ( glConfig.texture3DAvailable )
@@ -2784,6 +2798,7 @@ bool GLimp_Init()
27842798 Cvar::Latch ( workaround_glDriver_gl4es_assumeSmoothstep );
27852799 Cvar::Latch ( workaround_glDriver_gl4es_disableIncrementalShaderCompilation );
27862800 Cvar::Latch ( workaround_glDriver_gl4es_disableMat3x2 );
2801+ Cvar::Latch ( workaround_glDriver_gl4es_disableTexture3D );
27872802 Cvar::Latch ( workaround_glDriver_mesa_ati_rv300_useFloatVertex );
27882803 Cvar::Latch ( workaround_glDriver_mesa_ati_rv600_disableHyperZ );
27892804 Cvar::Latch ( workaround_glDriver_mesa_broadcom_vc4_useFloatVertex );
0 commit comments