Repository navigation
Shaders: rebuild all descriptor slices of merged s_load_dwordx8/x16 loads - #2046
fuzeofficlal wants to merge 1 commit into
Conversation
|
Triage verdict — Keep, cover split reloads and mixed descriptor slices ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked.
145 passed / 0 failed / 2 ignored. Buffer descriptor stride bits, merged loads and 64-bit… (+1 test) — structured-buffer descriptor decoding completeness.
8df2ae4 to
51eecad
Compare
|
Updated in
|
|
Automated triage for the maintainers. Needs work. It is close now. On your reply:
What is still missing is the evidence the earlier review asked for: that the title reaches these paths. The only measurement in the thread (sinan-cmyk, on the earlier and larger head) shows no change in
If those programs exist, this is a reasonable merge. The two descriptor tests do check rebuilt values against the host view's dimensions on GPU and WARP, not just against what the code emits. CI: passing ( Generated by Claude Code |
Offline measurement on a retail dumpResult: no count change against I merged head 51eecad onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
…oads Rebuild every consumed resource slice within a merged s_load_dwordx8 or s_load_dwordx16 load by unioning direct slices with same-base reload slices whose offsets fall in the loaded range (ranking image and indexed buffer uses above raw/scalar ones), isolate per-slice refusals so an unread failing slice does not poison sibling slices, and reconstruct sampled/sized cube image slices (dim == 3, TYPE = 11) alongside 1D/2D/3D/array views while leaving buffer dword 0..3 and record-count semantics unchanged.
51eecad to
b329b1f
Compare
|
Updated in
|
|
Closing this PR: as noted in triage, confirming a measurable hit on real title shader corpora is needed before merging, and I only test with synthetic shaders locally. |
Summary
s_load_dwordx8ors_load_dwordx16load inLower::descriptor_data(crates/victory-shader/src/emit/lower.rs):main,descriptor_datastops at the firstuse_ofmatch and sets all other loaded dwords toVal::Missing, so any shader reading dimensions or record counts from a second slice of a mergeds_load_dwordx8/s_load_dwordx16(or across split reloads from the same base) fails lowering.load == site) with same-base reload slices (same_basewithdeltainside[0, 4 * count)), ranking image and indexed-buffer uses above raw/scalar buffer uses.0..spanregisters so an unread failing slice (such as a CBV) does not poison sibling SRV/UAV slices.dim == 3,!uav,kind = 5, GFX10TYPE = 11in dwords 1..3) alongside 1D/2D/3D/array views, while keepingmain's buffer dword 0..3 andNUM_RECORDSsemantics unchanged.Verification
emit::descriptor_tests::merged_loads_and_split_reloads_rebuild_all_buffer_slices(dxil.dllvalidated, hardware GPU + WARP): coverss_load_dwordx8multi-slice buffer rebuilding,s_load_dwordx16split same-base reloads, and unread buffer dword refusal.emit::descriptor_tests::merged_cube_and_2d_slices_sample_and_read_dimensions(dxil.dllvalidated, hardware GPU + WARP): covers mergeds_load_dwordx16with 4x4 cube (dim == 3) + 6x3 2D (dim == 1) slices and per-slice CBV refusal isolation.cargo clippy -p victory-shader --tests --locked -- -D warningsandcargo xtask policy: passed.