@@ -892,7 +892,6 @@ void GLShaderManager::InitDriverInfo()
892892{
893893 std::string driverInfo = std::string (glConfig.renderer_string ) + glConfig.version_string ;
894894 _driverVersionHash = Com_BlockChecksum (driverInfo.c_str (), static_cast <int >(driverInfo.size ()));
895- _shaderBinaryCacheInvalidated = false ;
896895}
897896
898897void GLShaderManager::GenerateBuiltinHeaders () {
@@ -1416,10 +1415,6 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
14161415 return false ;
14171416 }
14181417
1419- if ( _shaderBinaryCacheInvalidated ) {
1420- return false ;
1421- }
1422-
14231418 const int start = Sys::Milliseconds ();
14241419
14251420 std::error_code err;
@@ -1459,14 +1454,7 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
14591454
14601455 /* Check if the header struct is the correct format
14611456 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 ) {
14701458 return false ;
14711459 }
14721460
0 commit comments