From 7b275ebab6726e1c4b07afd5c4272b1bcae1bc32 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 5 May 2022 21:24:22 +0900 Subject: [PATCH] [vulkan] Don't update lights that don't exist However, the lighting pass still needs to be run in order to generate the solid color image. --- libs/video/renderer/vulkan/vulkan_lighting.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/video/renderer/vulkan/vulkan_lighting.c b/libs/video/renderer/vulkan/vulkan_lighting.c index f31322159..ce61d83c2 100644 --- a/libs/video/renderer/vulkan/vulkan_lighting.c +++ b/libs/video/renderer/vulkan/vulkan_lighting.c @@ -148,7 +148,9 @@ Vulkan_Lighting_Draw (qfv_renderframe_t *rFrame) if (!lctx->scene) { return; } - update_lights (ctx); + if (lctx->scene->lights) { + update_lights (ctx); + } __auto_type cframe = &ctx->frames.a[ctx->curFrame]; lightingframe_t *lframe = &lctx->frames.a[ctx->curFrame];