Remove stale tessellation compile flags (USE_TESS_NEEDS_*)#208
Draft
cursor[bot] wants to merge 1 commit into
Draft
Remove stale tessellation compile flags (USE_TESS_NEEDS_*)#208cursor[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 tessellation “feature flags” that were never enabled on Vulkan and partially dead on OpenGL, along with Vulkan-only dead shader metadata and
DetectNeeds()that only populated removed fields.Flags removed
USE_TESS_NEEDS_NORMAL/USE_TESS_NEEDS_ST2(commented-out#defines and all#ifdef/if (tess.needs*)wrappers)tr_local.h. The preprocessor already behaved as always copy normals and second texcoord set;tess.needsNormal/tess.needsST2were not struct members.shader.needsNormal,shader.needsST2,DetectNeeds(), andRB_BeginSurfaceassignments to removed tess fieldsDetectNeeds()only set fields that nothing consumed.USE_TESS_NEEDS_ST2(comment +tess.needsST2,shader.needsST2,DetectNeedslightmap branch, surface/VBO/shade wrappers)R_FindShaderpathsshader.needs*toggles.Preserved: OpenGL
USE_TESS_NEEDS_NORMALpath (macro remains defined); guardedif (tess.needsNormal)behavior unchanged.Behavioral parity
./scripts/compile_engine.sh vulkanand./scripts/compile_engine.sh opengl(both succeeded).ctest --output-on-failureinbuild-vk-Release— 26/26 passed (smoke, renderer regression check, artifact checks, script tests, unit tests).Files touched
Vulkan:
tr_local.h,tr_shade.c,tr_surface.c,tr_main.c,tr_animation.c,vk_vbo.c,tr_shader.cOpenGL:
tr_local.h,tr_shade.c,tr_surface.c,tr_vbo.c,tr_shader.c