Vulkan: remove dead USE_UPLOAD_QUEUE and non-reversed depth branches#163
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Vulkan: remove dead USE_UPLOAD_QUEUE and non-reversed depth branches#163cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
- USE_UPLOAD_QUEUE was never defined in CMake or headers; the guarded code referenced Vk_Instance fields that do not exist, so only the #else path could ever compile. Remove the dead branch and staging CB allocation. - Reversed Z is unconditional for this renderer (vk.h always defined USE_REVERSED_DEPTH). Remove the macro and fold #else branches in C and GLSL; shader script no longer injects -DUSE_REVERSED_DEPTH for standalone compiles. Regenerate embedded SPIR-V for atmosphere and OIT accum. Co-authored-by: Tim Fox <timfox@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleanup of compile-time toggles that were never meaningfully optional: one path was dead or always taken.
Flags / toggles removed
USE_UPLOAD_QUEUE#ifdefblocks could never compile the “upload queue” path; the#elsepath was the only real behavior. The guarded code also referencedVk_Instancemembers (staging_command_buffer,image_uploaded,rendering_finished2) that are not declared on the struct, so enabling the macro would not build without further work.USE_REVERSED_DEPTH#defined invk.hfor the Vulkan renderer, so every build used reversed Z. All#elsebranches (standard depth) were dead. GLSL foratmosphere.fragandoit_accum.fragwas always compiled with-DUSE_REVERSED_DEPTHviascripts/compile_shaders.sh.Behavioral parity
USE_UPLOAD_QUEUEwas undefined and whenUSE_REVERSED_DEPTHwas defined (reversed depth everywhere for Vulkan)../scripts/compile_engine.sh vulkansucceeds.ctestinbuild-vk-Release— all 19 tests passed (smoke, renderer regression, unit tests).shader_data.c,shader_build_meta.txt) after simplifying GLSL and the compile script.Files touched (high level)
vk_frame_submit.c,vk_init_device.c,vk_presentation.c, depth/viewport/pipeline/flare/projection helpers,vk.h,tr_main.c.atmosphere.frag,oit_accum.frag,scripts/compile_shaders.sh, regenerated SPIR-V blobs.