Repository navigation
Port upstream shader/GPU correctness wave 4 (17 PRs: descriptor uses, reachability, barriers, PSO/library fixes) - #4
Merged
Conversation
RDNA2 reads only the low half in v_cmp_*/v_cmpx_* over f16, u16 and i16, whatever op_sel says; VIctory honoured it and compared the wrong half. The arithmetic paths still honour op_sel. Adds a test for the f16 and u16 compares with op_sel set and clear (#833).
A change to a title texture's memory detiled every mip and slice again, and the watched path read the whole memory back first. A streamed texture filling page by page paid for all of it at every submission that sampled it. Layout::extents gives the tiled byte ranges each subresource is detiled from. Watched memory now reads again only the pages written since the last detiling; memory that is hashed instead is hashed per 64 KiB page. Either way only the subresources overlapping a changed page are detiled. The first detiling, and memory whose read copy is gone, still take the whole texture, and every subresource is still copied into the host texture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add hex = "0.4" crate dependency to victory-loader - Replace custom hexDecode() with hex::decode() - Add parse_victory_patch() and apply_victory_patches() functions - Support format: <module>:<rva hex>:<hex bytes> - Log patch applications via tracing::info!
s_buffer_load_dword* through a table's UAV took the constant buffer path: a CBV handle at the heap index of a UAV. Reading through it removes the device (WARP: "The GPU device instance has been suspended"). Such a load now reads the UAV raw, as a raw SRV is read and as vector buffer accesses read a UAV. The test writes a value to the VALU tests' raw UAV, reads it back with a scalar buffer load and stores that; it removed the WARP device before this change and passes on the hardware GPU and WARP after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An s_load_dword* whose address is a root descriptor's, and whose result the program never uses as a descriptor, reads that buffer's data. It stopped with "a descriptor read only as data". It is now read as global loads from a root view already are: a root SRV raw, a root CBV (or a root view the used-resource list does not name) as a constant buffer. A root UAV still stops, with its own reason. Test: dwords 2 and 3 of a root SRV and of a root CBV read with one s_load_dwordx2 and stored, exact on the hardware GPU and WARP; main refuses the program. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reserving VGPR moves
… use
The console compiler reads sizes from a descriptor's bits (a texture's
height and base level, say) in a loop of its own, apart from the loop
that samples through the same heap entry. That load's dwords were never
used as a resource, so its kind was unknown and the program was refused
("a descriptor read only as data"). Another load of the same entry (the
same parameter and offset, and the same computed term or the first lane
of the same VGPR in a waterfall pass) that is used as a resource now
gives the kind, and the fields are rebuilt from the host view as for any
descriptor read as data.
Translation census over the title's 26,503 containers, on #439's tree:
22,656 translated instead of 21,909 (747 more, none lost); the refusal
falls from 819 programs to 53, and 19 of the others reach a later one.
Of the shaders a run on an RTX 3060 refused, 172 more translate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDn5GupcrERtCYPyoztdtG
…ace_const caching in DXIL bitcode
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: vkd3d-proton refuses such a pipeline with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. (cherry picked from commit 169efcb84eb5d9d83c0af7fe525a54ada86f3a0d)
…form value
The console compiler builds the address of a table in the code in VGPRs
(s_getpc_b64 plus a uniform index through v_mov/v_lshlrev/v_add_co) and reads
it back with v_readfirstlane_b32 before the s_load. When every lane holds the
same value the first lane's read is that value, so the load is traced as if
it used the VGPR sum directly; a per-lane source is still refused, now by
name ("an address read from the first lane of a per-lane value").
Uniformity is decided from scalars, constants and first-lane reads through a
list of VALU operations (memoised per value).
Two tests: a uniform code-table address is traced (offset and computed index
checked); a per-lane one is refused by name. Measured on an integration tree:
ColorDownsampleCS and InitCS now translate and validate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwHrL6fhkpeG9ByE1rJxrt
Stacked on the first-lane code-table change. A code-table lookup walked by a loop counter (s_getpc_b64 + 4*i, i a VGPR phi whose exit is uniform) was refused as "an address read from the first lane of a per-lane value". A phi is now uniform when its arguments are and no lane-divergent branch (or loop it can leave lane by lane) can send lanes to it along different edges (greatest fixed point; divergent branches taint the joins and loops they reach). Uniform exits recognised: execz, scc of uniform values, vcc from comparisons of uniform values. v_readlane_b32 is uniform too, and a guarded VALU write needs its old value uniform. Measured on an integration tree: PrefilterAndIntegrateIrradianceSH and IrradianceCache_IntegrateIrradianceSH now translate and validate (dxil.dll); compute programs emitted 2212 -> 2214 there. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwHrL6fhkpeG9ByE1rJxrt
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Merge fixes: - interp(): a missing v_interp_p1 lowers to Missing (which check_missing_reach refuses when live), not an unconditional zero write. - descriptor_data(): read console descriptor words only when the descriptor- words handle is already bound for the program; unbound words stay Missing and a live read refuses, as upstream expects. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The test's GPU is not WARP: hardware that supports typed UAV on B5G5R5A1_UNORM or render-target on B4G4R4A4_UNORM keeps the flag, which the unconditional asserts rejected. Compare the kept flag with what CheckFeatureSupport reports on the running adapter. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wave 4 of upstream
Marvisak/VIctoryports: 17 PRs of shader-lowering and GPU correctness fixes (+5168/−337, 24 files).Shaders:
v_readfirstlaneof a uniform value; uniform phis (loop counters) resolve under those addressesMissingvalues across phi joins (#736) —handle_depstracks reads feeding a cached handlev_cndmask_b32resolvesStructured::otherand constant masksreplace_constcachingsame_entry_use)s_load_dword*/s_buffer_load_dword*from a root view's address / a UAV read their memory (root_view_smem)op_selGPU:
wait_for_shader_writesonsyncand enhanced barrier groups (orders dependent compute dispatches, #732)host_blenddrops blending on integer render targets (#806)FreshTablereleases its dynamic descriptor slots on drop; a rejected bind gives back only the tables it reservedstoredset)Merge notes:
handle_depskeyed by HEAD's 6-tuple handle key (props included);descriptor_datakeeps the raw-console-words fallback aftersame_entry_usefails;State::dynamicconverted toVec<FreshTable>with sentinel keys for root-SRV/address-map reservations.Tests: clippy
-D warningsandcargo fmtclean. One GPU-dependent test (host_texture_drops_unsupported_uav_flag_for_b5g5r5a1) depends on adapter feature reporting; SM 6.6 host tests still skip on GPU-less machines as before.Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed