From 78f1fdf70e21806f0f72b80ead1e404bb1b8a45d Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 22 Oct 2024 22:17:11 +0200 Subject: [PATCH] Vulkan: Skip updating light LUTs if lighting is disabled entirely --- source/video_core/src/video_core/vulkan/renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/video_core/src/video_core/vulkan/renderer.cpp b/source/video_core/src/video_core/vulkan/renderer.cpp index 6396b2e..07bd5d0 100644 --- a/source/video_core/src/video_core/vulkan/renderer.cpp +++ b/source/video_core/src/video_core/vulkan/renderer.cpp @@ -1096,7 +1096,7 @@ void Renderer::FinalizeTriangleBatchInternal(Context& context, const VertexShade // Hit in steel diver on startup! // throw Mikage::Exceptions::Invalid("Inconsistent lighting configuration: Attempted to read disabled LUTs"); } - const uint32_t used_luts = context.registers.lighting.config.GetEnabledLUTMask(); + const uint32_t used_luts = context.registers.lighting.disabled() ? 0 : context.registers.lighting.config.GetEnabledLUTMask(); for (unsigned lut_index = 0; lut_index < 24; ++lut_index) { if (!(used_luts & (1 << lut_index))) {