shader: admit PS-less slot 57 mesh pipelines with a reviewed profile #3493
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3493"
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-29T17:52:48Z.
Refs #3416
Stacked on #3483 (outcome counters): this branch contains its commit
78693088, the depth-only commit4ac538eaand the merge4d3f086c. Merge it after #3483, or together with it.Why
In a long local run of the application, all 12 slot-57 mesh requests the log recorded had no pixel stage (the log is rate-limited, so this is a sample). Native preparation returns on a PS-less creation before looking up a profile.
What changes
src/startup_stubs/native_mesh57.inl{nullptr, 0}, whichbuild_stream_pipelineskips, so the pipeline has no pixel stage.src/startup_stubs/mesh86_cache.inl:mesh86_hardware_depthis renamed tomesh_hardware_depthso slot 57 reuses the WARP guard. The slot-86 call site is otherwise unchanged.docs/experiments/native-fixed-mesh57.md: new "Mesh-only depth" section.Interaction with #3483
ps_absentnow counts only PS-less creations that are not admitted: a nonzero PS pointer with zero length. In #3483 it counted every creation without a captured PS.profile_pixel_entry; color targets, depth writes and DSV format toprofile_attachment_state; non-physical adapter topipeline_refused.ps_absent1 -> 0,profile_absent64 -> 65, profile lookups +1 (opens stay 2). The zero-PS probe of that test is now admitted, reaches the lookup and finds no profile.logged_refusalhelper (same line, same search from the file start).Tests
New
native_fixed_mesh57_depth_only_{warp,hardware}:ctest -j 1 -R '^native_(mesh57_(outcomes|depth_only)|fixed_mesh57_)'on4d3f086c, presetdev: 23/24. This includesnative_mesh57_outcomes_{warp,hardware}and the two depth-only tests. The only failure isnative_fixed_mesh57_waterfall_fine_hardware, the known #3489.Mutations, one at a time, each followed by a rebuild. The two outcomes-test rows ran on
4d3f086c, the others on4ac538eabefore the merge:ps_absentdepth_onlyignores the PS pointer (length only)The surviving mutation changes no behaviour: the capture layer already refuses a nonzero PS pointer with zero length, so that control exercises the capture guard and not the new predicate.
Not covered
unsupported_stage_or_descriptor.Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T06:55:05Z.
Review: APPROVED
Reviewed draft head
196adf8c(own commits4ac538ea,bd48290aon top of #3483) by reading the diff; not built or run.Verdict: approve. The depth-only path is admitted only by an exact reviewed profile, and the PS-present path keeps its checks. No MUST.
ps_absentchanges meaning here (native_mesh57.inl, thefields[5] && !fields[6]branch). It now counts only "PS pointer without PS bytes", while an absent PS is the admitted depth-only case. Since #3483 and this branch land together, renaming it now (e.g.ps_uncaptured) avoids a counter name that reads the opposite way in run logs.refusecap (12 lines per process across all reasons) lets the first noisy reason hide the others in a long run. Per-reason counts are already in #3483's line, so this is only about the prose.depth_onlyneeds both PS pointer and length to be zero. The empty PS span is hashed intokey, so a profile captured with a PS cannot match a PS-less creation, or the reverse.stream.ps) is behind!depth_only, and theNumRenderTargetscheck is unchanged for it.trywith a matching outcome.mesh_hardware_depthbuilds a DXGI factory per call, but only after a profile matched..ps57. None of them is PS-less, so real profiles for this path will depend on #3505's capture tool.Tests:
native_fixed_mesh57_depth_only_hardwareproves the profile's depth state is used (D32 readback 0.50 vs 0.25) and that a changed state is refused._warppins only the adapter refusal and the per-reason refusals. CI did not run either: they are not in theprpreset filter.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T18:13:01Z.
Rebased the two original commits onto main, which already includes #3483, and added one commit for the review point on the counter name. The rebase preserves the current slot 57 profile handling and published shader-pair fallback.
Renamed the preparation counter from
ps_absenttops_uncapturedto identify descriptors with a nonzero pixel shader pointer and zero byte length. The outcome fixture now checks that case explicitly. Descriptors with both fields zero proceed to reviewed-profile lookup.On commit
99defe7ad,devpreset, targetscompile_dxil d3d12_xs_shim xmem_shim startup_indirect_draw_indexed:14/14 passed.
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-01T19:32:03Z.
Review: APPROVED
Reviewed
99defe7a(rebased onto158ef794, which includes #3483) by reading the diff; not built or run.Verdict: approve. The rename (
ps_uncaptured) resolves our earlier SHOULD, and the fixture now pins that case: count 1 next to 2 unsupported. The rebased depth-only path keeps the same exact-profile gate. No MUST.native_mesh57.inl:424-428: when the MS capture is missing and the descriptor has a PS pointer without bytes, the request counts asps_uncaptured, notunsupported_stage_or_descriptor. Checking!info->fixed_msfirst would keep the counter to what its name says.:423). Both PS fields must be zero. The key hashes the empty PS, so a profile matches only with an empty PS span (match(5, ...)). Pixel-entry metadata or a pixel heap is refused (:496). Zero color targets, depth writes and a typed DSV are required, and the physical-adapter guard runs before translation (:554).:678), so a PS-less creation cannot pick up a pair built with a pixel stage.stream.psstays{nullptr, 0}(:713), and neither the PS translation,validate_raster_linknor theps_6_6compile runs.mesh86_hardware_depth→mesh_hardware_depth. A rename only; the slot 86 call site is otherwise unchanged.tests/cmake/native_mesh57_depth_only.cmakeis picked up by the existing fragment glob and runs only the localstartup_indirect_draw_indexedbinary.Tests:
native_fixed_mesh57_depth_only_hardwareproves the profile's depth state is used (D32 0.50 vs 0.25) and that changed states are refused._warppins the adapter refusal and the per-reason refusals.native_mesh57_outcomes_*now checksps_uncaptured 1. None of these is in the Windowsprpreset filter, so CI did not run them. The author's 14/14 run is at this head (99defe7a).