diff --git a/neo/d3xp/PlayerView.cpp b/neo/d3xp/PlayerView.cpp index cda1d294..7d781662 100644 --- a/neo/d3xp/PlayerView.cpp +++ b/neo/d3xp/PlayerView.cpp @@ -1947,6 +1947,9 @@ void FullscreenFXManager::Process( const renderView_t* view ) return; } +// RB: skip for now so the game is playable. These old effects really suck with modern APIs +#if !defined( USE_NVRHI ) + // do the process for( int i = 0; i < fx.Num(); i++ ) { @@ -1988,6 +1991,7 @@ void FullscreenFXManager::Process( const renderView_t* view ) Blendback( pfx->GetFadeAlpha() ); } } +#endif } diff --git a/neo/renderer/GuiModel.cpp b/neo/renderer/GuiModel.cpp index f4e7896a..ba31ea74 100644 --- a/neo/renderer/GuiModel.cpp +++ b/neo/renderer/GuiModel.cpp @@ -89,8 +89,8 @@ idGuiModel::BeginFrame */ void idGuiModel::BeginFrame( nvrhi::ICommandList* commandList ) { - vertexBlock = vertexCache.AllocVertex( NULL, MAX_VERTS, sizeof( idDrawVert ), commandList ); - indexBlock = vertexCache.AllocIndex( NULL, MAX_INDEXES, sizeof( idTriList ), commandList ); + vertexBlock = vertexCache.AllocVertex( NULL, MAX_VERTS ); + indexBlock = vertexCache.AllocIndex( NULL, MAX_INDEXES ); vertexPointer = ( idDrawVert* )vertexCache.MappedVertexBuffer( vertexBlock ); indexPointer = ( triIndex_t* )vertexCache.MappedIndexBuffer( indexBlock ); numVerts = 0; diff --git a/neo/renderer/ModelDecal.cpp b/neo/renderer/ModelDecal.cpp index 21631198..39e8eeb7 100644 --- a/neo/renderer/ModelDecal.cpp +++ b/neo/renderer/ModelDecal.cpp @@ -812,8 +812,8 @@ drawSurf_t* idRenderModelDecal::CreateDecalDrawSurf( const viewEntity_t* space, newTri->numVerts = maxVerts; newTri->numIndexes = maxIndexes; - newTri->ambientCache = vertexCache.AllocVertex( NULL, maxVerts, sizeof( idDrawVert ), nullptr ); - newTri->indexCache = vertexCache.AllocIndex( NULL, maxIndexes, sizeof( triIndex_t ), nullptr ); + newTri->ambientCache = vertexCache.AllocVertex( NULL, maxVerts ); + newTri->indexCache = vertexCache.AllocIndex( NULL, maxIndexes ); idDrawVert* mappedVerts = ( idDrawVert* )vertexCache.MappedVertexBuffer( newTri->ambientCache ); triIndex_t* mappedIndexes = ( triIndex_t* )vertexCache.MappedIndexBuffer( newTri->indexCache ); diff --git a/neo/renderer/ModelOverlay.cpp b/neo/renderer/ModelOverlay.cpp index a8610762..3439f63e 100644 --- a/neo/renderer/ModelOverlay.cpp +++ b/neo/renderer/ModelOverlay.cpp @@ -706,8 +706,8 @@ drawSurf_t* idRenderModelOverlay::CreateOverlayDrawSurf( const viewEntity_t* spa srfTriangles_t* newTri = ( srfTriangles_t* )R_ClearedFrameAlloc( sizeof( *newTri ), FRAME_ALLOC_SURFACE_TRIANGLES ); newTri->staticModelWithJoints = ( staticModel->jointsInverted != NULL ) ? const_cast< idRenderModelStatic* >( staticModel ) : NULL; // allow GPU skinning - newTri->ambientCache = vertexCache.AllocVertex( NULL, maxVerts, sizeof( idDrawVert ), nullptr ); - newTri->indexCache = vertexCache.AllocIndex( NULL, maxIndexes, sizeof( idDrawVert ), nullptr ); + newTri->ambientCache = vertexCache.AllocVertex( NULL, maxVerts ); + newTri->indexCache = vertexCache.AllocIndex( NULL, maxIndexes ); idDrawVert* mappedVerts = ( idDrawVert* )vertexCache.MappedVertexBuffer( newTri->ambientCache ); triIndex_t* mappedIndexes = ( triIndex_t* )vertexCache.MappedIndexBuffer( newTri->indexCache ); diff --git a/neo/renderer/NVRHI/RenderDebug_NVRHI.cpp b/neo/renderer/NVRHI/RenderDebug_NVRHI.cpp index dc33dd5e..83ab5886 100644 --- a/neo/renderer/NVRHI/RenderDebug_NVRHI.cpp +++ b/neo/renderer/NVRHI/RenderDebug_NVRHI.cpp @@ -2001,7 +2001,7 @@ void idRenderBackend::DBG_TestImage() float scale[16] = { 0 }; scale[0] = w; // scale - scale[5] = -h; // scale + scale[5] = h; // scale scale[12] = halfScreenWidth - ( halfScreenWidth * w ); // translate scale[13] = halfScreenHeight - ( halfScreenHeight * h ); // translate scale[10] = 1.0f; diff --git a/neo/renderer/RenderBackend.cpp b/neo/renderer/RenderBackend.cpp index e085451c..f888027a 100644 --- a/neo/renderer/RenderBackend.cpp +++ b/neo/renderer/RenderBackend.cpp @@ -6234,12 +6234,17 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste // resolve the screen #if defined( USE_NVRHI ) + + renderLog.OpenBlock( "Blit to _currentRender" ); + BlitParameters blitParms; nvrhi::IFramebuffer* currentFB = ( nvrhi::IFramebuffer* )currentFrameBuffer->GetApiObject(); blitParms.sourceTexture = currentFB->getDesc().colorAttachments[0].texture; - blitParms.targetFramebuffer = globalFramebuffers.postProcFBO->GetApiObject(); - blitParms.targetViewport = nvrhi::Viewport( renderSystem->GetWidth(), renderSystem->GetHeight() );; + blitParms.targetFramebuffer = globalFramebuffers.postProcFBO->GetApiObject(); // _currentRender image + blitParms.targetViewport = nvrhi::Viewport( renderSystem->GetWidth(), renderSystem->GetHeight() ); commonPasses.BlitTexture( commandList, blitParms, &bindingCache ); + + renderLog.CloseBlock(); #else globalImages->currentRenderImage->CopyFramebuffer( x, y, w, h ); #endif