Repository navigation
shader: admit PS-less slot 57 mesh pipelines with a reviewed profile - #3493
Conversation
lukaslw-lab
left a comment
There was a problem hiding this comment.
Reviewed draft head 196adf8c (own commits 4ac538ea, bd48290a on 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.
- SHOULD
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. - NIT The shared
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. - Checked, no finding:
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.- On the PS-present path, every PS step (pixel translation, constant pixel, PS compile,
stream.ps) is behind!depth_only, and theNumRenderTargetscheck is unchanged for it. - The depth-only gates (no pixel-entry metadata, 0 RTs, depth writes on, typed DSV, physical adapter) all throw inside the
trywith a matching outcome.mesh_hardware_depthbuilds a DXGI factory per call, but only after a profile matched. - In our local cache from this title, all 996 slot 57 mesh requests have a
.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_hardware proves the profile's depth state is used (D32 readback 0.50 vs 0.25) and that a changed state is refused. _warp pins only the adapter refusal and the per-reason refusals. CI did not run either: they are not in the pr preset filter.
196adf8 to
99defe7
Compare
|
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 On commit 14/14 passed. |
lukaslw-lab
left a comment
There was a problem hiding this comment.
Reviewed 99defe7a (rebased onto 158ef794, 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.
- NIT
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. - Checked, no finding:
- The depth-only gate (
: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). - Published pair. Depth-only refusals do not fall back to the published MS57 pair (
:678), so a PS-less creation cannot pick up a pair built with a pixel stage. - Stream and compile. Without a PS,
stream.psstays{nullptr, 0}(:713), and neither the PS translation,validate_raster_linknor theps_6_6compile runs. - PS-present path. Its checks and order are unchanged apart from the two new capped refusal log lines.
mesh86_hardware_depth→mesh_hardware_depth. A rename only; the slot 86 call site is otherwise unchanged.- New test registration.
tests/cmake/native_mesh57_depth_only.cmakeis picked up by the existing fragment glob and runs only the localstartup_indirect_draw_indexedbinary.
- The depth-only gate (
Tests: native_fixed_mesh57_depth_only_hardware proves the profile's depth state is used (D32 0.50 vs 0.25) and that changed states are refused. _warp pins the adapter refusal and the per-reason refusals. native_mesh57_outcomes_* now checks ps_uncaptured 1. None of these is in the Windows pr preset filter, so CI did not run them. The author's 14/14 run is at this head (99defe7a).
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 startup: count native slot 57 preparation outcomes #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.