Repository navigation
Conversation
lukaslw-lab
left a comment
There was a problem hiding this comment.
Reviewed a1b10c53 by reading the diff, then ran it merged onto main 44a3ad5a with #3506, #3516, #3464, #3521 and #3097 (native shaders only, interface catalog installed, its tests not run). Reads correct for what it admits; one real-title case it still refuses, filed as #3560.
- The case. A full-screen pass into one R8G8B8A8_UNORM target, native-only key
05dc00b8b79c1d4b. Its capturedPSI1isSPI_PS_INPUT_ADDR = 0x8080(bit 15POS_FIXED_PT, and bit 7) withNUM_INTERP = 0. - Still refused with this PR at
direct_compute_cache.cpp:730(captured interpolation count disagrees with pixel interface), so the pair is not exact. An exact pair would stop at:733-737: zero count is admitted only for0x0000or a subset of0x0f00. - Effect. The pass never draws, so the 3840×2160 layer it writes is never redrawn and earlier frames persist on screen during a fresh start, with or without this PR. Drawing only this pipeline from its published translation removes that.
- Suggestion. Admitting zero interpolants with
POS_FIXED_PTfor a non-exact pair would fit this PR's count and address rules; a fixture withADDR 0x8080, NUM_INTERP 0would pin it. Details and the run table are in #3560. A follow-up works too.
RTX 3080 Ti, Windows 10 19045, Agility SDK 1.620. This review was AI-assisted.
|
Data point for this PR's area, from a native-shader run tonight: main The run cache has 376 graphics requests; 19 compile and 357 are refused. The top reason is
So 184 of the 214 are wave32 pixel shaders: #3527 rewrites these exact lines, so I'm not claiming it separately. Leyukaka, do you want to fold it into this PR, or should I open a follow-up on top of it once it merges? I can retest either way on this cache. |
a1b10c5 to
0b62bd6
Compare
lukaslw-lab
left a comment
There was a problem hiding this comment.
Reviewed 0b62bd6f by reading the diff; not built or run.
Verdict: approve. The new count and address rules fail closed, and the rebase keeps main's 0x8080 zero-count path separate from them. No MUST.
- SHOULD The local 8/8 runs and the mutations in the description are from
a1b10c53. The rebase ontoce7eb9d3resolved conflicts in these same lines, and of the eight tests onlynative_direct_mesh, which this PR does not change, is in the Windowsprpreset filter. CI at this head ran none of the seven that cover the change. One local run of the same eight at0b62bd6fwould cover the merged code. - Checked, no finding:
- Main's
packed_position_only(direct_compute_cache.cpp:803) is skipped by both the new count/address block (:843) and the post-link check (:913). So #3560's case does not hit the new kind-28 rule at:917. - The kind-28 skip at
:917.captured_interp_count != 0is an optional compared with 0. It still skips for requests without a fixed entry (nullopt) and stops only for a captured zero. - The new upper bound fails closed. The count is still the whole
SPI_PS_IN_CONTROLdword. Raising the bound from 7 tomin(32, attributes)admits only values that are pureNUM_INTERP; any flag bit (6 and up) stays above it and is refused. pack_fixed_graphics_varyings(gfx1013_compute_native.cpp:2435). Provisional rows reach 1 + 4·31 + 3 = 128, which fits both the 128-entry channel array and theuint8_trow. Splitting by flat/smooth per PARAM keeps DXIL packing legal, and the budget check refuses before row 32.- The
pixel_interpolant_countguard (gfx1013_direct_graphics.inl:46) is set only for exact pairs (:872), so it does not touch the raw path.
- Main's
Tests: native_graphics_interface_library covers each count, address and budget refusal with its diagnostic and no published output. startup_native_graphics_fixed_entry_{warp,hardware} draws the accepted cases through the catalog and compares every pixel.
|
Independently verified |
|
After #3521 landed, pushed |
lukaslw-lab
left a comment
There was a problem hiding this comment.
Re-reviewed c53ffed4 by reading the diff; not built or run.
Verdict: approve. The PR's own source change is identical to 0b62bd6f: the src/ diff against main has the same patch ID. The two new commits are merges of main. No MUST, no open points.
- R0Y00's run of the eight tests on a trial merge of
0b62bd6fwith main162fab1fcloses our SHOULD. That covers the merged code, including the seven tests outside theprpreset. c53ffed4resolvestests/native_graphics_interface_library_check.pyby keeping both sides:- #3521's launcher cases (
run_case, with the catalog error control); - this PR's fixed-entry cases (
zero_fixed_cases,fixed_varying_caseand the varying-row jobs).
Both import sets are kept. The only failure reported on this head is the sandbox's file-delete error 32, which passed when rerun outside the sandbox.
- #3521's launcher cases (
Tests: CI is green at this head. The fixed-entry fixtures still run only in R0Y00's local runs, because they are outside the pr preset.
c53ffed to
0b4ec28
Compare
|
Rebased onto |
Refs #870 (claim: #870 (comment), parts (a) and (b) in one PR).
Why
With the interface catalog installed (#3521), a fixed slot-57
PSI1pixel entry reaches the layout check inprepare_direct_graphics(src/direct_compute_cache.cpp). Onmainthat check refuses an interpolant count of zero or above seven withcaptured interpolation count disagrees with pixel interface, and any captured/reviewed address pair other than0x0002/0x0002and0x8002/0x0302withunsupported fixed pixel entry layout. Those pairs get no native graphics pipeline.What
Count rule,
prepare_direct_graphics:min(D3D12_VS_OUTPUT_REGISTER_COUNT, reviewed pixel attribute count)instead of 7.Address rule, same function. The captured address must equal the reviewed address, except for the existing
0x8002/0x0302packed-XY pair, which now also requires a nonzero count. Admitted values:0x0002, any admitted count;0x0000, zero count only;0x0f00(float position bits), zero count only. The matchingSV_Positionfloat input is skipped in the post-link input check.Zero count:
raw and reflected interpolation inputs disagree.unsupported pixel entry VGPR ncheck insrc/gfx1013_direct_graphics.inl. The two refusals are separate fixtures with separate diagnostics.Exact pairs:
GuestShaderStage::pixel_interpolant_count(src/guest_shader_container.h), set from the captured count.gfx1013_direct_graphics.inlrefuses an attribute location at or above that count.TEXCOORDrows of a fixed exact pair skip the per-PARAM index check; the VS/PS link still applies.Raw pairs with more than seven interpolants:
translate_graphics_pairtakesextended_fixed_params;read_raw_graphicsthen accepts 32 PARAMs instead of 7 (src/gfx1013_compute_native.cpp).pack_fixed_graphics_varyingskeeps the provisional rows when they fit. Otherwise it packs one register per (PARAM, flat/smooth) with the same channel assignment on both stages, and refuses past the 32-register budget withinvalid signature register or component mask.Tests
New CTest
startup_native_graphics_fixed_entry_{warp,hardware}:tests/startup_native_graphics_draw_check.py --fixed-slot57. It draws through the catalog with native shaders only and compares every pixel: zero count at addresses0,2,0x100,0x300, then exact and raw pairs at counts 8 and 32.tests/native_graphics_interface_library_check.pyadds compile cases with refusal controls. Each refusal checks the diagnostic and that no output is published.zero-{0,2,100,300}zero-position-mismatch,zero-center-positionunsupported fixed pixel entry layoutzero-inexact,zero-paramzero-unallocated-vgprunsupported pixel entry VGPR 4zero-barycentricsraw and reflected interpolation inputs disagreeexact-{8,32},raw-{8,32}dxc -dumpbinexact-location-{8,32},raw-location-32(count one below a consumed location)count-above-interface-{8,32}exact-missing-producer-channelgraphics stages disagreeraw-full-budget(31 full exports)raw-overflowing-signatureinvalid signature register or component maskLocal Windows build of a1b10c5,
devpreset, 8/8 passed:startup_native_graphics_draw_{warp,hardware},startup_native_graphics_fixed_entry_{warp,hardware},native_direct_container,native_direct_mesh,native_graphics_interface_library,startup_gfx2hlsl_ps57in.Mutations, each applied alone, then restored and rebuilt to 8/8:
!n || n > 7native_graphics_interface_library,startup_native_graphics_fixed_entry_warpn > 7restoredcaptured_interp_count != 0guard dropped from the kind-28 skipnative_graphics_interface_library(zero-barycentricsaccepted)zero-unallocated-vgprnative_graphics_interface_library(unsupported pixel entry VGPR 4)An earlier Windows Sandbox run of the same eight tests on 9c6d359 gave 7/8.
native_graphics_interface_libraryfailed: thezero-barycentricsfixture exported an unallocated v4, so lowering refused it withunsupported pixel entry VGPR 4before the zero-count check. a1b10c5 changes only that test: the original bytes becomezero-unallocated-vgprwith the lowering diagnostic, and a newzero-barycentricsfixture exports center I and an initialized v2 to reach the zero-count check. No source change after 9c6d359. The Sandbox run was not repeated on a1b10c5.Not covered
unsupported fixed pixel entry layout.