Vulkan: remove stale compile-time feature flags and dead branches - #294
Draft
cursor[bot] wants to merge 1 commit into
Draft
Vulkan: remove stale compile-time feature flags and dead branches#294cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
- USE_VBO_GRID: never defined (SF_GRID deliberately off VBO path per tr_local.h); remove dead grid VBO estimate/queue/pack paths in vk_vbo.c and tr_surface.c. - USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2: commented-out defines with no struct fields; remove preprocessor guards that only wrapped always-on paths. - USE_VK_PBR dead #else: unwrap non-PBR shader module init/destroy fallbacks in vk_shader_modules.c and vk_shutdown.c; flatten VK_CUBEMAP/VK_PBR_BRDFLUT nesting in tr_local.h; unwrap reactive/object-id storage descriptor (void)0 else stubs. - USE_DEDICATED_ALLOCATION: always defined in vk.h; drop redundant #ifndef override in vk_instance.c. Behavior unchanged on the active PBR/VBO/dedicated-allocation paths. 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 feature flags and dead
#elsebranches in the Vulkan renderer where rollout is complete and only one path could ever compile.Flags removed
USE_VBO_GRIDtr_local.hdocuments SF_GRID is deliberately off the static VBO path. Removed dead grid estimate/queue/pack code invk_vbo.candtr_surface.c.USE_TESS_NEEDS_NORMAL/USE_TESS_NEEDS_ST2tessstruct fields. Guards only wrapped always-on normal/ST2 copy paths.USE_VK_PBRdead#elseUSE_VK_PBRis unconditionally#defined intr_local.h. Removed non-PBR shader module init/destroy fallbacks invk_shader_modules.candvk_shutdown.c; flattenedVK_CUBEMAP/VK_PBR_BRDFLUTheader nesting; unwrapped reactive/object-id(void)0else stubs.USE_DEDICATED_ALLOCATIONdead#ifndefvk.h; removed redundant force-off override invk_instance.c.Stats: 11 files, 479 lines removed.
One-sided
#ifdef USE_VK_PBRguards (runtimevk.pbrActivegating) are intentionally retained.Test plan
tests/scripts/test_vulkan_regression_source_guards.shPASSUSE_VBO_GRID/USE_TESS_NEEDS/#ifndef USE_VK_PBR/#ifndef USE_DEDICATED_ALLOCATIONinrenderers/./scripts/smoke_test.sh ./build-vk-Release(CI)