Skip to content

Remove stale Vulkan compile-time flags and legacy OpenGL cvar plumbing#264

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/feature-flag-cleanup-1127
Draft

Remove stale Vulkan compile-time flags and legacy OpenGL cvar plumbing#264
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/feature-flag-cleanup-1127

Conversation

@cursor

@cursor cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

Flags removed

Flag / plumbing Why safe to delete
USE_VBO_GRID Always defined when USE_VBO is on (tr_local.h); grid surfaces always use the VBO path in production builds. Unwrapped #ifdef guards in vk_vbo.c and tr_surface.c.
USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2 Never defined (commented out in tr_local.h). Active path already always gathers normals and lightmap ST2; conditional branches were dead.
shader.needsNormal / shader.needsST2 + DetectNeeds() Write-only metadata only consumed by the removed tess gating path. Tessellation behavior unchanged.
r_allowSoftwareGL / r_glDriver Legacy OpenGL cvars marked ignored on Vulkan-only CMake builds. Gated behind USE_OPENGL_API so MSVC/OpenGL platform builds retain them; duplicate SDL registration removed.

Behavioral parity checks

  • ./scripts/compile_engine.sh vulkan — clean Release build
  • ctest -R test_vulkan_regression_source_guards — passed
  • ./scripts/smoke_test.sh — passed (includes q3_openarena_compat_check.sh)

Scope notes

Runtime toggles with real off-paths (r_forwardPlus, r_vbo, r_renderMode, RTX cvars, etc.) were intentionally left unchanged.

Open in Web View Automation 

cursoragent and others added 2 commits June 15, 2026 10:05
- Unwrap USE_VBO_GRID (always enabled with USE_VBO) in Vulkan renderer
- Remove dead USE_TESS_NEEDS_NORMAL/ST2 conditional branches (never defined)
- Gate r_allowSoftwareGL/r_glDriver behind USE_OPENGL_API (Vulkan-only builds)

Co-authored-by: Tim Fox <timfox@outlook.com>
These shader metadata fields were only consumed by the removed
USE_TESS_NEEDS_NORMAL/ST2 tess gating path. Tessellation now always
gathers normals and lightmap ST2 coordinates.

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