Vulkan: remove dead USE_VK_PBR non-PBR shader module path#213
Draft
cursor[bot] wants to merge 1 commit into
Draft
Vulkan: remove dead USE_VK_PBR non-PBR shader module path#213cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
USE_VK_PBR is unconditionally defined in tr_local.h for the Vulkan renderer and is not a CMake toggle, so the #else path in vk_create_shader_modules never compiled. Remove the unused legacy module wiring and the redundant #ifndef int l guard. Co-authored-by: Tim Fox <timfox@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes compile-time branches in
vk_create_shader_modules()that could never run for the Vulkan renderer.Flags / compile toggles removed (as dead code)
USE_VK_PBRguarded#elseinvk_shader_modules.c— The non-PBR legacy shader module creation path. Insrc/renderers/vulkan/tr_local.h,USE_VK_PBRis always#defined for this renderer, and CMake does not expose a way to turn it off, so the#elseblock never compiled.#ifndef USE_VK_PBR/int l— Only existed for the unused#elseloop; removing it avoids a misleading “optional PBR” signal in this file.VK_PBR_BRDFLUTand otherUSE_VK_*/USE_VBOpreprocessor gates elsewhere are unchanged.Why this is safe
Behavior matches the only path that could ever execute before:
vk_bind_generated_shaders()after the shared fragment setup. No runtime cvars or gameplay paths were touched.Behavioral parity checks performed
./scripts/compile_engine.sh vulkan(Release) — succeeded.ctest --output-on-failureinbuild-vk-Release— all 26 tests passed (smoke, renderer regression scripts, unit tests).