shader: derive mesh entry root inputs from the creation root signature #3446
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3446"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T09:32:13Z.
Part of #3416
What changes
walk_raw_graphics_rootfactors out the SGPR walk fromread_raw_graphics. Vertex and pixel stages start at s8 as before; the mesh stage starts at s16. Every parameter consumes its slots in signature order (table 1, constants N, root descriptor 2), then the resource heap SGPR.derive_mesh_root_mappingmaps descriptor tables, root constants and root SRVs visible to ALL or MESH, plus the directly indexed resource heap SGPR. Root CBVs and UAVs consume two slots each and stay unmapped. The sampler heap is not mapped for mesh.derive_mesh_root_mappingrefuses a guest root withDENY_MESH_SHADER_ROOT_ACCESSbefore any binding is derived (guest root denies mesh shader root access).compile_dxil: a new.mslayoutlineguest_rootderives the root inputs from the request's sibling serialized 1.1.root. It is refused when repeated (duplicate guest_root) and when combined withtable,constants,root_addressorresource_heapin either order (guest_root excludes explicit root mapping lines).docs/experiments/native-fixed-mesh57.mddocuments the line.Evidence
Release preset:
native_direct_meshandnative_compile_dxil_refusalspass (2/2).Mutations (reverted after each run):
if (raw.guest_root)->if (false && raw.guest_root)): both tests fail.native_direct_meshatderived-mesh-root:native compute +0x8: mesh scalar memory needs a verified guest root mapping: s_load_dwordx4native_compile_dxil_refusalsatcheck_mesh_report(...):{'examined': 5, 'no_refusal': 1, 'refused': 4, ...}guest_rootrefusal:native_direct_meshfails atconflicting-mesh-root-*(the compile succeeds).native_compile_dxil_refusalsstill passes; it does not cover this refusal.DENY_AMPLIFICATION_SHADER_ROOT_ACCESSinstead:native_direct_meshfails atdeny-mesh-root-access(the compile succeeds).Not covered
prtest preset does not runnative_direct_meshornative_compile_dxil_refusals(not in its filter on1a0120ba).table,constants,root_address) is still accepted with a root that hasDENY_MESH_SHADER_ROOT_ACCESS; onlyguest_rootchecks the flag.MS buffer slot outside a verified SRV range).Merge notes
e358cf5f, which includes #3443, #3444 and #3445.git merge-treeis clean against main20bd1553and #3439 (6193c5a5).