Removed more obsolete Vulkan code

This commit is contained in:
Robert Beckebans 2023-03-10 18:49:32 +01:00
parent f8faac469a
commit 95f9b4de4a
5 changed files with 8 additions and 92 deletions

View file

@ -1288,10 +1288,6 @@ extern idCVar r_ldrContrastOffset;
extern idCVar r_useFilmicPostProcessing;
extern idCVar r_forceAmbient;
extern idCVar r_useSSGI;
extern idCVar r_ssgiDebug;
extern idCVar r_ssgiFiltering;
extern idCVar r_useSSAO;
extern idCVar r_ssaoDebug;
extern idCVar r_ssaoFiltering;

View file

@ -134,11 +134,7 @@ idCVar r_brightness( "r_brightness", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_FL
idCVar r_skipStaticInteractions( "r_skipStaticInteractions", "0", CVAR_RENDERER | CVAR_BOOL, "skip interactions created at level load" );
idCVar r_skipDynamicInteractions( "r_skipDynamicInteractions", "0", CVAR_RENDERER | CVAR_BOOL, "skip interactions created after level load" );
idCVar r_skipSuppress( "r_skipSuppress", "0", CVAR_RENDERER | CVAR_BOOL, "ignore the per-view suppressions" );
#if defined( USE_VULKAN )
idCVar r_skipPostProcess( "r_skipPostProcess", "1", CVAR_RENDERER | CVAR_BOOL, "skip all post-process renderings except bloom" );
#else
idCVar r_skipPostProcess( "r_skipPostProcess", "0", CVAR_RENDERER | CVAR_BOOL, "skip all post-process renderings except bloom" );
#endif
idCVar r_skipPostProcess( "r_skipPostProcess", "0", CVAR_RENDERER | CVAR_BOOL, "skip all post-process renderings except bloom" );
idCVar r_skipBloom( "r_skipBloom", "0", CVAR_RENDERER | CVAR_BOOL, "Skip bloom" );
idCVar r_skipInteractions( "r_skipInteractions", "0", CVAR_RENDERER | CVAR_BOOL, "skip all light/surface interaction drawing" );
idCVar r_skipDynamicTextures( "r_skipDynamicTextures", "0", CVAR_RENDERER | CVAR_BOOL, "don't dynamically create textures" );
@ -261,7 +257,7 @@ idCVar stereoRender_deGhost( "stereoRender_deGhost", "0.05", CVAR_FLOAT | CVAR_A
idCVar r_useVirtualScreenResolution( "r_useVirtualScreenResolution", "0", CVAR_RENDERER | CVAR_BOOL | CVAR_ARCHIVE, "do 2D rendering at 640x480 and stretch to the current resolution" );
// RB: shadow mapping parameters
#if 1 //defined( USE_VULKAN )
#if 0 //defined( USE_VULKAN )
idCVar r_useShadowMapping( "r_useShadowMapping", "1", CVAR_RENDERER | CVAR_ROM | CVAR_STATIC | CVAR_INTEGER, "use shadow mapping instead of stencil shadows" );
#else
idCVar r_useShadowMapping( "r_useShadowMapping", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_INTEGER, "use shadow mapping instead of stencil shadows" );
@ -302,21 +298,9 @@ idCVar r_ldrContrastOffset( "r_ldrContrastOffset", "3", CVAR_RENDERER | CVAR_FLO
idCVar r_useFilmicPostProcessing( "r_useFilmicPostProcessing", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "apply several post process effects to mimic a filmic look" );
#if defined( USE_VULKAN )
idCVar r_forceAmbient( "r_forceAmbient", "0.5", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_FLOAT, "render additional ambient pass to make the game less dark", 0.0f, 0.75f );
#else
idCVar r_forceAmbient( "r_forceAmbient", "0.5", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_FLOAT, "render additional ambient pass to make the game less dark", 0.0f, 1.0f );
#endif
idCVar r_forceAmbient( "r_forceAmbient", "0.5", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_FLOAT, "render additional ambient pass to make the game less dark", 0.0f, 1.0f );
idCVar r_useSSGI( "r_useSSGI", "0", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use screen space global illumination and reflections" );
idCVar r_ssgiDebug( "r_ssgiDebug", "0", CVAR_RENDERER | CVAR_INTEGER, "" );
idCVar r_ssgiFiltering( "r_ssgiFiltering", "1", CVAR_RENDERER | CVAR_BOOL, "" );
#if defined( USE_VULKAN )
idCVar r_useSSAO( "r_useSSAO", "0", CVAR_RENDERER | CVAR_ROM | CVAR_STATIC | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
#else
idCVar r_useSSAO( "r_useSSAO", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
#endif
idCVar r_useSSAO( "r_useSSAO", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
idCVar r_ssaoDebug( "r_ssaoDebug", "0", CVAR_RENDERER | CVAR_INTEGER, "" );
idCVar r_ssaoFiltering( "r_ssaoFiltering", "0", CVAR_RENDERER | CVAR_BOOL, "" );
idCVar r_useHierarchicalDepthBuffer( "r_useHierarchicalDepthBuffer", "1", CVAR_RENDERER | CVAR_BOOL, "" );
@ -2411,7 +2395,6 @@ void idRenderSystemLocal::InitBackend()
{
backend.Init();
#if defined( USE_NVRHI )
if( !commandList )
{
commandList = deviceManager->GetDevice()->createCommandList();
@ -2419,24 +2402,11 @@ void idRenderSystemLocal::InitBackend()
commandList->open();
// Reloading images here causes the rendertargets to get deleted. Figure out how to handle this properly on 360
// Reloading images here causes the rendertargets to get deleted
globalImages->ReloadImages( true, commandList );
commandList->close();
deviceManager->GetDevice()->executeCommandList( commandList );
#else
// Reloading images here causes the rendertargets to get deleted. Figure out how to handle this properly on 360
//globalImages->ReloadImages( true );
#if !defined(USE_VULKAN)
int err = glGetError();
if( err != GL_NO_ERROR )
{
common->Printf( "glGetError() = 0x%x\n", err );
}
#endif
#endif
}
}

View file

@ -1049,10 +1049,6 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
// discard anything currently on the list (this triggers SwapBuffers)
tr.SwapCommandBuffers( NULL, NULL, NULL, NULL, NULL, NULL );
#if defined( USE_VULKAN )
// TODO
#elif defined( USE_NVRHI )
byte* floatRGB16F = NULL;
R_ReadPixelsRGB16F( deviceManager->GetDevice(), &tr.backend.GetCommonPasses(), globalImages->envprobeHDRImage->GetTextureHandle() , nvrhi::ResourceStates::RenderTarget, &floatRGB16F, captureSize, captureSize );
@ -1062,27 +1058,6 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL )
testName.Format( "env/test/envprobe_%i_side_%i.exr", i, j );
R_WriteEXR( testName, floatRGB16F, 3, captureSize, captureSize, "fs_basepath" );
#endif
#else
int pix = captureSize * captureSize;
const int bufferSize = pix * 3 * 2;
byte* floatRGB16F = ( byte* )R_StaticAlloc( bufferSize );
glFinish();
glReadBuffer( GL_BACK );
globalFramebuffers.envprobeFBO->Bind();
glPixelStorei( GL_PACK_ROW_LENGTH, ENVPROBE_CAPTURE_SIZE );
glReadPixels( 0, 0, captureSize, captureSize, GL_RGB, GL_HALF_FLOAT, float16FRGB );
R_VerticalFlipRGB16F( float16FRGB, captureSize, captureSize );
Framebuffer::Unbind();
#endif
buffers[ j ] = floatRGB16F;
}

View file

@ -1279,14 +1279,10 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
// discard anything currently on the list (this triggers SwapBuffers)
tr.SwapCommandBuffers( NULL, NULL, NULL, NULL, NULL, NULL );
#if defined( USE_VULKAN )
// TODO
#elif defined( USE_NVRHI )
// make sure that all frames have finished rendering
//deviceManager->GetDevice()->waitForIdle();
byte* floatRGB16F = NULL;
#if 0
// this probe fails in game/admin.map
if( a == 5 && tr.lightGridJobs.Num() == 17 && side == 4 )
@ -1308,25 +1304,6 @@ CONSOLE_COMMAND( bakeLightGrids, "Bake irradiance/vis light grid data", NULL )
}
#endif
#else
int pix = captureSize * captureSize;
const int bufferSize = pix * 3 * 2;
byte* floatRGB16F = ( byte* )R_StaticAlloc( bufferSize );
glFinish();
glReadBuffer( GL_BACK );
globalFramebuffers.envprobeFBO->Bind();
glPixelStorei( GL_PACK_ROW_LENGTH, ENVPROBE_CAPTURE_SIZE );
glReadPixels( 0, 0, captureSize, captureSize, GL_RGB, GL_HALF_FLOAT, float16FRGB );
R_VerticalFlipRGB16F( float16FRGB, captureSize, captureSize );
Framebuffer::Unbind();
#endif
jobParms->radiance[ side ] = floatRGB16F;
}

View file

@ -3,7 +3,7 @@
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
Copyright (C) 2013-2014 Robert Beckebans
Copyright (C) 2013-2023 Robert Beckebans
Copyright (C) 2022 Stephen Pridham
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
@ -49,10 +49,8 @@ If you have questions concerning this license or the applicable additional terms
#include "rc/doom_resource.h"
#include "../../renderer/RenderCommon.h"
#if defined( USE_NVRHI )
#include <sys/DeviceManager.h>
extern DeviceManager* deviceManager;
#endif
#include <sys/DeviceManager.h>
extern DeviceManager* deviceManager;