Reintroduce lm_max_updates

This commit is contained in:
RaveYard 2023-09-16 12:18:02 +02:00 committed by Christoph Oelckers
parent d4dae83cf4
commit 1cc0dec8dd
3 changed files with 6 additions and 3 deletions

View file

@ -12,8 +12,6 @@
#include <atomic>
EXTERN_CVAR(Int, lm_max_updates);
struct FColormap;
class IBuffer;
struct HWViewpointUniforms;

View file

@ -410,7 +410,7 @@ void VkLightmap::BlurBakeImage()
void VkLightmap::CopyBakeImageResult()
{
uint32_t pixels = 0;
lastSurfaceCount = 0;
std::set<int> seenPages;
std::vector<VkImageCopy> regions;
for (int i = 0, count = selectedSurfaces.Size(); i < count; i++)

View file

@ -11,6 +11,7 @@
#include "hw_drawlist.h"
EXTERN_CVAR(Bool, lm_always_update);
EXTERN_CVAR(Int, lm_max_updates);
enum EDrawMode
{
@ -213,6 +214,10 @@ struct HWDrawInfo
{
surface->needsUpdate = true;
}
else if (VisibleSurfaces.Size() >= lm_max_updates)
{
return;
}
if (surface->needsUpdate && !surface->portalIndex && !surface->bSky)
{