Mesh fallback: pass buffer capacities as root constants instead of GetDimensions #70
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ThatRecompDev--five-star-recomp!70
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-70"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@heresfilly09 on GitHub · 2026-11-27 23:43 UTC · original
heresfilly09:contrib/root-descriptor-caps→main· +53167 −2045 · 726 files · 584 commits · closed without mergingSummary
RWByteAddressBuffer.GetDimensions()returns 0 for root-descriptor-bound buffers on NVIDIA hardware, causing the allocation bounds check to drop every threadgroup — the mesh fallback draws nothingGetDimensionswith an explicitcbuffer MsfbCaps : register(b1, space9)carrying the vertex and index buffer byte sizes as two root constantsFallbackRootandFallbackTableroot signature pathsTest plan
UserDataBindingTests.Every_stage_reads_its_user_sgprs(Buffer)passes on RTX 3060 (previously 60 pixel mismatches, all 0x00BADBAD)UserDataBindingTests.Every_stage_reads_its_user_sgprs(UserConstants)passes on RTX 3060Fixes #9
@upipibi on GitHub · 2026-11-27 23:54 UTC · original
A problem outside the test harness, read at
93335f9againstmain2c16b3cand not run:The new
cbuffer MsfbCaps : register(b1, space9)(MeshComputeFallback.cs:96, read at:113) goes into every translated mesh fallback, but only the WARP harness's root signatures get a parameter for it (PipelineFactory.cs). The runtime builds its pipelines withBindlessRootSignature.Description("the root signature every translated program runs with",BindlessRootSignature.cs:9). The loader's shim does so atShims/D3D12X/Pipelines/BindlessRoot.cs:32, andPsoCommand.cs:93andDispatchReplay.cs:35do the same. That description has the user data at b0 and the fallback table (u0..u2, t0 in space 9) (BindlessRootSignature.cs:97-109), plus the launch parameters in space 10, and nothing at b1 space 9. A shader that reads a register its root signature does not declare fails pipeline creation, so with this change the real fallback pipelines would not build.The runtime also never binds the fallback through root descriptors. It sets the table (
CommandListBindingMethods.cs:1209,FallbackTableParameter), and #9 reports that the table variant (msfb_ngg_strips) draws correctly on the RTX 5070. TheGetDimensionsproblem is confined to the harness'sFallbackRootlayout (msfb_ngg_strips_rootdesc).Two narrower options:
GetDimensionsfor the table.BindlessRootSignatureand set them where the loader binds the table.A test that builds a fallback program against
BindlessRootSignature.Descriptionwould catch either way.AI-assisted (Claude Code, Claude Opus 5.5 read the PR and
main).93335f92abto96850549ae@heresfilly09 on GitHub · 2026-11-28 00:08 UTC · original · edited 2026-11-28 00:10 UTC
uuh ya thats true that the cbuffer would break pipeline creation against BindlessRootSignature since it has no b1 space 9.
Updated to option (a):
MeshComputeFallback.Rewritenow takes anexplicitCapsparameter (default false). The test harness passestruefor the root-descriptor variant so the generated shader reads fromcbuffer MsfbCapsinstead ofGetDimensions; the default keepsGetDimensions, so the runtime's root signature and table-bound path are unchanged.Both
UserDataBinding.BufferandUserDataBinding.UserConstantsstill pass on RTX 3060 hardware.@ThatRecompDev on GitHub · 2026-11-28 09:49 UTC · original
thanks for turning the review around so fast. it conflicts now because main already dropped the root-descriptor variant ("the table is the only binding, as the loader binds it"). nothing binds the fallback through root descriptors, and GetDimensions there is undefined on every vendor, not only NVIDIA.
I ran your branch anyway: both user-data rows and the table, rootdesc and overflow variants pass on WARP and on a 4090, and the runtime is untouched since both callers use the default. but rebased, explicitCaps would have no caller, and the default path's HLSL text changes a little, which rebuilds every fallback program for no gain. so I'd close this one unless you have a runtime path in mind that needs root descriptors.
Pull request closed