Repository navigation
Conversation
A replay pass used to set file-wide flags (s_sunShadowPass, s_sceneDepthPass, s_hdrScenePass, s_uiModelPass, s_singleSamplePass, s_replayCellFromWindow) for ReplayDrawCommand to find, and clear them after. A new pass had to know which distant state to set, and a missed reset leaked into the next pass. A ReplayPass value now carries what the draws need: which commands it draws, which pipeline twins its target takes (single-sample, HDR scene, UI models) and the matrix that moves each draw (the sun's view, a UI model's atlas cell). The passes build it and hand it down ReplayCommands and ReplayDrawCommand. Nothing drawn changes.
Keeps main's skip of every draw while the frame's vertices are not staged, with this branch's ReplayDrawCommand signature.
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.
What was wrong
Each replay pass in
MuRendererSDLGpu.cpptoldReplayDrawCommandwhat it was by setting file-static flags and clearing them afterwards:s_sunShadowPass,s_sceneDepthPass,s_hdrScenePass,s_uiModelPass,s_singleSamplePassands_replayCellFromWindow. Every draw then read those flags to pick its pipeline twins, the matrix that moves it, and its fragment uniforms. Adding a pass meant knowing which of these distant flags to set and to reset. A missed reset would leak into the next pass, ands_hdrScenePassstayed set across several passes and helpers. An independent audit of the renderer named this the main extensibility cost of the replay code. Planned passes, such as a shared scene depth for fog and screen-space effects, would each have added one more flag.What changed
ReplayPassvalue carries what the draws need:ReplaySelection, now at file scope);ReplayCommandsandReplayDrawCommand.SceneMultisampleTexturetakes the HDR choice as an argument instead of reading the flag.Testing
test_pipeline_fail_fast.cmake. A separate reviewer checked every former set/clear site against the new pass values, with no behaviour change found.🤖 Generated with Claude Code