d3d12x: render a triangle through a graphics list #1221
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1228"
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 lambirou on 2026-11-24T04:25:36Z.
Change
Add a graphics command-list fixture that renders a source-built triangle through the device
returned by
D3D12XboxCreateDevice(XCL-12, on top of merged XCL-10).signature with
ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT, and a VS/PS PSO compiled by DXC.POSITIONfloat4 vertices for a clip-space triangle, records the upload,render-target and readback transitions, clears a 32x32
R8G8B8A8_UNORMtarget, draws threevertices, copies the target into a readback buffer and compares all 1,024 pixels with a CPU
reference.
1,024 mismatches starting at pixel
(0,0). A missing render-target transition is rejectedwith
wrong_state render_target=COMMON expected=RENDER_TARGET operation=ClearRenderTargetView(rtv).src/change and no production export. The public Microsoft D3D12/Xbox material and theWindows SDK do not expose a
D3D12Xbox...CommandListcreation or recording export; thedocumented desktop methods on the returned device are used.
Verification
cmake --preset devandcmake --build --preset dev --target d3d12x_graphics_list_check d3d12_xs_shim: passed with MSVC 19.44.ctest --preset dev --no-tests=error -R '^d3d12x_graphics_list_' -V: 2/2 passed.ctest --preset dev --no-tests=error -R '^d3d12x_': 19/19 passed after building the computefixture.
1,024 pixels, 0 mismatches, FNV-1a
0xff2379c5. Omitted draw and empty scissor: 1,024mismatches, clear color only, hash
0x1f116dc5, first mismatch(0,0).skip. Windows 10 Pro 26H2 build 26300.10075; debug layer unavailable.
tests/docs_links_check.py:Self-test passed.,Checked 16 Markdown files and 276 links..git diff --check origin/main...HEAD: clean.^d3d12x_.Evidence
d3d12x/graphics-lists, head392ba968, based onorigin/main5a0dbd5c.docs/experiments.mdrecords the exact commands, environment, positive hash and negativecontrols; the capability matrix names the new tests.
claim a console command-list ABI, PresentX, bundles or multi-queue. The constant-color PSO does
not measure interpolation, textures, depth, blending or MSAA. The state audit is fixture-owned;
it is not evidence that the runtime without a debug layer rejects those states.
the Windows SDK
d3d12.h, and the existing local D3D12.X device/heap evidence. No XCL code,table or output.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T04:37:13Z.
Review: COMMENTED
Technical review on Linux at commit
392ba968(Windows build and D3D12 runtime tests were not executed locally).Diff & fixture audit
CMakeLists.txt: compilestests/d3d12x_graphics.hlsl(VSMainasvs_6_0,PSMainasps_6_0) via DXC into headers and registersd3d12x_graphics_list_warp(timeout 60s) andd3d12x_graphics_list_hardware(SKIP_RETURN_CODE 77, timeout 60s).tests/d3d12x_graphics_list_check.cpp: loadsd3d12_xs.dllexplicitly, verifiesD3D12XboxCreateDeviceresolves inside that module, creates anID3D12Device, and records aDIRECTgraphics command list (empty v1.0 root signature withALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT, 1POSITIONinput,R8G8B8A8_UNORM32x32 target, fullscreen triangle covering all 1,024 pixel centers, expected word0xff996633).omitted_drawandempty_scissorboth verify 1,024 mismatches against the triangle reference (all0x00000000clear pixels, first mismatch at(0,0)).wrong_stateomits theCOMMON -> RENDER_TARGETtransition and verifies the source-ownedStateAuditrejects beforeClearRenderTargetView(rtv)(documented as a fixture policy rather than runtime debug-layer validation).docs/experiments.md&docs/xcl-capability-matrix.md: scope and caveats accurately state that this covers desktopID3D12GraphicsCommandListmethods on the XCL-08 device and does not claim console command-list interfaces, vtable slots, orPresentX.Checks run (Linux, commit
392ba968)/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (Self-test passed. Checked 16 Markdown files and 276 links.)./root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (Self-test passed. Checked 1033 tracked source, script and build/CI files: no bidirectional controls.)./root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: passed (Ran 12 tests in 0.061s - OK).ctest(d3d12x_graphics_list_warp,d3d12x_graphics_list_hardware): not executed on Linux.