@@ -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 () {
@@ -1418,10 +1417,6 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
14181417 return false ;
14191418 }
14201419
1421- if ( _shaderBinaryCacheInvalidated ) {
1422- return false ;
1423- }
1424-
14251420 const int start = Sys::Milliseconds ();
14261421
14271422 std::error_code err;
@@ -1461,14 +1456,7 @@ bool GLShaderManager::LoadShaderBinary( const std::vector<ShaderEntry>& shaders,
14611456
14621457 /* Check if the header struct is the correct format
14631458 and the binary was produced by the same GL driver */
1464- if ( shaderHeader.version != GL_SHADER_VERSION /* || shaderHeader.driverVersionHash != _driverVersionHash */ ) {
1465- /* These two fields should be the same for all shaders. So if there is a mismatch,
1466- don't bother opening any of the remaining files.
1467- I've disabled the cache invalidation on driver version change, because we now also cache shader programs that use
1468- non-empty deformVertexes. This would mean that after updating the driver, any time you load a new map with
1469- deformVertexes, it would cause the rebuild of *all* shaders */
1470- Log::Notice ( " Invalidating shader binary cache" );
1471- _shaderBinaryCacheInvalidated = true ;
1459+ if ( shaderHeader.version != GL_SHADER_VERSION || shaderHeader.driverVersionHash != _driverVersionHash ) {
14721460 return false ;
14731461 }
14741462
0 commit comments