mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Got rid of NVRHI depth-stencil is read-only warnings. Closes #760
This commit is contained in:
parent
c57ffb8279
commit
59940e7037
6 changed files with 30 additions and 29 deletions
|
@ -907,8 +907,8 @@ bool idBinaryImage::LoadFromGeneratedFile( idFile* bFile, ID_TIME_T sourceTimeSt
|
|||
else if( ( textureFormat_t )fileData.format == FMT_DXT1 || ( textureFormat_t )fileData.format == FMT_DXT5 )
|
||||
{
|
||||
int rowPitch = GetRowPitch( ( textureFormat_t )fileData.format, img.width );
|
||||
int mipRows = ( ( ( ( fileData.height + 3 ) & ~3 ) >> img.level ) + 3 ) / 4;
|
||||
img.Alloc( Max( img.dataSize, rowPitch * mipRows ) );
|
||||
int mipRows = ( ( ( ( fileData.height + 3 ) & ~3 ) >> img.level ) + 3 ) / 4;
|
||||
img.Alloc( Max( img.dataSize, rowPitch * mipRows ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -160,7 +160,7 @@ void idRenderProgManager::LoadShader( shader_t& shader )
|
|||
( constants.Num() > 0 ) ? &constants[0] : shaderConstant, uint32_t( constants.Num() ) );
|
||||
|
||||
shader.handle = shaderHandle;
|
||||
|
||||
|
||||
// SRS - Free the shader blob data, otherwise a leak will occur
|
||||
Mem_Free( shaderBlob.data );
|
||||
}
|
||||
|
|
|
@ -363,7 +363,8 @@ void PipelineCache::GetRenderState( uint64 stateBits, PipelineKey key, nvrhi::Re
|
|||
//
|
||||
//if( diff & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS ) )
|
||||
{
|
||||
if( ( stateBits & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS | GLS_SEPARATE_STENCIL ) ) != 0 )
|
||||
// SRS - Eliminate r/w depth attachment validation warnings when depth-stencil is read-only
|
||||
if( ( stateBits & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS | GLS_SEPARATE_STENCIL ) ) != 0 || ( depthStencilState.depthTestEnable && !depthStencilState.depthWriteEnable ) )
|
||||
{
|
||||
depthStencilState.enableStencil();
|
||||
}
|
||||
|
|
|
@ -1738,32 +1738,32 @@ void idRenderSystemLocal::Clear()
|
|||
|
||||
if( unitSquareTriangles != NULL )
|
||||
{
|
||||
Mem_Free( unitSquareTriangles->verts );
|
||||
Mem_Free( unitSquareTriangles->indexes );
|
||||
Mem_Free( unitSquareTriangles->verts );
|
||||
Mem_Free( unitSquareTriangles->indexes );
|
||||
Mem_Free( unitSquareTriangles );
|
||||
unitSquareTriangles = NULL;
|
||||
}
|
||||
|
||||
if( zeroOneCubeTriangles != NULL )
|
||||
{
|
||||
Mem_Free( zeroOneCubeTriangles->verts );
|
||||
Mem_Free( zeroOneCubeTriangles->indexes );
|
||||
Mem_Free( zeroOneCubeTriangles->verts );
|
||||
Mem_Free( zeroOneCubeTriangles->indexes );
|
||||
Mem_Free( zeroOneCubeTriangles );
|
||||
zeroOneCubeTriangles = NULL;
|
||||
}
|
||||
|
||||
if( zeroOneSphereTriangles != NULL )
|
||||
{
|
||||
Mem_Free( zeroOneSphereTriangles->verts );
|
||||
Mem_Free( zeroOneSphereTriangles->indexes );
|
||||
Mem_Free( zeroOneSphereTriangles->verts );
|
||||
Mem_Free( zeroOneSphereTriangles->indexes );
|
||||
Mem_Free( zeroOneSphereTriangles );
|
||||
zeroOneSphereTriangles = NULL;
|
||||
}
|
||||
|
||||
if( testImageTriangles != NULL )
|
||||
{
|
||||
Mem_Free( testImageTriangles->verts );
|
||||
Mem_Free( testImageTriangles->indexes );
|
||||
Mem_Free( testImageTriangles->verts );
|
||||
Mem_Free( testImageTriangles->indexes );
|
||||
Mem_Free( testImageTriangles );
|
||||
testImageTriangles = NULL;
|
||||
}
|
||||
|
|
|
@ -734,11 +734,11 @@ void idRenderWorldLocal::ParseLightGridPoints( idLexer* src, idFile* fileOut )
|
|||
|
||||
area->lightGrid.lightGridPoints.SetNum( numLightGridPoints );
|
||||
|
||||
idLib::Printf( "\narea %i (%i x %i x %i) = %i grid points \n", areaIndex, area->lightGrid.lightGridBounds[0], area->lightGrid.lightGridBounds[1], area->lightGrid.lightGridBounds[2], numLightGridPoints );
|
||||
idLib::Printf( "area %i grid size (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridSize[0], ( int )area->lightGrid.lightGridSize[1], ( int )area->lightGrid.lightGridSize[2] );
|
||||
idLib::Printf( "area %i grid bounds (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridBounds[0], ( int )area->lightGrid.lightGridBounds[1], ( int )area->lightGrid.lightGridBounds[2] );
|
||||
//common->DPrintf( "\narea %i (%i x %i x %i) = %i grid points \n", areaIndex, area->lightGrid.lightGridBounds[0], area->lightGrid.lightGridBounds[1], area->lightGrid.lightGridBounds[2], numLightGridPoints );
|
||||
//common->DPrintf( "area %i grid size (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridSize[0], ( int )area->lightGrid.lightGridSize[1], ( int )area->lightGrid.lightGridSize[2] );
|
||||
//common->DPrintf( "area %i grid bounds (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridBounds[0], ( int )area->lightGrid.lightGridBounds[1], ( int )area->lightGrid.lightGridBounds[2] );
|
||||
//idLib::Printf( "area %i %9u x %" PRIuSIZE " = lightGridSize = (%.2fMB)\n", areaIndex, numLightGridPoints, sizeof( lightGridPoint_t ), ( float )( area->lightGrid.lightGridPoints.MemoryUsed() ) / ( 1024.0f * 1024.0f ) );
|
||||
idLib::Printf( "area %i probe size (%i %i)\n", areaIndex, imageProbeSize, imageBorderSize );
|
||||
//common->DPrintf( "area %i probe size (%i %i)\n", areaIndex, imageProbeSize, imageBorderSize );
|
||||
|
||||
if( fileOut != NULL )
|
||||
{
|
||||
|
@ -824,11 +824,11 @@ void idRenderWorldLocal::ReadBinaryLightGridPoints( idFile* file )
|
|||
|
||||
area->lightGrid.lightGridPoints.SetNum( numLightGridPoints );
|
||||
|
||||
idLib::Printf( "\narea %i (%i x %i x %i) = %i grid points \n", areaIndex, area->lightGrid.lightGridBounds[0], area->lightGrid.lightGridBounds[1], area->lightGrid.lightGridBounds[2], numLightGridPoints );
|
||||
idLib::Printf( "area %i grid size (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridSize[0], ( int )area->lightGrid.lightGridSize[1], ( int )area->lightGrid.lightGridSize[2] );
|
||||
idLib::Printf( "area %i grid bounds (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridBounds[0], ( int )area->lightGrid.lightGridBounds[1], ( int )area->lightGrid.lightGridBounds[2] );
|
||||
//common->DPrintf( "\narea %i (%i x %i x %i) = %i grid points \n", areaIndex, area->lightGrid.lightGridBounds[0], area->lightGrid.lightGridBounds[1], area->lightGrid.lightGridBounds[2], numLightGridPoints );
|
||||
//common->DPrintf( "area %i grid size (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridSize[0], ( int )area->lightGrid.lightGridSize[1], ( int )area->lightGrid.lightGridSize[2] );
|
||||
//common->DPrintf( "area %i grid bounds (%i %i %i)\n", areaIndex, ( int )area->lightGrid.lightGridBounds[0], ( int )area->lightGrid.lightGridBounds[1], ( int )area->lightGrid.lightGridBounds[2] );
|
||||
//idLib::Printf( "area %i %9u x %" PRIuSIZE " = lightGridSize = (%.2fMB)\n", areaIndex, numLightGridPoints, sizeof( lightGridPoint_t ), ( float )( area->lightGrid.lightGridPoints.MemoryUsed() ) / ( 1024.0f * 1024.0f ) );
|
||||
idLib::Printf( "area %i probe size (%i %i)\n", areaIndex, imageProbeSize, imageBorderSize );
|
||||
//common->DPrintf( "area %i probe size (%i %i)\n", areaIndex, imageProbeSize, imageBorderSize );
|
||||
|
||||
for( int i = 0; i < numLightGridPoints; i++ )
|
||||
{
|
||||
|
|
|
@ -287,7 +287,7 @@ void idLobby::Shutdown( bool retainMigrationInfo, bool skipGoodbye )
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
NET_VERBOSE_PRINT( "NET: ShutdownLobby (%s)\n", GetLobbyName() );
|
||||
|
||||
for( int p = 0; p < peers.Num(); p++ )
|
||||
|
@ -327,16 +327,16 @@ void idLobby::Shutdown( bool retainMigrationInfo, bool skipGoodbye )
|
|||
{
|
||||
sessionCB->DestroyLobbyBackend( lobbyBackend );
|
||||
lobbyBackend = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SRS - cleanup any allocations made for multiplayer networking support
|
||||
// SRS - cleanup any allocations made for multiplayer networking support
|
||||
if( objMemory )
|
||||
{
|
||||
Mem_Free( objMemory );
|
||||
objMemory = NULL;
|
||||
Mem_Free( lzwData );
|
||||
lzwData = NULL;
|
||||
{
|
||||
Mem_Free( objMemory );
|
||||
objMemory = NULL;
|
||||
Mem_Free( lzwData );
|
||||
lzwData = NULL;
|
||||
}
|
||||
|
||||
state = STATE_IDLE;
|
||||
|
|
Loading…
Reference in a new issue