Skip to content

Vulkan: remove dead USE_FOG_ONLY compile-time branch#151

Draft
cursor[bot] wants to merge 1 commit intomainfrom
cursor/feature-flag-cleanup-730a
Draft

Vulkan: remove dead USE_FOG_ONLY compile-time branch#151
cursor[bot] wants to merge 1 commit intomainfrom
cursor/feature-flag-cleanup-730a

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 27, 2026

Summary

Removes the always-on compile-time USE_FOG_ONLY gate from the Vulkan renderer. The macro was unconditionally defined in tr_local.h with no build toggle, so the #else branches were dead code.

Flags removed

  • USE_FOG_ONLY (compile-time define in src/renderers/vulkan/tr_local.h)

Why it is safe to delete

  • The macro was always defined in Vulkan tr_local.h; CMake and other sources did not undefine or override it.
  • The removed #else path mixed vertex-color fog setup with Vulkan pipeline binding and was unreachable in any shipped configuration.
  • OpenGL renderer never used USE_FOG_ONLY; behavior there is unchanged.

Behavioral parity

  • Vulkan fog pass continues to use TYPE_FOG_ONLY pipelines, VK_SetFogParams, VK_DESC_FOG_ONLY, and the same draw path as before (previously the only live branch).
  • Build: ./scripts/compile_engine.sh vulkan (success).
  • Tests: ctest in build-vk-Release — all 19 tests passed (smoke, renderer regression, unit suite).
Open in Web View Automation 

USE_FOG_ONLY was unconditionally defined in tr_local.h with no CMake
toggle; the #else paths were unreachable. Keep the TYPE_FOG_ONLY fog
pass behavior and drop the macro and dead code.

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