Feature-flag cleanup: stale compile gates and OpenGL cvars#240
Draft
cursor[bot] wants to merge 4 commits into
Draft
Feature-flag cleanup: stale compile gates and OpenGL cvars#240cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
Remove USE_VBO_GRID and USE_TESS_NEEDS_* preprocessor branches from the Vulkan renderer. These macros were either unconditionally enabled (grid in VBO whenever USE_VBO) or never enabled (tess normal/ST2 commented out in tr_local.h), so the active code path matches the previous build. Co-authored-by: Tim Fox <timfox@outlook.com>
Vulkan tr_local.h always defined USE_VK_PBR and nested VK_CUBEMAP; flatten to unconditional defines. Same for USE_VBO -> USE_VBO_GRID. OpenGL always defined USE_VBO; define USE_VBO_GRID unconditionally. Behavior and compile-time symbols are unchanged; only dead #if nesting removed. Co-authored-by: Tim Fox <timfox@outlook.com>
Vulkan-only clients no longer register r_allowSoftwareGL or r_glDriver (USE_OPENGL_API). SDL GLimp only touches those cvars when OpenGL is compiled in. Replace obsolete "+set cl_renderer opengl" help text with Vulkan/SDL guidance and update the demo features cfg comment. Co-authored-by: Tim Fox <timfox@outlook.com>
USE_VK_PBR is unconditional in tr_local.h; drop the unreachable #else legacy shader module wiring in vk_shader_modules.c. Remove RENDERER_OPENGL gltf shader registration (OpenGL renderer removed from this fork). Behavior unchanged on Vulkan builds. 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.
Flags / gates removed
USE_VBO_GRID/USE_TESS_NEEDS_*#ifdefbranchesUSE_VBOis defined; tess normal/ST2 macros were commented out and never enabled#ifdef USE_VK_PBR/USE_VBOintr_local.h#definesr_allowSoftwareGL/r_glDriverclient registrationUSE_OPENGL_APIundefined); cvars only registered when OpenGL API is compiled in#elsenon-PBR path invk_shader_modules.cUSE_VK_PBRis always defined for Vulkan rendererRENDERER_OPENGLglTF shader registrationtr_model_gltf.cremainsNot removed (reviewed, kept)
r_renderMode— actively used by deferred G-buffer / Forward+ latch (tr_render_mode_vk.c,vk_deferred_gbuffer.c). Prior automation commit that removed it predates deferred work on this branch.r_forwardPlus,r_vbo,r_pbr, volumetric/RTX cvars, engine sprite cvars.Behavioral parity checks
./scripts/compile_engine.sh vulkan— clean buildctestinbuild-vk-Release— 32/32 passed./scripts/q3_openarena_compat_check.sh— passedCommits
Cherry-picked proven cleanups (
cf792697,92119e5e,18b7f37f) plus local removal of dead non-PBR shader init and OpenGL glTF path.