Skip to content

runtime: report unavailable fixed mesh PSOs at creation when opted in - #2273

Open
R0Y00 wants to merge 1 commit into
mainfrom
codex/fixed-mesh-create-result
Open

R0Y00 wants to merge 1 commit into
mainfrom
codex/fixed-mesh-create-result

Conversation

@R0Y00

@R0Y00 R0Y00 commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Refs #1760 and #2253.

With X2W_REFUSE_FIXED_MESH=1, slot 57 returns E_NOTIMPL and clears the output for a fixed descriptor with a registered root, no VS, and a readable MS span of 16 bytes through 64 KiB. A PS can be absent or use the same bounds. Callers that handle the result can select a different creation path. With the switch unset, the existing placeholder is returned. Ordinary VS+PS and malformed fixed descriptors retain the legacy result, and an unsupported IID still takes precedence with E_NOINTERFACE.

cmake --build --preset release --target startup_indirect_draw_indexed
ctest --preset release --no-tests=error -j 1 -R '^startup_indirect_(mesh_|draw(_indexed)?_(warp|hardware))' -V

Release passed 14/14 tests without skips on Windows 11 build 26200.9974. The debug layer was enabled on WARP 10.0.26100.9818 and NVIDIA GeForce RTX 4060 Laptop GPU 32.0.16.1656. The fixture checks paired and MS-only creation with the switch on and off, exact HRESULT and output-pointer behavior, a wrong IID, normal VS+PS, and malformed spans and roots. The existing request and dispatch fixtures also passed.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head 57dc4b3 (read-only pass, no Windows run by me).

Scope read: git diff --stat origin/main...HEAD shows 4 files (CMakeLists.txt, docs/experiments.md, src/startup_stubs/d3d12_xs_device.cpp, tests/startup_indirect_draw_indexed.cpp), 114 insertions, 7 deletions. Title is neutral, PR is mergeable, one commit.

Commands executed locally:

  • python3 tests/docs_links_check.py -> self-test passed, 18 Markdown files and 433 links checked.
  • python3 tests/bidi_controls_check.py -> self-test passed, 1562 files, no bidirectional controls.
  • git diff --check origin/main...HEAD -> clean.

Findings

  • P1: none.
  • P2: none.
  • nit (src/startup_stubs/d3d12_xs_device.cpp, device_create_pipeline_placeholder): the IID check now runs before the placeholder log, so a wrong-IID call no longer logs the first two placeholder lines. Behavior is unchanged and this seems intended. Worth one doc sentence only if someone greps those logs.
  • nit (is_fixed_mesh57_descriptor): the bounds lambda duplicates the 16-byte to 64-KiB span rule. Please confirm request_slot57_mesh in d3d12_draw.inl uses the same limits. If it doesn't, the two can drift, so a shared constant would be safer.
  • nit (CMakeLists.txt): startup_indirect_mesh_create_result_* is registered before the set_tests_properties for ..._request_*. This is harmless, but the property blocks could be grouped.

What I checked by reading

  • The opt-in is gated by X2W_REFUSE_FIXED_MESH, so the default path still returns the placeholder.
  • The E_POINTER and null-output clearing order is unchanged, and the output is cleared before E_NOTIMPL.
  • Unsupported IID returns E_NOINTERFACE ahead of the refusal.
  • The descriptor predicate needs a registered root signature kind, VS ptr and len both zero, a readable MS span of 16 to 65536 bytes, and a PS span that is either fully absent or equally bounded.
  • The fixture covers each of those branches: wrong root kind, missing root, VS ptr, VS len, MS ptr/len, unreadable spans, PS ptr/len, null and unreadable descriptors, and the default vs opt-in matrix.

Limits of this review

  • I did not run the C++ fixture. It is Windows-only (D3D12), and I did not request a Win2025 run. The mutation step was therefore not done. I only read the test matrix and judged that it would kill dropping the root-kind, VS-empty or span-bound conditions. Please treat that as unproven until the Windows job is green.
  • CI at review time: the Linux Python checks job and the gfx1013 job (step "Check machine-code inputs with LLVM 15") are failing, and the Windows job was still running. The PR touches no Python or assembly fixtures, so these look unrelated to the diff, but I could not read the logs. Please confirm with a rerun or against main before merging.

AI-assisted; commands listed were executed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants