@@ -892,7 +892,6 @@ void GLShaderManager::InitDriverInfo()
892
892
{
893
893
std::string driverInfo = std::string (glConfig.renderer_string ) + glConfig.version_string ;
894
894
_driverVersionHash = Com_BlockChecksum (driverInfo.c_str (), static_cast <int >(driverInfo.size ()));
895
- _shaderBinaryCacheInvalidated = false ;
896
895
}
897
896
898
897
void GLShaderManager::GenerateBuiltinHeaders () {
@@ -1416,10 +1415,6 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
1416
1415
return false ;
1417
1416
}
1418
1417
1419
- if ( _shaderBinaryCacheInvalidated ) {
1420
- return false ;
1421
- }
1422
-
1423
1418
const int start = Sys::Milliseconds ();
1424
1419
1425
1420
std::error_code err;
@@ -1459,14 +1454,7 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
1459
1454
1460
1455
/* Check if the header struct is the correct format
1461
1456
and the binary was produced by the same GL driver */
1462
- if ( shaderHeader.version != GL_SHADER_VERSION /* || shaderHeader.driverVersionHash != _driverVersionHash */ ) {
1463
- /* These two fields should be the same for all shaders. So if there is a mismatch,
1464
- don't bother opening any of the remaining files.
1465
- I've disabled the cache invalidation on driver version change, because we now also cache shader programs that use
1466
- non-empty deformVertexes. This would mean that after updating the driver, any time you load a new map with
1467
- deformVertexes, it would cause the rebuild of *all* shaders */
1468
- Log::Notice ( " Invalidating shader binary cache" );
1469
- _shaderBinaryCacheInvalidated = true ;
1457
+ if ( shaderHeader.version != GL_SHADER_VERSION || shaderHeader.driverVersionHash != _driverVersionHash ) {
1470
1458
return false ;
1471
1459
}
1472
1460
0 commit comments