fixed unused variable warning in Prepass::ProcessShader

This commit is contained in:
myT 2024-01-21 03:27:18 +01:00
parent 03ba418296
commit 197e01a177

View file

@ -159,14 +159,15 @@ void Prepass::ProcessShader(shader_t& shader)
}
const bool clampDepth = r_depthClamp->integer != 0 || shader.isSky;
const shaderStage_t& stage = *shader.stages[0];
const unsigned int stateBits = stage.stateBits & (~GLS_POLYMODE_LINE);
int a = 0;
#if defined(DEBUG)
const shaderStage_t& stage = *shader.stages[0];
const unsigned int stateBits = stage.stateBits & (~GLS_POLYMODE_LINE);
Q_assert((stateBits & GLS_DEPTHTEST_DISABLE) == 0); // depth test enabled
Q_assert((stateBits & GLS_DEPTHMASK_TRUE) != 0); // depth write enabled
Q_assert((stateBits & GLS_DEPTHFUNC_EQUAL) == 0); // depth comparison GE
#endif
// @NOTE: we are not using any CTOR because we deliberately want to 0-init the struct
// this is necessary for padding bytes not to mess up comparisons in the PSO cache