Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion docs/experiments/native-fixed-mesh57.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,38 @@ Keep the three request companions beside the archive. The
`check_profile_writer` fixture in `tests/native_direct_mesh_check.py` shows a
complete version 2 record. The tool verifies capture keys and spans, then
atomically publishes `<variant>.mesh57-state` in the existing output directory,
replacing a same-named profile. Captures without a pixel shader are refused.
replacing a same-named profile. A record is refused while any required field
is null, while `review_required`, `provenance` or `capture` remains, or when a
reviewed value disagrees with a value the capture decoded. The refusal names
every field, not only the first. An empty `.ps57` is a depth-only profile: it
must have no RTV formats or blend targets, enabled depth writes and a typed
DSV format; versions 2–5 carry a zeroed pixel entry and version 6 is refused.

To draft the review record instead of writing it by hand, run
`python -B tools/startup/mesh57_profile.py --draft ARCHIVE DRAFT.json`.
The draft decodes the mesh-layout depth-stencil words at `A+0x10C` and the
eight blend words at `A+0x124`, using the same rules as
`pipeline_state_decode.h`, `cb_blend.h` and `state_block_blend.h`. When the
adjacent `.t57` sidecar holds exactly one distinct attachment tuple, the draft
also fills `rt_formats`, `depth_format`, `samples.count` and `samples.quality`.
One line per tuple is
`targets <count> <formats...> dsv <format> writable <0-or-1> samples <count> <quality>`;
an `overflow <observations>` line or more than one distinct tuple is refused.
Without a tuple those fields and `blend` stay null. The draft records the
capture's pixel export shape (`mrt0..mrt7`, `mrtz`, `null` or none) and the
attachment counts, and classifies a stage with a color export as `color`.
Mesh entry dimensions, rasterizer state, the pixel entry, root mappings and
the version remain reviewer-supplied: a register block alone does not assign
those offsets. `--check ARCHIVE REVIEWED.json` prints the complete unresolved
list and any capture disagreement without writing a profile. A review that
leaves attachments unverified (no `.t57`) is accepted only because a reviewer
supplied those values; the capture check then covers depth-stencil alone.
`--census DIRECTORY` prints the capture, stage, sidecar and consistency counts
without retaining shader or descriptor bytes.
The decoded depth-stencil and blend values are treated as measured facts: a
reviewed record that changes them is refused. A previously hand-authored
profile that chose a different canonical depth state therefore cannot be
recreated unchanged through this writer; keep the existing file instead.

For the recognized 0x300-byte fixed layout, the variant key ignores relocation
of the two shader record blocks and retains their relative offsets.
Expand Down
1 change: 1 addition & 0 deletions tests/checks/python-linux/mesh57_profile_draft.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/mesh57_profile_draft_check.py
13 changes: 13 additions & 0 deletions tests/cmake/mesh57_profile_draft.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Source-built slot 57 profile authoring: depth-stencil and blend decoding, the .t57
# attachment tuple, the color/depth stage classification, the reviewed-profile check
# that names every unresolved field, capture disagreement refusals, and an optional
# offline compile of the reviewed pixel entry.
if(TARGET compile_dxil AND EXISTS "${DXC_EXECUTABLE}")
add_test(NAME mesh57_profile_draft COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/mesh57_profile_draft_check.py"
"$<TARGET_FILE:compile_dxil>" "${DXC_BIN_DIR}")
else()
add_test(NAME mesh57_profile_draft COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/mesh57_profile_draft_check.py")
endif()
set_tests_properties(mesh57_profile_draft PROPERTIES TIMEOUT 60)
Loading
Loading