Skip to content

Report DXIL cache activity and compilation failures - #50

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
Mavixot:pso-cache-diagnostics
Nov 22, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
Mavixot:pso-cache-diagnostics

Conversation

@Mavixot

@Mavixot Mavixot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

adds dxil cache stats and compile errors to report.json for runtime pso creation. cache-only misses are counted separately, and the first 20 distinct errors include the shader profile, cache file and dxc output. build + workspace tests pass, no retail samples available.

Include runtime shader-cache statistics in report.json, separating deferred PSO probes from compilation failures. Retain bounded compiler diagnostics with cache and shader-profile context.
@Mavixot
Mavixot force-pushed the pso-cache-diagnostics branch from 4e50381 to a3feb68 Compare November 22, 2026 22:34
@ivall
ivall merged commit 6f8c4ec into xcl-dev:main Nov 22, 2026
@ivall

ivall commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks, merged! I tested it together with #51 on top of current main, with the MSVC toolchain on Windows and an RX 9070:

  • All tests pass: 342 lib tests with your three, the e2e test title, and the GPU tests.
  • The Compiling guard from 521ec08 (the XCL window's "compiling shaders" count) survived the rewrite of compile_cached_in_with.
  • Nothing matches on the DXC error strings, so the longer messages are safe.
  • A Minecraft run writes "dxil_cache": {"hits": 28, "misses": 0, …} to report.json with a warm cache.

The compilation_errors samples with the cache file name will help with reports like #42's.

@Mavixot
Mavixot deleted the pso-cache-diagnostics branch November 22, 2026 23:10
CalvyPZ pushed a commit to CalvyPZ/xcl that referenced this pull request Nov 24, 2026
…PC descriptors

The command list's console xcl-dev#53 / xcl-dev#54 (ClearUnorderedAccessViewUint /
Float) were remapped straight to PC xcl-dev#49 / xcl-dev#50 (`console_remap`) with no
override, so a title's call reached the PC method with its handles as
they were. Console code takes its descriptor handles from heap xcl-dev#9 / xcl-dev#10,
which give it the address of its console heap slots in unified memory
(`console_heap::start`), not PC descriptor handles: the PC clear got a
GPU handle outside the bound shader-visible heap and a CPU handle
pointing at T# words. Only the opt-in console-list replay
(XCL_CONSOLE_LISTS=1) translated them.

xcl-dev#53 / xcl-dev#54 now go to `list_x::clear_uav_uint_x` / `clear_uav_float_x`
(same arguments as the PC methods): two console slots become their PC
UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the
title's CPU-only heap), as the replay does; two PC handles go through as
they are; a mix, or a slot without a shader-visible UAV, is skipped and
logged once.

Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible
console heap, xcl-dev#53 with the console handles and 0xDEADBEEF. With the
handles passed through (the old path) the test process dies with
STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer
reads back 0xDEADBEEF.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
emirduran707 added a commit to emirduran707/xcl that referenced this pull request Nov 25, 2026
…PC descriptors

The command list's console xcl-dev#53 / xcl-dev#54 (ClearUnorderedAccessViewUint /
Float) were remapped straight to PC xcl-dev#49 / xcl-dev#50 (`console_remap`) with no
override, so a title's call reached the PC method with its handles as
they were. Console code takes its descriptor handles from heap xcl-dev#9 / xcl-dev#10,
which give it the address of its console heap slots in unified memory
(`console_heap::start`), not PC descriptor handles: the PC clear got a
GPU handle outside the bound shader-visible heap and a CPU handle
pointing at T# words. Only the opt-in console-list replay
(XCL_CONSOLE_LISTS=1) translated them.

(same arguments as the PC methods): two console slots become their PC
UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the
title's CPU-only heap), as the replay does; two PC handles go through as
they are; a mix, or a slot without a shader-visible UAV, is skipped and
logged once.

Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible
console heap, xcl-dev#53 with the console handles and 0xDEADBEEF. With the
handles passed through (the old path) the test process dies with
STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer
reads back 0xDEADBEEF.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 27, 2026
…wports/scissors/topo) into ListDrawRecord

List slots xcl-dev#34 (SetGraphicsRootSignature), xcl-dev#50 (OMSetRenderTargets),
xcl-dev#47 (IASetIndexBuffer), plus PC-side xcl-dev#20/xcl-dev#21/xcl-dev#22 (topology, viewports,
scissors) store into ListDrawRecord. SetPipelineState (xcl-dev#25) now merges
instead of overwriting so PSO-first or state-first order both keep the
full record. Store-only: no draw, no validation, no execute; triangle/
bias FAILs stay failing.

Evidence: new draw_s2_list_state_recorded_pre_draw fails pre-change
(S2 symbols absent at HEAD: grep count 0) and passes post; full lib
806 passed, 0 failed, 1 ignored; both cargo checks clean; title null
4 FAILs identical to HEAD-baseline worktree run (triangle, present,
bias-xcl-dev#94, all D3D12.X GPU-only, + pre-existing files:delete also on
HEAD), delta 0; Vulkan 3 (triangle, bias-xcl-dev#94 + same files:delete);
retail HOLDS (exit 139 @ exe+0x2237320, SIGSEGV fault 0, 20 stubs,
xgr XAsync/XNetworking/XUser, 0 d3d12).
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