Skip to content

chore(render): remove permanently-disabled renderer branches#161

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

chore(render): remove permanently-disabled renderer branches#161
cursor[bot] wants to merge 1 commit intomainfrom
cursor/feature-flag-cleanup-524b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 29, 2026

Summary

Removes dead conditional branches that were gated by if (0 && …) in Vulkan and OpenGL renderers. These were never reachable at runtime.

Flags removed

Not traditional named feature flags or cvars. Effective toggles removed:

Behavior Previous gate Notes
Lightmap intensity debug visualization (r_lightmap == 2 path in R_ProcessLightmap) if (0 && r_lightmap->integer == 2) Unreachable; active path was always the merge/legacy lightmap copy
Optional color buffer clear tied to r_fastsky in RB_BeginDrawingView if (0 && r_fastsky->integer && …) Unreachable
RB_DrawSun after draw-surfaces if (0 && r_drawSun->integer) Already documented as disabled

Cvars r_lightmap, r_fastsky, and r_drawSun remain registered for other code paths (e.g. flat sky, lightmap-only views).

Why this is safe

  • Every removed branch was compile-time false (0 && …), so execution always followed the else/fall-through that remains.
  • No change to map loading, shader selection, or sky/lightmap behavior that was actually running before.

Behavioral parity checks

  • ./scripts/compile_engine.sh vulkansuccess
  • ctest in build-vk-Release19/19 tests passed (smoke, renderer regression check, unit tests)

Candidates not changed (low confidence / out of scope)

  • CMake USE_* options (Opus, curl, optional codecs): still meaningful build toggles, not “rolled out.”
  • Renderer cvars such as r_forwardPlus: documented optional scaffolding, default off — removing would change supported behavior.
Open in Web View Automation 

Remove `if (0 && …)` dead code for lightmap debug visualization,
optional fastsky color clear in RB_BeginDrawingView, and RB_DrawSun
after surfaces (already commented as disabled). Behavior matches the
previous always-false conditionals.

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