Remove stale Vulkan renderer compile-time feature flags#274
Draft
cursor[bot] wants to merge 1 commit into
Draft
Conversation
- Drop dead non-PBR shader module init path (USE_VK_PBR #else) - Unwrap USE_VBO_GRID (always enabled with USE_VBO) - Remove disabled USE_TESS_NEEDS_* optimization plumbing 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 three classes of stale compile-time flags in the Vulkan renderer where the active path has been fully rolled out for years. No runtime cvar behavior changes.
Branch:
cursor/feature-flag-cleanup-03ad→mainFlags removed
USE_VK_PBR#elsebranch (vk_shader_modules.c)USE_VK_PBRis unconditionally#defined intr_local.h. The non-PBR shader module init path (~120 lines) was dead code; PBR generated shaders viavk_bind_generated_shaders()is the only live path.USE_VBO_GRIDifdefs (vk_vbo.c,tr_surface.c,tr_local.h)USE_VBOis on (also unconditional). Unwrapped#ifdefgates; grid VBO estimate/build path is the only compiled behavior.USE_TESS_NEEDS_NORMAL/USE_TESS_NEEDS_ST2(renderer tessellation)tr_local.h, so optimization gates were disabled. Removed deadDetectNeeds(),shader.needsNormal/needsST2, tess fields, and conditional copy guards. Parity: with flags off, normals/ST2 were always copied; that behavior is preserved.Behavioral parity checks
./scripts/compile_engine.sh vulkan core— full build succeeds;idtech3_vulkan.solinks cleanly./tests/scripts/test_vulkan_regression_source_guards.sh— PASS./scripts/smoke_test.sh— pre-existingq3_openarena_compat_check.shfailure (r_forwardPlusDepthCulldefault); unrelated to this diffFiles touched
renderers/vulkan/vk_shader_modules.crenderers/vulkan/vk_vbo.crenderers/vulkan/tr_surface.crenderers/vulkan/tr_local.hrenderers/vulkan/tr_shader.crenderers/vulkan/tr_shade.crenderers/vulkan/tr_main.crenderers/vulkan/tr_animation.cCandidates not changed (low confidence)
r_renderMode,r_forwardPlus,r_vbo,r_pbr,r_volumetricFog, RTX togglesUSE_VK_PBRifdef unwrapping acrossvk.h/ pipeline code (still used for optional PBR fields)r_allowSoftwareGL/r_glDriver(mod cfg compatibility)