Remove redundant renderer compile-time PBR/VBO preprocessor gates#216
Draft
cursor[bot] wants to merge 1 commit into
Draft
Remove redundant renderer compile-time PBR/VBO preprocessor gates#216cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
USE_VK_PBR, VK_CUBEMAP, and cubemap size macros were unconditionally enabled via nested #ifdef blocks in vulkan tr_local.h. USE_VBO_GRID was nested under USE_VBO while USE_VBO is always defined for both renderers. Flatten to equivalent #defines so the active build path is unchanged and the obsolete toggle scaffolding is removed. 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 obsolete nested
#ifdefscaffolding around macros that are always defined for the shipped Vulkan and OpenGL renderer configurations. No runtime cvars or gameplay behavior change.Flags / gates removed
#ifdef USE_VK_PBR/#ifdef VK_CUBEMAPsrc/renderers/vulkan/tr_local.hUSE_VK_PBRis unconditionally#defined immediately before the block; inner macros (VK_PBR_BRDFLUT,VK_CUBEMAP, cubemap size constants) were always emitted. Same effective preprocessor state for all Vulkan renderer translation units.#ifdef USE_VBOaroundUSE_VBO_GRIDsrc/renderers/vulkan/tr_local.h,src/renderers/opengl/tr_local.hUSE_VBOis always defined in both headers;USE_VBO_GRIDwas always active. OpenGL:USE_VBO_GRIDmoved next toUSE_VBObefore includes so order stays valid.Behavioral parity checks
./scripts/compile_engine.sh vulkan(Release): succeeded.ctest --output-on-failureinbuild-vk-Release: all 26 tests passed (smoke, renderer regression scripts, unit tests).Notes / non-candidates
USE_*options (e.g.USE_LUA,USE_VULKAN_RTX) were not touched; disabling those still has real product meaning.#ifdef USE_VK_PBR/#ifdef USE_VBO_GRIDacross.cfiles was out of scope: those guards still document optional paths (e.g.vk_shader_modules.cnon-PBR branch) and would be a large, higher-risk refactor.