mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Renderer can load the test_box.map
This commit is contained in:
parent
6ae1f07e95
commit
19f38c9a83
7 changed files with 15 additions and 15 deletions
|
@ -896,7 +896,7 @@ bool idBinaryImage::LoadFromGeneratedFile( idFile* bFile, ID_TIME_T sourceTimeSt
|
|||
// sizes are still retained, so the stored data size may be larger than
|
||||
// just the multiplication of dimensions
|
||||
assert( img.dataSize >= img.width * img.height * BitsForFormat( ( textureFormat_t )fileData.format ) / 8 );
|
||||
#if defined(__APPLE__) && defined(USE_VULKAN)
|
||||
#if ( defined( __APPLE__ ) && defined( USE_VULKAN ) ) //|| defined( USE_NVRHI )
|
||||
int imgfile_dataSize = img.dataSize;
|
||||
// SRS - Allocate 2x memory to prepare for in-place conversion from FMT_RGB565 to FMT_RGBA8
|
||||
if( ( textureFormat_t )fileData.format == FMT_RGB565 )
|
||||
|
|
|
@ -476,7 +476,7 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
|
|||
opts.height = header.height;
|
||||
opts.numLevels = header.numLevels;
|
||||
opts.colorFormat = ( textureColor_t )header.colorFormat;
|
||||
#if defined(__APPLE__) && defined(USE_VULKAN)
|
||||
#if ( defined( __APPLE__ ) && defined( USE_VULKAN ) ) //|| defined( USE_NVRHI )
|
||||
// SRS - Set in-memory format to FMT_RGBA8 for converted FMT_RGB565 image
|
||||
if( header.format == FMT_RGB565 )
|
||||
{
|
||||
|
@ -693,6 +693,7 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
|
|||
const bimageImage_t& img = im.GetImageHeader( i );
|
||||
const byte* pic = im.GetImageData( i );
|
||||
|
||||
#if 0
|
||||
if( opts.format == FMT_RGB565 )
|
||||
{
|
||||
int bufferW = img.width;
|
||||
|
@ -721,6 +722,7 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
|
|||
Mem_Free16( data );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
int bufferW = img.width;
|
||||
if( IsCompressed() )
|
||||
|
|
|
@ -131,8 +131,8 @@ void Framebuffer::ResizeFramebuffers()
|
|||
{
|
||||
globalImages->bloomRenderImage[i]->Reload( false, tr.backend.commandList );
|
||||
}
|
||||
tr.backend.commandList->close( );
|
||||
deviceManager->GetDevice( )->executeCommandList( tr.backend.commandList );
|
||||
tr.backend.commandList->close();
|
||||
deviceManager->GetDevice()->executeCommandList( tr.backend.commandList );
|
||||
|
||||
for( uint32_t index = 0; index < backBufferCount; index++ )
|
||||
{
|
||||
|
@ -214,10 +214,10 @@ void Framebuffer::ResizeFramebuffers()
|
|||
.addColorAttachment( globalImages->bloomRenderImage[i]->texture ) );
|
||||
}
|
||||
|
||||
Framebuffer::Unbind( );
|
||||
Framebuffer::Unbind();
|
||||
}
|
||||
|
||||
void Framebuffer::Bind( )
|
||||
void Framebuffer::Bind()
|
||||
{
|
||||
RENDERLOG_PRINTF( "Framebuffer::Bind( %s )\n", fboName.c_str() );
|
||||
|
||||
|
|
|
@ -387,7 +387,6 @@ void idImage::AllocImage()
|
|||
.setSampleCount( opts.samples )
|
||||
.setMipLevels( opts.numLevels );
|
||||
|
||||
#if 0
|
||||
if( opts.colorFormat == CFM_GREEN_ALPHA )
|
||||
{
|
||||
textureDesc.componentMapping.bits.r = 5;
|
||||
|
@ -423,7 +422,6 @@ void idImage::AllocImage()
|
|||
textureDesc.componentMapping.bits.b = 0;
|
||||
textureDesc.componentMapping.bits.a = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( opts.isRenderTarget )
|
||||
{
|
||||
|
|
|
@ -767,7 +767,7 @@ void idRenderBackend::DrawElementsWithCounters( const drawSurf_t* surf )
|
|||
currentViewport.zmax };
|
||||
state.viewport.addViewportAndScissorRect( viewport );
|
||||
|
||||
if( !currentScissor.IsEmpty( ) )
|
||||
if( !currentScissor.IsEmpty() )
|
||||
{
|
||||
state.viewport.addScissorRect( nvrhi::Rect( currentScissor.x1, currentScissor.x2, currentScissor.y1, currentScissor.y2 ) );
|
||||
}
|
||||
|
@ -1293,7 +1293,7 @@ idRenderBackend::GL_Scissor
|
|||
void idRenderBackend::GL_Scissor( int x /* left*/, int y /* bottom */, int w, int h )
|
||||
{
|
||||
// TODO Check if this is right.
|
||||
//currentScissor.Clear( );
|
||||
//currentScissor.Clear();
|
||||
//currentScissor.AddPoint( x, y );
|
||||
//currentScissor.AddPoint( x + w, y + h );
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ void idRenderProgManager::LoadComputeProgram( const int programIndex, const int
|
|||
{
|
||||
prog.inputLayout = device->createInputLayout(
|
||||
&vertexLayoutDescs[prog.vertexLayout][0],
|
||||
vertexLayoutDescs[prog.vertexLayout].Num( ),
|
||||
vertexLayoutDescs[prog.vertexLayout].Num(),
|
||||
shaders[prog.vertexShaderIndex].handle );
|
||||
}
|
||||
prog.bindingLayout = bindingLayouts[prog.bindingLayoutType];
|
||||
|
@ -256,7 +256,7 @@ void idRenderProgManager::KillAllShaders()
|
|||
|
||||
tr.backend.ResetPipelineCache();
|
||||
|
||||
for( int i = 0; i < shaders.Num( ); i++ )
|
||||
for( int i = 0; i < shaders.Num(); i++ )
|
||||
{
|
||||
if( shaders[i].handle )
|
||||
{
|
||||
|
|
|
@ -887,9 +887,9 @@ void idRenderBackend::GL_SetDefaultState()
|
|||
polyOfsBias = 0.0f;
|
||||
glStateBits = 0;
|
||||
|
||||
hdrAverageLuminance = 0;
|
||||
hdrMaxLuminance = 0;
|
||||
hdrTime = 0;
|
||||
//hdrAverageLuminance = 0;
|
||||
//hdrMaxLuminance = 0;
|
||||
//hdrTime = 0;
|
||||
hdrKey = 0;
|
||||
|
||||
GL_State( 0, true );
|
||||
|
|
Loading…
Reference in a new issue