Run the translated compute–mesh–pixel chain from a source-built PE entry #671
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#671
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@R0Y00 on GitHub · 2026-11-22 18:48 UTC · original
Goal
Connect two existing public experiments. #560 drives an offscreen raster draw from the same source-built EXE in native Windows,
pe_mapand AOT. #658 verifies that a translated compute shader produces the texture later sampled by the translated indexed mesh and pixel stages. Exercise the translated producer and consumers through a PE-entry frame request and compare the whole observable result across the three runners.Dependency and scope
#560 landed in
899785e. The draw_request / draw_frame contract is on main. grahamster2 claimed the implementation and is stacking it on the one-frame interface. Start from the public frame reference and stale-texture control in #658. Use one frame per EXE invocation. The two-frame follow-up covers a different acceptance case and already has a prototype. Coordinate any shared provider edits on #218 before starting them.Acceptance
pe_mapand AOT must agree on the observable request and exit status, and every RGBA byte must match an independent reference.Claim by commenting with the part you can implement or review and any interface touched. Refs #218, #560 and #658.
@grahamster2 on GitHub · 2026-11-22 19:08 UTC · original
I'd like to take the whole one-frame integration for this issue.
Plan
draw_request/draw_framesignatures,shim_startup.asmortranslate_shim_startup.py.X2W_SHIM_DRAW_CASEgainschain0,chain1andchain-stale.draw_requestmaps each to a new mode, anddraw_framesends those modes to a separate test-only file,tests/cpu/shim_chain_gpu.cpp. That file runs the #658 sequence on one direct queue: the translated gfx1013 compute producer or producers write the raw UAV, the result is copied into a 2×2 texture, and the translated indexed mesh andimage_sample_lzpixel stages draw into a 32×32 target. Its root layout matches--compute-mesh-texture.draw_framereturns the mismatch count against the case reference, so the EXE exits 42 on a match and 20 otherwise (the existingbad_drawpath).tests/cpu/shim_chain_check.pybuilds the translated mesh, pixel and two producer shaders, along with both case files, from the generators used bycompute_mesh_texture_check.py. It then runs the native EXE,pe_mapand AOT for each case. All three runners must produce the same request and exit status, and their bytes must match a Python reference computed independently of D3D12.chain0dispatches palette A.chain1dispatches A and then B and binds B.chain-staledispatches both and binds A against B's reference. The check expects exit 20, the same 276 differing pixels in every runner, and matching clear pixels and trace.cpu_shim_chain_warpandcpu_shim_chain_hardware(skip 77 when mesh shader tier 1 is missing). They run in bothdevandrelease. Hardware runs: RTX 3080 and an RDNA2 iGPU.Interfaces touched: #560's
tests/cpu/shim_draw_provider.cpp(new modes only), CMake (cpu_shim_drawsources and the two tests), anddocs/experiments.md.tests/mesh_entry_draw.cpp,offscreen_checkand the #658 harness stay as they are. Their helpers live in theoffscreen_checkexecutable, so the DLL keeps its own copy of the sequence instead of sharing one.Order: I'm building and testing this now on top of #560's head (
0472851) and will push it to a branch. When #560 merges, I'll rebase ontomainand open the PR. It doesn't overlap the two- and three-frame draft in RonLogic/Xbox2Windows#1: one frame per process, a separate GPU file and no persistent device state.@grahamster2 on GitHub · 2026-11-22 19:54 UTC · original
Status: #560 is merged, and the integration is up as #682 at
543b951. In dev and release,cpu_shim_chain_warpandcpu_shim_chain_hardwarepass on WARP and the RTX 3080. Forchain0andchain1, native,pe_mapand AOT agree on all 4,176 published bytes, and the bytes match the Python references. Forchain-stale, all three runners exit 20 with A's frame. Against B's reference it differs at exactly 276 pixels, while all 748 clear pixels and the trace match. The RDNA2 iGPU reportsmesh_shader_tier=unsupported(capability skip), the same ascompute_mesh_texture_hardwareon that adapter. The full suite passes 296/296 in both presets. I couldn't check the debug layer here because Graphics Tools isn't installed.@R0Y00 on GitHub · 2026-11-22 20:12 UTC · original
The dependency is ready: #560 merged in
899785eand the post-merge CI passed. The merged fixture usesdraw_request()to select the case anddraw_frame(DWORD mode)to execute it. Native Windows, pe_map and AOT are compared for the complete frame and the mirrored and unknown-case controls. @grahamster2 you can base the one-frame integration on this merged contract. Please keep the signatures stable and reuse the #658 stale-texture control.@grahamster2 on GitHub · 2026-11-22 20:21 UTC · original
@R0Y00 That's what #682 does, on the merged contract at
0a9cc04(head543b951):draw_request()/draw_frame(DWORD mode)signatures, the EXE and the AOT import table are unchanged. The chain adds threeX2W_SHIM_DRAW_CASEvalues (chain0,chain1,chain-stale) to #560's provider.chain-stale: the earlier texture is bound after both producers dispatch. All three runners exit 20, the frame differs from B's reference at exactly 276 pixels, and all 748 clear pixels and the mesh trace still match.cpu_shim_chain_warp).Ready for review whenever you are.
@R0Y00 on GitHub · 2026-11-22 21:11 UTC · original
The one-frame integration landed in #682. The WARP fixture ran and passed in both Development and /O2 CI. The native, pe_map and AOT runs compare the full frame and trace, and the stale texture exposes exactly 276 changed covered pixels. Thanks for keeping the draw provider ABI unchanged.