Skip to content

Remove stale r_renderMode and dead non-PBR shader init#228

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

Remove stale r_renderMode and dead non-PBR shader init#228
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-2d61

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 28, 2026

Flags removed

Flag / branch Why safe to delete
r_renderMode Registered in tr_init.c but never read anywhere in the codebase. Values 1 (deferred) and 2 (Forward+) were documented placeholders with no implementation. Forward+ is controlled by r_forwardPlus (default 1).
Non-PBR #else in vk_shader_modules.c USE_VK_PBR is unconditionally #defined in src/renderers/vulkan/tr_local.h for all Vulkan builds, so the legacy manual shader-module init path was unreachable dead code.

Documentation

  • Updated docs that still described r_forwardPlus default 0 or referenced r_renderMode (RENDERERS, ARCHITECTURE, QUICKSTART, RENDERER_2026_ARCHITECTURE_PASS, VULKAN_FBO_AUDIT, TODO_TRIAGE).
  • CHANGELOG entry under ### Removed.

Behavioral parity checks

  • ./scripts/compile_engine.sh vulkanpass (Vulkan renderer links cleanly).
  • ./scripts/q3_openarena_compat_check.sh — new checks pass: r_renderMode absent, r_forwardPlus default 1; pre-existing failures (no release binaries in CI snapshot, cs_autoInit) unchanged.

Not changed (candidates / blockers)

  • r_firstPersonFovEnabled / r_firstPersonScaleEnabled: 0 still disables FOV/scale override while keeping numeric cvars — intentional compat.
  • cl_*Enabled gameframe toggles, g_ecsMotion: valid runtime off switches for demo/debug.
  • r_pbr vs compile-time USE_VK_PBR: runtime disable still supported.
  • USE_VULKAN_RTX: CMake option remains OFF by default; RT path not production-complete.
Open in Web View Automation 

- Drop r_renderMode cvar (never read; modes 1/2 were placeholders)
- Remove unreachable #else branch in vk_shader_modules.c (USE_VK_PBR always on)
- Align docs with r_forwardPlus default 1; extend compat check

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