EEVEE-Next: Fix uninitialized closure_bits_

This commit is contained in:
Clément Foucault
2023-07-12 18:18:28 +02:00
parent 7f04df62e4
commit a635f8bbf7
3 changed files with 4 additions and 1 deletions

View File

@@ -398,6 +398,8 @@ void DeferredLayer::begin_sync()
gbuffer_single_sided_ps_ = &gbuffer_ps_.sub("SingleSided");
gbuffer_single_sided_ps_->state_set(state | DRW_STATE_CULL_BACK);
}
closure_bits_ = CLOSURE_NONE;
}
void DeferredLayer::end_sync()

View File

@@ -162,7 +162,7 @@ class DeferredLayer {
PassSimple eval_light_ps_ = {"EvalLights"};
/* Closures bits from the materials in this pass. */
eClosureBits closure_bits_;
eClosureBits closure_bits_ = CLOSURE_NONE;
/**
* Accumulation textures for all stages of lighting evaluation (Light, SSR, SSSS, SSGI ...).

View File

@@ -966,6 +966,7 @@ BLI_STATIC_ASSERT_ALIGN(HiZData, 16)
* \{ */
enum eClosureBits : uint32_t {
CLOSURE_NONE = 0u,
/** NOTE: These are used as stencil bits. So we are limited to 8bits. */
CLOSURE_DIFFUSE = (1u << 0u),
CLOSURE_SSS = (1u << 1u),