diff --git a/src/renderers/opengl/tr_bsp.c b/src/renderers/opengl/tr_bsp.c index 34a097de7..83d8cd4c7 100644 --- a/src/renderers/opengl/tr_bsp.c +++ b/src/renderers/opengl/tr_bsp.c @@ -1567,15 +1567,11 @@ static void R_LoadSurfaces( const lump_t *surfs, const lump_t *verts, const lump } } -#ifdef PATCH_STITCHING R_StitchAllPatches(); -#endif R_FixSharedVertexLodError(); -#ifdef PATCH_STITCHING R_MovePatchSurfacesToHunk(); -#endif ri.Printf( PRINT_ALL, "...loaded %d faces, %i meshes, %i trisurfs, %i flares\n", numFaces, numMeshes, numTriSurfs, numFlares ); diff --git a/src/renderers/opengl/tr_curve.c b/src/renderers/opengl/tr_curve.c index 249acf6f4..ee0020950 100644 --- a/src/renderers/opengl/tr_curve.c +++ b/src/renderers/opengl/tr_curve.c @@ -292,7 +292,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height, // copy the results out to a grid size = (width * height - 1) * sizeof( drawVert_t ) + sizeof( *grid ); -#ifdef PATCH_STITCHING grid = /*ri.Hunk_Alloc*/ ri.Malloc( size ); Com_Memset(grid, 0, size); @@ -301,16 +300,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height, grid->heightLodError = /*ri.Hunk_Alloc*/ ri.Malloc( height * 4 ); Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 ); -#else - grid = ri.Hunk_Alloc( size ); - Com_Memset(grid, 0, size); - - grid->widthLodError = ri.Hunk_Alloc( width * 4 ); - Com_Memcpy( grid->widthLodError, errorTable[0], width * 4 ); - - grid->heightLodError = ri.Hunk_Alloc( height * 4 ); - Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 ); -#endif grid->width = width; grid->height = height; diff --git a/src/renderers/opengl/tr_local.h b/src/renderers/opengl/tr_local.h index c2fd5aea2..915dbc35f 100644 --- a/src/renderers/opengl/tr_local.h +++ b/src/renderers/opengl/tr_local.h @@ -1674,8 +1674,6 @@ CURVE TESSELATION ============================================================ */ -#define PATCH_STITCHING - srfGridMesh_t *R_SubdividePatchToGrid( int width, int height, drawVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] ); srfGridMesh_t *R_GridInsertColumn( srfGridMesh_t *grid, int column, int row, vec3_t point, float loderror ); diff --git a/src/renderers/vulkan/tr_bsp.c b/src/renderers/vulkan/tr_bsp.c index 1b1cd01d3..f82dd485a 100644 --- a/src/renderers/vulkan/tr_bsp.c +++ b/src/renderers/vulkan/tr_bsp.c @@ -1771,15 +1771,11 @@ static void R_LoadSurfaces( const lump_t *surfs, const lump_t *verts, const lump } } -#ifdef PATCH_STITCHING R_StitchAllPatches(); -#endif R_FixSharedVertexLodError(); -#ifdef PATCH_STITCHING R_MovePatchSurfacesToHunk(); -#endif ri.Printf( PRINT_ALL, "...loaded %d faces, %i meshes, %i trisurfs, %i flares\n", numFaces, numMeshes, numTriSurfs, numFlares ); diff --git a/src/renderers/vulkan/tr_curve.c b/src/renderers/vulkan/tr_curve.c index 8df21d61d..ea00e33d4 100644 --- a/src/renderers/vulkan/tr_curve.c +++ b/src/renderers/vulkan/tr_curve.c @@ -425,7 +425,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height, // copy the results out to a grid size = (width * height - 1) * sizeof( srfVert_t ) + sizeof( *grid ); -#ifdef PATCH_STITCHING grid = /*ri.Hunk_Alloc*/ ri.Malloc( size ); Com_Memset(grid, 0, size); @@ -434,16 +433,6 @@ static srfGridMesh_t *R_CreateSurfaceGridMesh(int width, int height, grid->heightLodError = /*ri.Hunk_Alloc*/ ri.Malloc( height * 4 ); Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 ); -#else - grid = ri.Hunk_Alloc( size ); - Com_Memset(grid, 0, size); - - grid->widthLodError = ri.Hunk_Alloc( width * 4 ); - Com_Memcpy( grid->widthLodError, errorTable[0], width * 4 ); - - grid->heightLodError = ri.Hunk_Alloc( height * 4 ); - Com_Memcpy( grid->heightLodError, errorTable[1], height * 4 ); -#endif grid->width = width; grid->height = height; diff --git a/src/renderers/vulkan/tr_local.h b/src/renderers/vulkan/tr_local.h index a5879df5c..add6ddbcf 100644 --- a/src/renderers/vulkan/tr_local.h +++ b/src/renderers/vulkan/tr_local.h @@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif #define USE_VBO // store static world geometry in VBO -#define USE_FOG_COLLAPSE // not compatible with legacy dlights #define MAX_REAL_DLIGHTS (MAX_DLIGHTS*2) #define MAX_LITSURFS (MAX_DRAWSURFS) #define MAX_FLARES 256 @@ -2136,8 +2135,6 @@ CURVE TESSELATION ============================================================ */ -#define PATCH_STITCHING - srfGridMesh_t *R_SubdividePatchToGrid( int width, int height, srfVert_t points[MAX_PATCH_SIZE*MAX_PATCH_SIZE] ); srfGridMesh_t *R_GridInsertColumn( srfGridMesh_t *grid, int column, int row, vec3_t point, float loderror ); diff --git a/src/renderers/vulkan/tr_shade.c b/src/renderers/vulkan/tr_shade.c index e33e5fb98..5e087927b 100644 --- a/src/renderers/vulkan/tr_shade.c +++ b/src/renderers/vulkan/tr_shade.c @@ -1275,14 +1275,12 @@ static void RB_IterateStagesGeneric( const shaderCommands_t *input ) is_pbr_surface = qfalse; -#ifdef USE_FOG_COLLAPSE if ( fogCollapse ) { VK_SetFogParams( &uniform, &fog_stage ); VectorCopy( backEnd.or.viewOrigin, uniform.eyePos ); vk_update_descriptor( VK_DESC_FOG_COLLAPSE, tr.fogImage->descriptor ); pushUniform = qtrue; } else -#endif { fog_stage = 0; if ( tess_flags & TESS_VPOS ) { @@ -1943,9 +1941,7 @@ void RB_StageIteratorGeneric( void ) return; } -#ifdef USE_FOG_COLLAPSE fogCollapse = tess.fogNum && tess.shader->fogPass && tess.shader->fogCollapse; -#endif worldShOverride = ( r_shDebugView && r_shDebugView->integer == 3 ); // call shader function diff --git a/src/renderers/vulkan/tr_shader.c b/src/renderers/vulkan/tr_shader.c index 4662679c3..b02620e6b 100644 --- a/src/renderers/vulkan/tr_shader.c +++ b/src/renderers/vulkan/tr_shader.c @@ -4191,7 +4191,6 @@ static shader_t *FinishShader( void ) { #ifdef USE_VULKAN -#ifdef USE_FOG_COLLAPSE if ( vk.maxBoundDescriptorSets >= 6 && !(shader.contentFlags & CONTENTS_FOG) && shader.fogPass != FP_NONE ) { fogCollapse = qtrue; if ( stage == 1 ) { @@ -4243,7 +4242,6 @@ static shader_t *FinishShader( void ) { // if there is no fogs - assume that we can apply all color optimizations without any restrictions fogCollapse = qtrue; } -#endif shader.tessFlags = TESS_XYZ; @@ -4521,7 +4519,6 @@ static shader_t *FinishShader( void ) { } -#ifdef USE_FOG_COLLAPSE if ( fogCollapse && tr.numFogs > 0 ) { Vk_Pipeline_Def fog_def; Vk_Pipeline_Def fog_def_mirror; @@ -4552,7 +4549,6 @@ static shader_t *FinishShader( void ) { shader.fogCollapse = qtrue; } -#endif } } #endif // USE_VULKAN