pso: add static sampler root signature #1084

Merged
lambirou merged 1 commit from upstream-pr/1091 into main 2026-11-24 01:11:13 +00:00
lambirou commented 2026-11-24 00:49:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T00:49:15Z.


Change

Create the smallest PSO for a test root through the D3D12.X device path, including a static
sampler.

  • tests/d3d12x_pso.hlsl is a cs_6_0 shader that samples t0 at LOD 0 and writes u0.
  • The root signature v1.1 has one SRV descriptor table, one UAV table and one static sampler
    s0 with distinct non-default fields: LINEAR, WRAP/CLAMP/BORDER, MipLODBias 2.5,
    MaxAnisotropy 4, GREATER_EQUAL, OPAQUE_WHITE, MinLOD 1.5, MaxLOD 9, register/space 0, ALL
    visibility, plus flags 0x03000000.
  • The test creates the device through D3D12XboxCreateDevice, serializes through the shim,
    compares the 208-byte blob with the desktop baseline after stripping the two documented flag
    bits, deserializes and compares every static-sampler field, then creates the root signature and
    compute PSO.
  • Reject controls cover ShaderVisibility=99, Filter=0x7fffffff, flag 0x04000000,
    ParameterType=0x7fffffff and PSO creation without a root signature. Desktop and shim must
    both return E_INVALIDARG with no blob; the rootless PSO must also be null.

Verification

  • cmake --build --preset dev --target d3d12_xs_shim d3d12x_device_check
    • Passed with MSVC 19.44.
  • ctest --preset dev --no-tests=error -R '^d3d12x_(pso|device)_' -V
    • 7/7 passed. PSO create: 208-byte blob, root=S_OK pso=S_OK, non-null objects.
    • WARP: Microsoft Basic Render Driver, vendor 1414, device 008c, driver 10.0.26100.10068.
    • Hardware: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010.
    • Windows 10.0.26300; debug layer unavailable.
    • Reject output: all four malformed descriptors desktop=0x80070057 shim=0x80070057,
      blobs=null; rootless PSO 0x80070057, PSO null.
  • docs_links_check.py: Self-test passed., Checked 15 Markdown files and 238 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: dispatch, descriptor-heap binding, readback, the full CTest suite and release CI.

Evidence and follow-up

  • Branch pso/root-signatures, head f8df277, based on 0afcdfa1 (contains XCL-08 and
    XCL-22).
  • The test uses the XCL-08 device creation path. It does not modify src/: the shim already
    strips only the two documented console flag bits.
  • Boundary: creation only, no console descriptor/vtable claim; the public
    D3D12XBOX_CREATE_DEVICE_PARAMETERS and IID_ID3D12Device1 remain unimplemented.
  • Provenance: source-built HLSL, Windows SDK d3d12.h constants and the local XCL-08 evidence.
    No XCL code, table or output is used.
  • docs/experiments.md records the root, sampler fields and exact CTests.
  • No game files, dumps, shader bytes, title paths or secrets are included.

Checklist

  • One reviewable behavior: a compute PSO with a static sampler through the D3D12.X device.
  • Positive WARP/hardware and malformed-descriptor/rootless controls.
  • Public fields compared and the console boundary named.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6572036501 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1091). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-24T00:49:15Z. --- ## Change Create the smallest PSO for a test root through the D3D12.X device path, including a static sampler. - `tests/d3d12x_pso.hlsl` is a `cs_6_0` shader that samples `t0` at LOD 0 and writes `u0`. - The root signature v1.1 has one SRV descriptor table, one UAV table and one static sampler `s0` with distinct non-default fields: LINEAR, WRAP/CLAMP/BORDER, MipLODBias 2.5, MaxAnisotropy 4, GREATER_EQUAL, OPAQUE_WHITE, MinLOD 1.5, MaxLOD 9, register/space 0, ALL visibility, plus flags `0x03000000`. - The test creates the device through `D3D12XboxCreateDevice`, serializes through the shim, compares the 208-byte blob with the desktop baseline after stripping the two documented flag bits, deserializes and compares every static-sampler field, then creates the root signature and compute PSO. - Reject controls cover `ShaderVisibility=99`, `Filter=0x7fffffff`, flag `0x04000000`, `ParameterType=0x7fffffff` and PSO creation without a root signature. Desktop and shim must both return `E_INVALIDARG` with no blob; the rootless PSO must also be null. ## Verification - `cmake --build --preset dev --target d3d12_xs_shim d3d12x_device_check` - Passed with MSVC 19.44. - `ctest --preset dev --no-tests=error -R '^d3d12x_(pso|device)_' -V` - 7/7 passed. PSO create: 208-byte blob, `root=S_OK pso=S_OK`, non-null objects. - WARP: Microsoft Basic Render Driver, vendor 1414, device 008c, driver 10.0.26100.10068. - Hardware: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010. - Windows 10.0.26300; debug layer unavailable. - Reject output: all four malformed descriptors `desktop=0x80070057 shim=0x80070057`, `blobs=null`; rootless PSO `0x80070057`, PSO null. - `docs_links_check.py`: `Self-test passed.`, `Checked 15 Markdown files and 238 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: dispatch, descriptor-heap binding, readback, the full CTest suite and release CI. ## Evidence and follow-up - Branch `pso/root-signatures`, head `f8df277`, based on `0afcdfa1` (contains XCL-08 and XCL-22). - The test uses the XCL-08 device creation path. It does not modify `src/`: the shim already strips only the two documented console flag bits. - Boundary: creation only, no console descriptor/vtable claim; the public `D3D12XBOX_CREATE_DEVICE_PARAMETERS` and `IID_ID3D12Device1` remain unimplemented. - Provenance: source-built HLSL, Windows SDK `d3d12.h` constants and the local XCL-08 evidence. No XCL code, table or output is used. - `docs/experiments.md` records the root, sampler fields and exact CTests. - No game files, dumps, shader bytes, title paths or secrets are included. ## Checklist - [x] One reviewable behavior: a compute PSO with a static sampler through the D3D12.X device. - [x] Positive WARP/hardware and malformed-descriptor/rootless controls. - [x] Public fields compared and the console boundary named. - [x] No game files, dumps, logs or secrets. - [x] Provenance checked; no XCL code used. - [x] AI-assisted (Codex).
upstream-sync closed this pull request 2026-11-24 06:46:16 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1084
No description provided.