switch from uniform to shader keys

This commit is contained in:
Ricardo Luís Vaz Silva 2024-10-06 19:54:37 -03:00 committed by Magnus Norddahl
commit 04ee3c335e
9 changed files with 94 additions and 90 deletions

View file

@ -38,6 +38,8 @@
#include "hw_clock.h"
#include "flatvertices.h"
#include "g_levellocals.h"
CVAR(Int, vk_submit_size, 1000, 0);
EXTERN_CVAR(Bool, r_skipmats)
@ -305,6 +307,9 @@ void VkRenderState::ApplyRenderPass(int dt)
pipelineKey.ShaderKey.GBufferPass = mRenderTarget.DrawBuffers > 1;
pipelineKey.ShaderKey.LightBlendMode = (level.info ? static_cast<int>(level.info->lightblendmode) : 0);
pipelineKey.ShaderKey.LightAttenuationMode = (level.info ? static_cast<int>(level.info->lightattenuationmode) : 0);
// Is this the one we already have?
bool inRenderPass = mCommandBuffer;
bool changingPipeline = (!inRenderPass) || (pipelineKey != mPipelineKey);