Skip to content

Vulkan: remove dead USE_TESS_NEEDS_* compile-time gates#211

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/obsolete-feature-flags-9490
Draft

Vulkan: remove dead USE_TESS_NEEDS_* compile-time gates#211
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/obsolete-feature-flags-9490

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 15, 2026

Summary

Removes stale compile-time feature gates (USE_TESS_NEEDS_NORMAL, USE_TESS_NEEDS_ST2) from the Vulkan renderer. Those macros were never defined in src/renderers/vulkan/tr_local.h, so the preprocessor already eliminated tess.needsNormal / tess.needsST2 and all related assignments; the remaining #ifdef scaffolding only obscured the fact that the tessellation path was unconditionally active.

Flags removed

Flag / plumbing Why safe to delete
USE_TESS_NEEDS_NORMAL (Vulkan) Never #defined for Vulkan; if (tess.needsNormal) was not emitted—bodies always ran. No shaderCommands_t fields in the Vulkan build.
USE_TESS_NEEDS_ST2 (Vulkan) Same as above for tess.needsST2.
Commented //#define USE_TESS_NEEDS_* in Vulkan tr_local.h Dead documentation; OpenGL continues to define these in its own tr_local.h when the optional path is used.

Not changed: OpenGL renderer (src/renderers/opengl/tr_local.h and sources) still defines USE_TESS_NEEDS_NORMAL and keeps the conditional fast path where applicable.

Behavioral parity

  • ./scripts/compile_engine.sh vulkan (Release): success
  • ctest in build-vk-Release (26 tests including renderer_regression_check, test_vulkan_regression_source_guards, smoke): all passed

Effective runtime behavior for Vulkan matches the pre-change build (always-on normal / second texcoord handling for the unwrapped sites).

Open in Web View Automation 

The Vulkan renderer never defined USE_TESS_NEEDS_NORMAL or USE_TESS_NEEDS_ST2
in tr_local.h, so tess.needsNormal/needsST2 were absent and all guarded
assignments were stripped by the preprocessor. Remove the leftover ifdef
scaffolding and unused shaderCommands_t fields so the source matches the
effective always-on tessellation path. OpenGL keeps its optional fast path.

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant