Remove stale USE_TESS_NEEDS_* compile gates and dead shader needs* paths#210
Draft
cursor[bot] wants to merge 1 commit into
Draft
Remove stale USE_TESS_NEEDS_* compile gates and dead shader needs* paths#210cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
… Vulkan Vulkan never defined USE_TESS_NEEDS_NORMAL or USE_TESS_NEEDS_ST2, so all guarded branches behaved as always-on. OpenGL never defined USE_TESS_NEEDS_ST2 (lightmap texcoord path was unconditional at compile time). - Vulkan: drop tess/shader needs* fields, RB_BeginSurface propagation, DetectNeeds(), and redundant #ifdef/if wrappers. - OpenGL: drop needsST2 from shader/tess, ST2-only DetectNeeds branch, and matching surface/VBO/shade wrappers; keep USE_TESS_NEEDS_NORMAL path. Build: compile_engine.sh opengl + vulkan; ctest in build-vk-Release (26/26). 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
USE_TESS_NEEDS_NORMAL/USE_TESS_NEEDS_ST2scaffolding that no longer toggled real behavior: Vulkan never defined these macros (guarded code was dead), and OpenGL never definedUSE_TESS_NEEDS_ST2(lightmap secondary coords were already effectively always-on at compile time).Flags / toggles removed
USE_TESS_NEEDS_NORMAL/USE_TESS_NEEDS_ST2(Vulkantr_local.h)#ifdefbranches resolved to the unconditional “always gather normals / ST2” path.shader.needsST2+tess.needsST2(OpenGL)USE_TESS_NEEDS_ST2was never defined;DetectNeedsstill setneedsST2but tessellation never consulted it.DetectNeeds()(Vulkan)shader.needsNormal/needsST2were unused after tess fields were compile-gated off; removing avoids dead writes.DetectNeedslightmap branchTCGEN_LIGHTMAPon either bundle).Behavioral parity
./scripts/compile_engine.sh opengland./scripts/compile_engine.sh vulkan(Release) completed successfully.ctestinbuild-vk-Release— 26/26 passed (smoke, renderer regression scripts, unit tests).Files touched (high level)
tr_local.h,tr_shader.c,tr_surface.c,tr_shade.c,tr_main.c,tr_animation.c,vk_vbo.ctr_local.h,tr_shader.c,tr_surface.c,tr_vbo.c,tr_shade.c