Repository navigation
Conversation
ubd_on was off whenever tbdr_on was, because TBDR mode reorders passes. Its reorderers never move a draw across an update (defer_try refuses an OP_UPDATE_UB in its window, fuse_try and the multi-draw scan stop at one, hoist_try moves only clear-only passes, the layer lookahead asks ubd_on), so with DM_NVN_TBDR=1 every inline update inside a pass ended it again for no reason. DM_NVN_UB_DEFER=0 still turns the deferral off; nothing changes by default (TBDR mode is off). New check_t_tbdr_ubd: production mtl_exec with DM_NVN_TBDR=1, closed-form pixels for in-pass, same-target continuation, deferred-pass and update-between cases. On main the pixels pass and 6 counter checks fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 3 tasks
fpedrolucas95
pushed a commit
to fpedrolucas95/nxnative
that referenced
this pull request
Nov 6, 2026
…in TBDR mode too (toward seedds#159)
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 and why
ubd_on()(inline uniform updates inside an open pass deferred to the pass end, the draws after them reading a shadow) was off whenevertbdr_on()was, "because TBDR mode reorders passes". So withDM_NVN_TBDR=1every inline update inside a pass ended it again, bringing back the passes and attachment traffic the deferral had removed (BotW about 158 → 386 passes), and the TBDR mode's own gain could not be measured on its own.TBDR mode's reorderers never move a draw across an update:
defer_tryrefuses anOP_UPDATE_UBbetween the deferred pass and its target pass or in the target pass before its first draw,fuse_trystops at one, the multi-draw scan (mdx_run) stops at one that writes a record it copied,hoist_trymoves only clear-only passes (they read no uniforms), and the layer lookahead already asksubd_on. A deferred pass replayed later reads the updates made before it, whether still deferred (shadows) or landed.ubd_ontherefore no longer depends ontbdr_on;DM_NVN_UB_DEFER=0still turns the deferral off. Nothing changes by default (TBDR mode is off). A step toward #159, alongside #1340 (store lookahead and bindless readers); the two are independent.Reference entry:
docs/reference/rendering.md, "Deferred uniform updates in TBDR mode".Checked
make -C dm/gfx/tests GAME=01007EF00011E000 check_t_tbdr_ubd(productionmtl_execwithDM_NVN_TBDR=1, a fragment shader returning a uniform buffer's firstfloat4, closed-form pixels): an update between two draws of one pass, one before a same-target continuation, one before a passdefer_trydefers into a later one, and one between that pass and its target pass (must not be deferred). Onmainthe pixels pass and the 6 counter checks fail (the updates end the passes); with the change 21/21. Negative control: withOP_UPDATE_UBtaken out ofdefer_try's refusals, the last case draws the later update's colour (64 pixels wrong).make -C dm/gfx/tests GAME=01007EF00011E000 run: every other target as onmain(t_border,t_transform_feedback,t_pso_archivefail in a checkout whose path has a space, dm/gfx/tests: three targets fail when the checkout path contains a space #1341;t_nvnaborts on both).tbdr_on()still off), soscripts/regress.pywas not run.Docs
docs/reference/rendering.mdentry (anddocs/env_switches.tsv), andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)🤖 Generated with Claude Code