Skip to content

Vulkan: remove stale compile-time flags and noop GL cvars#245

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

Vulkan: remove stale compile-time flags and noop GL cvars#245
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-48d0

Conversation

@cursor

@cursor cursor Bot commented Jun 7, 2026

Copy link
Copy Markdown

Flags removed

Flag / cvar Why safe
USE_VBO_GRID compile gate Always defined via USE_VBO in tr_local.h; grid-in-VBO path is the only compiled path
USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2 Commented out in tr_local.h; guards were no-ops — normals/ST2 are always copied
USE_VK_PBR #else in vk_shader_modules.c USE_VK_PBR is unconditional; dead manual non-PBR module binding (~118 lines)
r_allowExtensions, r_ext_compressed_textures, r_ext_compiled_vertex_array Only referenced by dead R_InitExtensions behind #ifndef USE_VULKAN (never compiled in Vulkan renderer)

Not removed (blocked)

  • r_renderMode — actively drives Forward+/deferred latch (tr_render_mode_vk.c); regression checks depend on it
  • r_pbr — runtime toggle; non-PBR SPIR-V variants still used when r_pbr 0
  • r_allowSoftwareGL / r_glDriver — still referenced in platform GL init (sdl_glimp.c)

Behavioral parity checks

  • ./scripts/compile_engine.sh vulkan — clean build
  • ./scripts/renderer_regression_check.sh — 129/129 passed
  • ./scripts/q3_openarena_compat_check.sh — passed
  • ./tests/scripts/test_vulkan_regression_source_guards.sh — passed
  • ctest -R unit_ — all unit tests passed

Note: test_openworld / test_openworld_runtime fail on this branch pre-existing (sector BSP fixture); unrelated to this cleanup.

Open in Web View Automation 

- Drop USE_VBO_GRID / USE_TESS_NEEDS_* preprocessor gates (always-on or
  never-enabled in tr_local.h); active tessellation path unchanged.
- Remove dead non-PBR #else branch in vk_shader_modules.c (USE_VK_PBR is
  unconditional; generated shader_binding.c is the only init path).
- Stop registering r_allowExtensions, r_ext_compressed_textures, and
  r_ext_compiled_vertex_array on Vulkan builds (only read by dead
  R_InitExtensions behind #ifndef USE_VULKAN).

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