Skip to content

Vulkan: remove stale tess/grid compile-time feature gates#204

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-4346
Draft

Vulkan: remove stale tess/grid compile-time feature gates#204
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-4346

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 10, 2026

Summary

Cleanup of compile-time feature gates in the Vulkan renderer that were fully rolled out or never enabled, reducing dead branches and tess struct fields that could not be used in this configuration.

Flags / gates removed

Gate Why it is safe to delete
USE_VBO_GRID In tr_local.h, USE_VBO is always defined for Vulkan, and USE_VBO_GRID was always defined in that case. The #else paths (non-grid / alternate VBO_Flush only) were never compiled.
USE_TESS_NEEDS_NORMAL In Vulkan tr_local.h, the macro was commented out (not defined). The live build always took the “no tess.needsNormal guard” path; the guarded branch was dead.
USE_TESS_NEEDS_ST2 Same as above: never defined for Vulkan, so tess.needsST2 and conditional ST1 copying were dead. needsNormal / needsST2 members were removed from shaderCommands_t in the Vulkan header because they are unused after simplification.

Note: The OpenGL renderer is unchanged; it still uses its own tr_local.h and optional USE_TESS_NEEDS_NORMAL where applicable.

Behavioral parity

  • Full Release Vulkan build: ./scripts/compile_engine.sh vulkan (success).
  • ctest in build-vk-Release: 26/26 tests passed (smoke, renderer checks, unit tests, script validation).

Files touched

  • tr_local.h, vk_vbo.c, tr_surface.c, tr_shade.c, tr_main.c, tr_animation.c (Vulkan only).
Open in Web View Automation 

Remove USE_VBO_GRID and USE_TESS_NEEDS_* preprocessor branches from the
Vulkan renderer. These macros were either unconditionally enabled (grid
in VBO whenever USE_VBO) or never enabled (tess normal/ST2 commented out in
tr_local.h), so the active code path matches the previous build.

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