Skip to content

Remove stale Vulkan compile-time feature flags (USE_VK_PBR #else, USE_VBO_GRID, USE_TESS_NEEDS)#291

Draft
cursor[bot] wants to merge 7 commits into
mainfrom
cursor/feature-flag-cleanup-08d2
Draft

Remove stale Vulkan compile-time feature flags (USE_VK_PBR #else, USE_VBO_GRID, USE_TESS_NEEDS)#291
cursor[bot] wants to merge 7 commits into
mainfrom
cursor/feature-flag-cleanup-08d2

Conversation

@cursor

@cursor cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Removes dead compile-time feature-flag branches in the Vulkan renderer that are unconditionally enabled and no longer toggle behavior.

Branch: cursor/feature-flag-cleanup-08d2main

Flags removed

Flag Why safe to delete
USE_VBO_GRID Never defined in CMake or headers; grid VBO path is always compiled
USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2 Never defined; tessellation attribute paths are always on
USE_VK_PBR #else dead branches USE_VK_PBR is unconditionally #defined in tr_local.h; all #else paths were unreachable no-ops or stubs
Nested USE_VK_PBRVK_CUBEMAP / VK_PBR_BRDFLUT header guards Flattened to always-on defines (same effective build)
Reactive mask (void)0 else Forward+ storage descriptor update is always compiled when PBR is on

20 files changed, ~718 lines removed (no behavioral change on the active path).

Test plan

  • ./tests/scripts/test_vulkan_regression_source_guards.sh — PASS
  • Verified zero remaining USE_VBO_GRID, USE_TESS_NEEDS_*, or #ifndef USE_VK_PBR in renderers/
  • ./scripts/smoke_test.sh ./build-vk-Release (headless CI cannot run client; server/binary checks recommended)
  • Manifest unchanged (no CMake gate changes)
Open in Web View Automation 

cursoragent and others added 7 commits July 21, 2026 10:10
…_VBO_GRID, USE_TESS_NEEDS)

- Delete dead non-PBR shader init and teardown paths (USE_VK_PBR always on)
- Unwrap USE_VBO_GRID grid-VBO paths; drop orphaned macro
- Remove disabled USE_TESS_NEEDS_NORMAL/ST2 guards and tess plumbing
- Pin VERTEXSIZE to 11 (PBR vertex layout)

Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
Remove non-PBR fallback code paths that cannot compile: USE_VK_PBR is
unconditionally defined in tr_local.h. Keeps PBR vertex bindings (10),
descriptor set count (20), shader module tables, pipeline factory switch,
and material paint vertex color offsets (VERTEXSIZE 11 layout).

Co-authored-by: Tim Fox <timfox@outlook.com>
Unwrap the non-PBR shader file path fallback now that USE_VK_PBR is
always defined for the Vulkan renderer.

Co-authored-by: Tim Fox <timfox@outlook.com>
…aths

Unwrap always-on Forward+ reactive-mask descriptor updates and the
deferred-export use_pbr guard now that USE_VK_PBR is unconditionally defined.

Co-authored-by: Tim Fox <timfox@outlook.com>
USE_VBO_GRID is no longer defined anywhere; grid VBO reset is always-on.

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