Skip to content

Vulkan: remove dead USE_UPLOAD_QUEUE branches; trim redundant USE_FOG_ONLY guard#51

Draft
cursor[bot] wants to merge 2 commits intomainfrom
cursor/stale-feature-flag-cleanup-9f7c
Draft

Vulkan: remove dead USE_UPLOAD_QUEUE branches; trim redundant USE_FOG_ONLY guard#51
cursor[bot] wants to merge 2 commits intomainfrom
cursor/stale-feature-flag-cleanup-9f7c

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor bot commented Apr 7, 2026

Summary

Cleanup of compile-time “feature flag” branches that were never enabled in production builds.

Flags / toggles removed

  • USE_UPLOAD_QUEUE (compile-time): Removed all #ifdef USE_UPLOAD_QUEUE / #ifndef USE_UPLOAD_QUEUE branches and the associated staging helpers (vk_wait_staging_buffer, vk_flush_staging_buffer). This macro was not defined anywhere in CMake or engine headers, so the batched upload / extra submit path was dead code. The active path remains per-upload one-shot command buffers (vk_begin_command_buffer / vk_end_command_buffer), unchanged in behavior.

  • Redundant USE_FOG_ONLY guard in tr_local.h: USE_FOG_ONLY was already defined unconditionally; the nested #if defined(USE_VBO) && !defined(USE_FOG_ONLY) block was a no-op and was removed.

Why this is safe

  • USE_UPLOAD_QUEUE: Grep across the repo showed no definition; only #ifdef sites. Deleting the false branch preserves the code path that was actually compiled and linked today.
  • USE_FOG_ONLY: Removing a preprocessor block that could never change the effective define; no functional change.

Behavioral parity checks

  • Rebuilt Vulkan renderer target (idtech3_vulkan_x86).
  • Ran ctest in build-vk-Release: all 17 tests passed (smoke, renderer regression check, unit tests).

Commits

  1. refactor(vulkan): remove dead USE_UPLOAD_QUEUE compile branches
  2. chore(vulkan): drop redundant USE_FOG_ONLY preprocessor guard
Open in Web View Automation 

cursoragent and others added 2 commits April 7, 2026 10:24
USE_UPLOAD_QUEUE was never defined in CMake or headers, so the alternate
batched-staging upload path and related frame submit wiring were unreachable.
Keep the one-time command buffer upload path as the only implementation and
simplify vk_end_command_buffer submit (no optional semaphore wait).

Co-authored-by: Tim Fox <timfox@outlook.com>
USE_FOG_ONLY is always defined before the guard, so the nested #if was a no-op.

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