Tracking & Static Audit: 45 New Source-Level Bugs + 150 Prioritized Backlog Items [Part 1/2] #1242
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#1242
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?
@hyperland956-lgtm on GitHub · 2026-11-24 16:45 UTC · original
Tracking & Static Audit: 45 New Source-Level Bugs (Shader IR/ISA, GPU Runtime, Tiling, HLE) + 150 Prioritized Backlog Items
https://github.com/Marvisak/VIctoryd2a4bae (main, 2026-11-24)2026-11-241. Highest-Impact Active Bottlenecks (Existing Canonical Issues/PRs — Do Not Duplicate)
#752(533 of 2,679 shaders untranslated in reported Linux/RDNA4 run; world mostly black).#508(prior PR#552closed unmerged — still unresolved onmain).#583(indirect count buffer & u32 budget wrap) and#595(async fence timeline &CopyMemoryToMemoryXordering).#189/#192(Wave32 cross-lane ops) and#216(page-endclwb& VEH hardening).2. Newly Identified, Non-Duplicate Findings (45 Separable Tasks)
Each item below was checked against all existing open, merged, and closed issues/PRs and comments, and can be implemented and tested in its own focused PR.
VIC-BT-001crates/victory-gpu/src/host.rslines504-511, 582, 931-963VIC-BT-002crates/victory-shader/src/ir.rslines139-143, 198, 217-264, 343-352, 594-601VIC-BT-003crates/victory-gpu/src/list.rslines160-230, 261-277VIC-BT-004crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/resource.rslinesdescriptor/host.rs:599-611, 648-696; resource.rs:827-836VIC-BT-005crates/victory-hle/src/modules/lifecycle.rslines296-310VIC-BT-006crates/victory-shader/src/structure.rslines946-965VIC-BT-007crates/victory-shader/src/emit/lower.rslines6793, 6866-6881, 6903-6906VIC-BT-008crates/victory-shader/src/emit/lower.rslines3626-3727VIC-BT-009crates/victory-shader/src/emit/lower.rs, crates/victory-shader/src/emit/shader.rslineslower.rs:3325-3343; shader.rs:241-264, 405-431VIC-BT-010crates/victory-shader/src/emit/lower.rslines4172-4204, 4894-4907, 4953VIC-BT-011crates/victory-shader/src/emit/lower.rslines6496-6506VIC-BT-012crates/victory-gpu/src/descriptor.rslines197-238VIC-BT-013crates/victory-gpu/src/draw.rslines422-435, 450VIC-BT-014crates/victory-formats/src/texture.rslines406-412VIC-BT-015crates/victory-shader/src/emit/lower.rslines6454-6475VIC-BT-016crates/victory-gpu/src/descriptor.rslines432-438VIC-BT-017crates/victory-shader/src/emit/lower.rslines6082-6110, 6329-6346VIC-BT-018crates/victory-shader/src/emit/lower.rslines2088-2128, 2009-2040VIC-BT-019crates/victory-shader/src/emit/lower.rslines3156-3166, 3219-3241VIC-BT-020crates/victory-hle/src/modules/gameinput.rslines576-579VIC-BT-021crates/victory-shader/src/emit/lower.rslines4315-4342, 4556-4567, 4629-4670, 5387-5399VIC-BT-022crates/victory-gpu/src/resource.rslines815-864VIC-BT-023crates/victory-hle/src/modules/net.rslines540-606VIC-BT-024crates/victory-shader/src/resource.rslines172-190, 261-269, 360-385VIC-BT-025crates/victory-shader/src/emit/lower.rslines2834-2873VIC-BT-026crates/victory-shader/src/structure.rslines1010-1021VIC-BT-027crates/victory-gpu/src/resource.rslines1153-1178VIC-BT-028crates/victory-shader/src/emit/lower.rslines4110-4121, 4147-4153 (vs 4486-4504)VIC-BT-029crates/victory-shader/src/emit/lower.rslines5541-5559VIC-BT-030crates/victory-shader/src/emit/lower.rs, crates/victory-shader/src/emit/wave.rslineslower.rs:4205-4232, wave.rs:321-333VIC-BT-031crates/victory-shader/src/emit/lower.rslines4217-4232VIC-BT-032crates/victory-hle/src/modules/xgameruntime.rs, crates/victory-hle/src/modules/dstorage.rs, crates/victory-hle/src/modules/xasync.rs, crates/victory-hle/src/modules/xuser.rs, crates/victory-hle/src/modules/xgamesave.rslinesdstorage.rs:239,264,299,986; xasync.rs:991; xuser.rs:273; xgamesave.rs:908VIC-BT-033crates/victory-hle/src/modules/xgameui.rslines216-229VIC-BT-034crates/victory-hle/src/modules/xpackage.rslines270-284VIC-BT-035crates/victory-gpu/src/host.rs, crates/victory-gpu/src/queue.rslineshost.rs:500-543; queue.rs:114-128VIC-BT-036crates/victory-hle/src/modules/xmem.rslines433-464VIC-BT-037crates/victory-hle/src/modules/dstorage.rslines125-143VIC-BT-038crates/victory-shader/src/emit/lower.rslines5811-5826VIC-BT-039crates/victory-hle/src/modules/net.rslines179-192VIC-BT-040crates/victory-hle/src/modules/storage.rslines90-102VIC-BT-041crates/victory-shader/src/emit/lower.rslines4071-4098VIC-BT-042crates/victory-shader/src/emit/lower.rslines4538-4541VIC-BT-043crates/victory-shader/src/emit/lower.rslines3925-3960VIC-BT-044crates/victory-shader/src/emit/lower.rslines1792-1799VIC-BT-045crates/victory-hle/src/modules/xsystem.rslines105-115Technical Details for All Newly Identified Findings
1.
VIC-BT-001— Host::execute() clobbers HostList::prelude command allocator/list when the same HostList appears twice in runs (P0)crates/victory-gpu/src/host.rslines504-511, 582, 931-963for list in runs, callslist.prelude(), and pushes the returned ID3D12CommandList intolistsbefore callingself.queue.ExecuteCommandLists(&lists)at line 532. Each HostList owns only a single reusable(prelude_allocator, prelude_list)pair, and HostList::prelude() (lines 931-963) unconditionally callsallocator.Reset()andlist.Reset()before recording barriers and closing it. Ifrunscontains the same HostList twice (e.g.,[L, L]or[L, M, L]), the secondlist.prelude()resets the allocator and command list while the first occurrence's COM pointer is still sitting inlists[]awaiting ExecuteCommandLists. Both entries inlists[]now point to the second prelude's barriers (and the first prelude's barriers are lost, leaving textures in the wrong D3D12 resource state for the first execution of L).self.prelude_list.cast().ok()) after resettingself.prelude_allocator.[L, L]in one ExecuteCommandLists call while T starts in COMMON. The first list.prelude() records COMMON->COPY_DEST into prelude_list; the second list.prelude() resets prelude_allocator/prelude_list and records RENDER_TARGET->COPY_DEST. ExecuteCommandLists executes[prelude_list, L, prelude_list, L], attempting RENDER_TARGET->COPY_DEST when T is actually in COMMON.runsinto separate ExecuteCommandLists batches whenever a HostList pointer repeats inruns) so two queued entries inlists[]never alias the same underlying prelude allocator/command list.M)2.
VIC-BT-002— SSA construction inserts NONE (Value(u32::MAX)) into phi.args for unreachable predecessors, panicking remove_trivial_phis in release builds (P0)crates/victory-shader/src/ir.rslines139-143, 198, 217-264, 343-352, 594-601S)3.
VIC-BT-003— create_list() and create_list_x() ignore the pInitialState pipeline parameter, dropping initial draws/dispatches (P0)crates/victory-gpu/src/list.rslines160-230, 261-277_pipeline: This) and create_list_x() (line 187:_pipeline: This) discard the pInitialState parameter and call new_list(), which initializesstate: Default::default()(line 227) withpipeline: null. By contrast, reset() (line 272) properly callsstate.reset(pipeline)to bind the initial pipeline state. Per D3D12 specification, CreateCommandList opens the command list with pInitialState already bound (if non-null), just like Reset.pipeline::host_pipeline(self.pipeline)and drop the draw when pipeline is null. Also verified that pipeline::bound(pipeline) is not called on initial state during create_list/create_list_x.pipelineinto new_list(), callcrate::pipeline::bound(pipeline)if non-null, and initializestatewithstate.reset(pipeline)(matching reset() at line 272).S)4.
VIC-BT-004— fits() rejects NULL-desc and DXGI_FORMAT_UNKNOWN SRV/UAVs on typed textures promoted to typeless by host_texture() (P0)crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/resource.rslinesdescriptor/host.rs:599-611, 648-696; resource.rs:827-836typeless == true) and seesview == 0, returning!typeless(false). make() then returns None and null_for() silently writes a null descriptor into the host heap.RtvRecord::host_desc) which explicitly callscrate::resource::view_format(self.resource)to recover the title's original typed format when creating NULL-desc RTVs/DSVs on typeless-promoted resources. descriptor/host.rsmake()/fits()never performs that lookup for SRV/UAVs.S)5.
VIC-BT-005— lifecycle.rs: Missing RegisterAppConstrainedChangeNotification and UnregisterAppConstrainedChangeNotification in api-ms-win-core-psm-appnotify-* (P0)crates/victory-hle/src/modules/lifecycle.rslines296-310S)6.
VIC-BT-006— s_cmp_eq/lg_u32/u64 comparing two lane masks is lowered to per-lane equality instead of wave-wide uniform reduction (P0)crates/victory-shader/src/structure.rslines946-965M)7.
VIC-BT-007— Critical-edge map overwrites first edge block when LaneExit::Branch has taken == not_taken, emitting invalid DXIL PHIs (P1)crates/victory-shader/src/emit/lower.rslines6793, 6866-6881, 6903-6906S)8.
VIC-BT-008— DPP16/DPP8 ignores fi (fetch-inactive) and source-lane EXEC activity for bound_ctrl (P1)crates/victory-shader/src/emit/lower.rslines3626-3727bound_ctrl,fetch-inactive,dpp8,dpp16, andfiinlower.rs(0 hits).gfx1031(ProjectLeonidaL/leonidadesign.md:266,crosslane_fuzz.py --dpp-sweep --oracle hw), DPP16/DPP8 must check whether the source lane is active (EXEC[src]) in addition to row/bank bounds: whenfi == 0and the source lane is inactive,bound_ctrl == 1returns0andbound_ctrl == 0disables writing the destination VGPR (preserving oldvdst).lower.rs:3626-3727never reads thefibit for DPP16 or DPP8 and never checksEXEC[src], unconditionally reading stale/undefined VGPR values from inactive lanes.EXECmasks. Falsification: divergent fragment quads and subgroup reductions routinely run DPP16 (row_shr,quad_perm,row_bcast) and DPP8 under partialEXEC; any inactive neighbor returns stale garbage instead of0or preservingvdst.v_mov_b32 v0, 0x12345678; v_mov_b32 v1, 0xAAAA5555; s_mov_b32 exec_lo, 0x55555555; v_add_u32_dpp v1, v0, v0 row_shr:1 bound_ctrl:1 fi:0. On RDNA2 hardware, active lane 2 reads inactive lane 1 as0(v1 = v0 + 0); VIctory reads0x12345678from inactive lane 1.fibit for both DPP16 and DPP8; compute the active-lane mask viawaveActiveBallot(true)(or trackedEXEC), treat(!in_bounds || (!fi && !src_active))as out-of-bounds, and applybound_ctrl(0whenbound_ctrl == 1, preserve oldvdstwhenbound_ctrl == 0).vdstwhenbound_ctrl == 0. (Estimated size:M)9.
VIC-BT-009— Immediate sampler used non-comparison first then comparison later emits mismatched annotateHandle vs dx.resources metadata (P1)crates/victory-shader/src/emit/lower.rs, crates/victory-shader/src/emit/shader.rslineslower.rs:3325-3343; shader.rs:241-264, 405-431S)10.
VIC-BT-010— Integer VOP3 clamp (unsigned saturation) silently ignored on carry-out and non-carry add/sub ops (P1)crates/victory-shader/src/emit/lower.rslines4172-4204, 4894-4907, 4953v_add_co_u32 clamp,v_add_nc_u32 clamp,add_sub_carry(0 hits).v_add_co_u32,v_sub_co_u32,v_subrev_co_u32,*_ci_u32,v_add_nc_u32,v_sub_nc_u32,v_subrev_nc_u32, orv_add3_u32inspectv.clamp. Measured on RDNA2gfx1035silicon (Leonida/tools/int_hw_probe.py), VOP3clampsaturates unsigned overflow to0xFFFF_FFFFand underflow to0while keeping the true carry/borrow out insdst.clamp. Falsification: synthetic VOP3v_add_co_u32 ... clamptest.v_add_co_u32 v0, vcc_lo, 0xFFFFFFF0, 0x20 clamp-> expectedv0 = 0xFFFF_FFFF, vcc_lo = 1; currently wraps tov0 = 0x10.v.clampis true, saturaterusing the carry/borrow bit (select(carry, 0xFFFF_FFFF, r)for add,select(borrow, 0, r)for sub; widen toi64forv_add3_u32).v.clamp. (Estimated size:S)11.
VIC-BT-011— Pixel shader export discards on !guard of DONE instead of tracking last exp VM (Valid Mask) and per-MRT color masks (P1)crates/victory-shader/src/emit/lower.rslines6496-6506valid mask,exp vm,e.done, anddiscardinlower.rs:6496(0 hits).gfx1036(ProjectLeonidaL/leonidadesign.md:267,ps_oracle.py), pixel survival is governed by theEXECmask of the lastexpwithVM=1(Valid Mask), MRT color exports are per-MRT last-write masked, andexp null done vmunder partialEXECkills only inactive lanes while keeping active lanes alive if a prior color export wrote them.lower.rs:6496-6506ignorese.vm, discards solely on!guardofe.done, and rejects conditional non-doneexports.exp mrt0 ... done vmat shader exit wheredoneandvmcoincide. Falsification: multi-MRT shaders with early-outexp null ... done vmor separateexp mrt0+exp mrtz ... done vm(alpha-to-coverage, depth-only discard, G-buffer deferred shaders) decoupleVM,DONE, and per-MRT masks.exp mrt0 ...under fullEXEC, then narrowingEXECto half the quad and runningexp mrt1 ... done vm(orexp null ... done vm). Hardware uses the lastVM=1export'sEXECmask for pixel survival and preserves MRT0 for surviving pixels; VIctory mis-discards or rejects the conditional non-done export.vm_liveboolean updated on everyexpwithvm == 1(overwriting with currentEXEC), emitdiscardat shader exit based on!vm_live, and allow conditional non-doneMRT exports by latching per-MRT output variables underEXEC.discardthrough a unified exit block after all exports. (Estimated size:M)12.
VIC-BT-012— RtvRecord::desc() and depth_desc() hardcode TEXTURE_2D for NULL-desc RTV/DSVs, breaking MSAA, 2DArray, 3D, and 1D targets (P1)crates/victory-gpu/src/descriptor.rslines197-238self.described == 0), RtvRecord::desc() and depth_desc() call host_desc(TEXTURE_2D) with a hardcoded dimension (4 for RTV_DIMENSION_TEXTURE2D, 3 for DSV_DIMENSION_TEXTURE2D) and zeroed union fields. Whenever crate::resource::view_format() returns Some(fmt) (e.g., for typeless-promoted depth or sRGB+UAV textures), host_desc() emits a TEXTURE2D view description regardless of the underlying resource's actual dimension, sample count, or array size. D3D12 rejects TEXTURE2D views on MSAA textures (requires TEXTURE2DMS), 1D/3D textures, and 2D array textures.S)13.
VIC-BT-013— State::prepare() compares raw title heap pointers (host_heaps != heaps), creating an ABA bug on heap release and reallocation (P1)crates/victory-gpu/src/draw.rslines422-435, 450self.host_heaps: [This; 2](raw pointers to titleHeapobjects) and only callslist.list.SetDescriptorHeaps(&bound)whenself.host_heaps != self.heaps. Notice that for pipelines right below (line 450), State specifically avoids this ABA hazard by comparing the underlying host COM pointer (host.pso.as_raw()). For descriptor heaps, however, if a title destroys a heap and creates a replacement heap that the Rust allocator places at the sameThisaddress,self.host_heaps == self.heapsevaluates true even though the underlying hostID3D12DescriptorHeapCOM object is completely different, soSetDescriptorHeapsis skipped.self.host_heapsstores[This; 2](the title COM pointer) rather than[*mut c_void; 2](the hostID3D12DescriptorHeap::as_raw()pointers). Even within a single command list (or across dynamic heap recreation between draws), ABA onBox<Heap>reuse silently skips binding the new host descriptor heap.self.host_heaps == self.heapsis true, so the host command list never calls SetDescriptorHeaps with H2's host ID3D12DescriptorHeap.[usize; 2]of the hostID3D12DescriptorHeap::as_raw() as usizepointers inself.host_heaps(matchingself.host_pipelineat line 450) and compare against the resolved host heap COM pointers before skippingSetDescriptorHeaps.S)14.
VIC-BT-014— Thick 3D mip-tail predicate omits mip_depth(i) <= fixed[2] (P1)crates/victory-formats/src/texture.rslines406-412first_tail_mip,fixed[2],tail_max[2],mip_depth(0 hits).377-382compute thick 3Dtail_max(including halvingtail_max[2]whenblock_log2 % 3 == 2), but line408checks onlyw <= fixed[0] && h <= fixed[1] && d.mips - i <= max_in_tail, omittingmip_depth(i) <= fixed[2]. Deep narrow 3D textures (e.g.16x16x64) falsely enter the 1-block mip tail at mip 0.fixed[0]when deep. Falsification: unit test with16x16x64, 4 mips,Sw64KbSimmediately failsLayout::newinvariant (offset overlaps / tail overflow).victory-formats/src/texture.rs:Desc { dimension: Tex3d, width: 16, height: 16, depth: 64, mips: 4, element_bytes: 4, swizzle: Sw64KbS }-> mip 0 hastail.is_some()despite 64 slices > block depth.408toif w <= fixed[0] && h <= fixed[1] && (!thick || mip_depth(i) <= fixed[2]) && d.mips - i <= max_in_tail.XS)15.
VIC-BT-015— buffer_load_format_d16_x/xyz zeroes high 16 bits of destination VGPR and converts integer formats via legacyF32ToF16 (P1)crates/victory-shader/src/emit/lower.rslines6454-6475buffer_load_format_d16. PR #169 only addedtbuffer_load_format_d16_*packing and still zeroes odd-channel high halves; 0 hits forbuffer_load_format_d16_x/xyzhigh-half preservation or integer format handling atlower.rs:6454-6475.gfx1031silicon (ProjectLeonidaL/leonidashader_validation.md:1642,1658-1665,d16_format_probe.py),buffer_load_format_d16_xandbuffer_load_format_d16_xyzpreservevdst[31:16]on the odd trailing VGPR, and integer buffer formats (UINT/SINT) saturate to 16-bit integer rather than converting as float.lower.rs:6454-6475unconditionally runslegacyF32ToF16on every channel (corruptingUINT/SINTformats) and writes the odd trailing channel directly tovdstwithvdst[31:16] = 0.vdstbeforebuffer_load_format_d16_x. Falsification: RDNA2 16-bit register packing routinely allocates two independent 16-bit values to the low and high halves of one VGPR, andd16_format_probe.pyconfirms hardware preserves the high half.v0 = 0xDEAD_0000, executebuffer_load_format_d16_x v0, v1, s[0:3], 0 idxenon a32_UINTbuffer containing70000. Hardware producesv0 = 0xDEAD_FFFF(high half preserved, integer saturated to0xFFFF); VIctory produces0x0000_7C00(high half zeroed, float-converted to+inf).(old_vdst & 0xFFFF_0000) | (lo & 0xFFFF)vialow_half(), and branch on the descriptor numeric format soUINT/SINTsaturate to[0, 65535]/[-32768, 32767]instead of callinglegacyF32ToF16.d16_format_probe.pyhardware behavior. (Estimated size:S)16.
VIC-BT-016— create_cbv() silently ignores NULL desc instead of writing a null CBV descriptor, leaving stale views active (P1)crates/victory-gpu/src/descriptor.rslines432-438if let Some([lo, hi, size, _]) = words(desc). Under D3D12, passing pDesc == NULL to ID3D12Device::CreateConstantBufferView is explicitly valid and initializes a null CBV descriptor (BufferLocation = 0, SizeInBytes = 0) that returns 0 on all reads. Because create_cbv() returns early when desc is null, neither the title slot nor the mirrored host descriptor heap slot is updated, leaving whatever View (and host descriptor) previously occupied that slot intact.View::Constant(0, 0)is already handled cleanly (shadow::find(0, 0) returns None -> null_for() calls CreateConstantBufferView with a zeroed D3D12_CONSTANT_BUFFER_VIEW_DESC). By contrast, create_srv() and create_uav() always call record() even when desc is null.S)17.
VIC-BT-017— d16 image_load corrupts 32-bit integer texels and zeros high 16 bits on odd-channel loads (P1)crates/victory-shader/src/emit/lower.rslines6082-6110, 6329-6346d16integer / high half. PR #169 coverstbuffer_load_format_d16packing; PR #632/#571 cover LDS d16; none fiximage_load d16integer saturation or odd-channel high-half preservation.gfx1036(Leonida/tools/image_d16_probe.py): (1)image_load d16of 32-bitUINT/SINTtexels saturates to[0, 65535]/[-32768, 32767], whereas line6088unconditionally runslegacyF32ToF16; (2) odd-channeld16loads preserve the upper 16 bits of the destination VGPR, whereas lines6094-6109writep[0]directly with high 16 bits zeroed.v0 = 0x5A5A_0000, runimage_load v0, v[1:2], s[0:7] dmask:0x1 d16. Expectedv0[31:16] == 0x5A5A; observed0x0000.(old & 0xFFFF_0000) | (lo & 0xFFFF)vialow_half(), and use integertextureLoad.i32+ 16-bit saturation when descriptor numeric format isUINT/SINT.low_half). (Estimated size:M)18.
VIC-BT-018— ds_swizzle_b32 reads undefined/stale VGPRs from inactive source lanes instead of returning 0 (P1)crates/victory-shader/src/emit/lower.rslines2088-2128, 2009-2040ds_swizzle_b32,quad_pick,read_lane. PR #606 covers rotate/FFT modes (0xC000+); PR #189/#192 cover Wave32/64 lane indexing; none mask inactive source lanes to 0.ds_swizzle_b32returns0when the source lanesrcis inactive (EXEC[src] == 0). VIctory emits barewaveReadLaneAt.i32/quadReadLaneAt.i32without checking whethersrcis active. In DXIL, reading an inactive lane is undefined behavior and returns stale VGPR values on NVIDIA/AMD/Intel.ds_swizzle_b32under uniform full-waveEXEC. Falsification: divergent compute/pixel quad reductions execute with partialEXECmasks; synthetic test withEXEC = 0x55555555andv0 = 0xDEADBEEFproves stale reads.v0 = 0xDEADBEEF, maskEXEC = 0x55555555, executeds_swizzle_b32 v1, v0 offset:swizzle(SWAP,1). Expectedv1 == 0on active even lanes; observed stale/undefined bits.waveActiveBallot(true)or tracked EXEC mask), test bitsrc, andselect(src_active, read_val, 0)before writingdst_reg.ds_swizzle_b32. (Estimated size:S)19.
VIC-BT-019— format_load (tbuffer_load_format_*) drops high byte on unaligned 16-bit dword-straddling loads, fills missing channels with (0,0,0,1) instead of 0, and quiets f16 sNaNs (P1)crates/victory-shader/src/emit/lower.rslines3156-3166, 3219-3241format_load,tbuffer_load_format,legacyF16ToF32NaN, and dword-straddling 16-bit load (0 hits).lower.rs:3156-3166, 3219-3241against measured RDNA2 hardware contracts (ProjectLeonidaL/leonidabuffer_formats.md:50-52,shader_validation.md:1671-1711f16_widen_probe.py,design.md:278,344) reveals three distinct bugs: (1) 16-bit element loads atoff & 3 == 3shift a single 32-bit dword right by 24 bits without fetching the next dword, silently zeroing the high byte; (2) missing channels beyond the format's channel count return(0, 0, 0, 1)instead of0(beforeDST_SELswizzling;DST_SELsupplies1only when explicitly set toSEL_1); (3)16_FLOAT/10_11_11_FLOAT/11_11_10_FLOATwidening useslegacyF16ToF32, which quiets signaling NaNs and canonicalizes payloads instead of preserving unquietedsign | 0x7F800000 | (payload << 13).off & 3 == 3, and 1/2/3-channel formats withDST_SEL_W = SEL_Wexpose the(0,0,0,1)vs0bug immediately.tbuffer_load_format_xof16_UINTat byte offset 3 from[0x00, 0x00, 0x00, 0x34, 0x12]-> hardware reads0x1234, VIctory reads0x0034. (2)tbuffer_load_format_xyzwof32_UINTwithDST_SEL = XYZW-> hardware returns(x, 0, 0, 0), VIctory returns(x, 0, 0, 1)in W. (3)16_FLOATvalue0x7C01(sNaN) -> hardware widens to0x7F802000,legacyF16ToF32quiets bit 22 to0x7FC02000.(lo >> 24) | (hi << 8)whenoff & 3 == 3for 16-bit elements; zero-fill absent raw channels before applyingDST_SEL; preserve raw f16 NaN sign and payload bits on NaN widening.format_loadhelper. (Estimated size:S)20.
VIC-BT-020— gameinput.rs: IGameInput/IGameInputDevice/IGameInputReading QueryInterface unconditionally returns E_NOINTERFACE without supporting IID_IUnknown or clearing *out (P1)crates/victory-hle/src/modules/gameinput.rslines576-579S)21.
VIC-BT-021— half_src reads inline float constants as f16 bits instead of f32 bits for 16-bit integer instructions (P1)crates/victory-shader/src/emit/lower.rslines4315-4342, 4556-4567, 4629-4670, 5387-5399half_src,f16_operand, and inline float constants on 16-bit integer ops (0 hits; PR #78 only coveredv_fma_mix).ProjectLeonidaL/leonidashader_validation.md:2053,Kajcsi/G6Recompdocs/shaders.md:805-808), inline float constants (240..=248, e.g.0.5,1.0,2.0,4.0) only decode to 16-bit f16 bit patterns (0x3C00for1.0) when the instruction's source operand type isF16; for 16-bit integer instructions (v_cvt_f16_u16,v_cvt_f16_i16,v_add_nc_u16,v_sub_nc_u16,v_mul_lo_u16,v_lshlrev/lshrrev/ashrrev_*16,v_min/max_u16/i16,v_cmp_*_u16/i16), hardware decodes them as 32-bitF32bits (0x3F800000, so low 16 bits =0x0000and high 16 bits =0x3F80).lower.rs:4315-4342unconditionally callsf16_operandinsidehalf_srcfor all 16-bit ops regardless of whether the operand is float or integer.240..=248as operands to 16-bit integer ops. Falsification: LLVM/DXC frequently exploitsop_sel+ inline1.0/2.0/4.0constants as compact encodings for0x3F80,0x4000,0x4080bit masks or constants in 16-bit integer ops to avoid a 32-bit literal dword.v_add_nc_u16 v0, 1.0, v1(operand code 242,op_sel:[0,0],v1 = 5). Hardware decodes1.0as0x3F800000-> low half0x0000, yieldingv0 = 5; VIctory decodes1.0viaf16_operandas0x3C00, yieldingv0 = 0x3C05.half_srcintohalf_src_f16(usingf16_operand) andhalf_src_i16(using 32-bits()+ 16-bitop_selextraction), and route all 16-bit integer operands (u16/i16/b16) throughhalf_src_i16.S)22.
VIC-BT-022— host_texture() passes non-null pOptimizedClearValue without ALLOW_RENDER_TARGET or ALLOW_DEPTH_STENCIL flags (P1)crates/victory-gpu/src/resource.rslines815-864clear_valuewhenever the title'sclearpointer is non-null and forwards it tohost.device.CreateCommittedResource(..., clear_value.as_ref()...). Under PC D3D12, passing a non-nullpOptimizedClearValuewhenDesc.Flagshas neitherD3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET(0x1) norD3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL(0x2) — or whenDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER— is strictly illegal and fails withE_INVALIDARG. Xbox/console D3D12.X titles can pass non-null clear values on resources whose console-specific flags are masked off byd.flags &= PC_FLAGSat line 815.d.flagsis masked withPC_FLAGSandDEPTH/UNORDEREDadjusted, butclear_valueis never gated ond.flags & (0x1 | 0x2) != 0before calling CreateCommittedResource.clear_valueon!clear.is_null() && d.dimension != BUFFER && (d.flags & (0x1 | 0x2)) != 0in host_texture() (resource.rs:839).S)23.
VIC-BT-023— net.rs: getaddrinfo / GetAddrInfoW / GetAddrInfoEx{A,W} fail with WSAHOST_NOT_FOUND without setting *result = NULL (P1)crates/victory-hle/src/modules/net.rslines540-606addrinfo* res = nullptr;before calling getaddrinfo do not crash, but C/C++ code relying on the documented Win32 Outptr_result_maybenull guarantee (including common HTTP/TLS libraries) leaves res uninitialized.let mut res = 0xDEAD_BEEF as *mut c_void;and call getaddrinfo(c"example.com", null, null, &mut res); returns WSAHOST_NOT_FOUND while res remains 0xDEAD_BEEF.if !result.is_null() { unsafe { *result = std::ptr::null_mut(); } }before returning WSAHOST_NOT_FOUND in all four resolver hooks.S)@ArnabSaga on GitHub · 2026-11-24 16:48 UTC · original
I'd like to investigate VIC-BT-003, which concerns the initial pipeline state being ignored by CreateCommandList and CreateCommandListX.
I'll independently verify the reported behavior, examine pipeline lifetime and state initialization, and develop targeted regression tests for the supported graphics and compute paths.
I can validate the implementation on native NVIDIA D3D12 and WARP using synthetic fixtures.
@BaggyALPHA on GitHub · 2026-11-24 17:25 UTC · original
I checked item 14 (VIC-BT-014) against the GFX10 Addrlib implementation and the proposed synthetic case.
ComputeSurfaceInfoMacroTiledcomputes mip depth but passes only width, height and remaining levels toIsInMipTail. Depth is handled separately when sizing the surface. VIctory also accounts for depth by storing a tail block per thick depth slab.I enumerated every texel address for the proposed 16 × 16 × 64 volume with four mips, four-byte elements and 64 KiB standard swizzle. The first tail mip is 0, as reported. All 18,720 texels have distinct addresses within the allocation, so I could not reproduce the claimed overlap or overflow. Adding a depth predicate would change the first tail mip away from the GFX10 reference.
AI-assisted (Codex).
@vladbondarenko97 on GitHub · 2026-11-24 17:32 UTC · original
Two items in this list look like false positives, checked against
mainffe310e, so nobody spends time on them:mip_depth(i) <= fixed[2]): AMD's own addrlib does the same as VIctory. Mesa'sGfx10Lib::IsInMipTail(src/amd/addrlib/src/gfx10/gfx10addrlib.cpp) decides tail membership frommipWidth <= mipTailDim.w && mipHeight <= mipTailDim.h && numMipsToTheEnd <= maxNumMipsInTail; depth is not compared, also for thick 3D swizzles. Adding the depth test would make VIctory disagree with the hardware layout, not fix it.v_cvt_f32_f16drops abs/neg,v_cvt_f16_f32drops clamp withop_sel == 0): the arm the item points at is not reached for these opcodes.valu16handlesv_cvt_f32_f16/v_cvt_f16_f32before that arm, so the quoted lines are dead code for them. Whethervalu16itself honours abs/neg/clamp is a separate question I have not checked.Several other items already have open PRs (e.g. #1274, #1268, #1313, #1308), as noted in the thread.
AI use: Claude Code (Claude Opus 5.5) read the code and the addrlib source; I checked both points before posting.
@pickles976 on GitHub · 2026-11-24 17:50 UTC · original
Part 1/2 cross-check from the sibling runtime: VIC-BT-016 (NULL-desc
create_cbv()silently ignored → stale view) is absent by construction in ivall/xcl — our CBV slot write funnels null and non-null through the same expression (real.rs:1783:desc.as_ref().map_or((0, 0), …)→cbv_words(va, size)), so a NULL desc always writes a zero (null-CBV) descriptor to the slot; staleness is unrepresentable. Same invariant your fix restores, reached structurally — worth stating in your fix text as the general rule: the descriptor write is unconditional; only its words depend on desc. (Part 2 items 026/040/030/031 already covered in my #1249 comment — raw-VCC branch test and symlink-skipping quota walk both already correct on our side, with pointers.)@Marvisak on GitHub · 2026-11-25 10:12 UTC · original · edited 2026-11-26 06:43 UTC
Automated triage for the maintainers.
This is a list of 45 static-audit claims (Part 2 is #1249). A list this long can't be confirmed or closed as one bug, so each item is handled in its own PR or issue, which should come with a test that fails on
main. Many already do (the open PRs that link #1242).Merged into
mainsince the audit (current main63bcca4):create_list/create_list_x: #1446CreateConstantBufferView: #2449.create_cbvincrates/victory-gpu/src/descriptor.rsnow recordsView::Constant(0, 0)when the description is null. Open PR #2889 adds a WARP readback test for it.v_interp_p2_f16modifiers: #1696Checked and not a bug on
main:decodeincrates/victory-shader/src/gfx10/mod.rsdecodes only instructions reachable from offset 0, so code after an unconditionals_branchnever becomes a block and the join has only the branching predecessor (the latest comment also reports a test showing this).mainpins this incrates/victory-formats/src/texture.rs(deep_volumes_keep_their_chain_in_each_slabs_tail, using this item's 16x16x64 case, andlayouts_match_addrlib). The depth-predicate PRs #1494 and #1499 were closed unmerged.valu16incrates/victory-shader/src/emit/lower.rshandlesv_cvt_f32_f16andv_cvt_f16_f32before the cited arm.crates/victory-hle/src/modules/xsystem.rsreportsfamilyas"Xbox", which the latest comment matches against the public GDK documentation; no public source was found for the value the audit proposes.Next to item 012 (view descriptions with
DXGI_FORMAT_UNKNOWN):makeincrates/victory-gpu/src/descriptor/host.rsresolves an UNKNOWN format from the resource for explicit SRV and UAV descriptions (#1273). Explicit RTV and DSV descriptions with UNKNOWN still reach the host unchanged onmain. Open PR #2763 covers those with WARP tests, and #1406 (open) covers default descriptions.The remaining items stay open until a PR with a failing test shows each one.
Generated by Claude Code
@Halfect on GitHub · 2026-11-25 12:18 UTC · original
Note on
VIC-BT-014(thick 3D mip-tail omitsmip_depth(i) <= fixed[2]): this one is a false positive. AMD addrlib does not bound a thick mip's depth to the tail block's depth; when every mip's width and height fit, the whole chain tails from mip 0 and each depth slab gets its own tail block (mipChainInTail). The repository already pins that behavior with addrlib-derived addresses intexture::tests::deep_volumes_keep_their_chain_in_each_slabs_tail— using exactly this item's 16x16x64/SW_64KB_Sreproducer (first tail mip 0, size 4×65536) — and in the[16, 16, 64]and[4, 4, 16]rows oflayouts_match_addrlib(Mesa addrlibAddr2ComputeSurfaceInfo). I implemented the proposed predicate to check it: both addrlib-reference tests fail (cargo test --locked -p victory-formats --lib; first_tail 0→2, size 262144→786432 on 16x16x64). Reverted; suggest striking the item. AI-assisted (Kimi).@andrewpozdnakov7-jpg on GitHub · 2026-11-25 19:59 UTC · original
I checked a case adjacent to VIC-BT-012 in PR #2763. An explicit RTV or DSV can request format inheritance with DXGI_FORMAT_UNKNOWN. On main
13f91cathe two tests see UNKNOWN at the host view. After 6cdae0e, a synthetic clear through VIctory reads sRGB red [137, 0, 0, 255] from the selected slice while the other stays blue. The DSV retains mip 1 and READ_ONLY_DEPTH and takes D32_FLOAT. Both tests reproduced six times before and after on WARP.#1406 covers default descriptions. The current heads merge cleanly together in a local merge-tree check. Please retain the Git author on cherry-pick or rebase. If you fold the fix or tests into another commit, please add the following trailer.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
AI-assisted with Codex. Synthetic textures on WARP.
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 23:10 UTC · original
For VIC-BT-016, #2889 adds a Windows/WARP shader readback test to the descriptor-record coverage merged in #2449. The same test on
120233cf912173e4411431a4b47579ef420310feretained0x11223344in both slots after clearing the descriptor. On base842b0cb76f8f5fa9289bd779783c51ec24d75302both the mirrored and reused table slots read zero after the clear, in six runs. Test commit.Please keep the Git author if cherry-picking the test. If folding it into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.@Halfect on GitHub · 2026-11-26 06:00 UTC · original
Checked three entries against current main (
63bcca4); all three look invalid:VIC-BT-002— does not reproduce:gfx10::decodefollows control flow ("Decodes every instruction reachable from offset 0"), so instructions after an unconditionals_branchare never decoded and never become blocks; the join's only predecessor is the branching block. Same conclusion as #1619's investigation (incl. its 937k-program sweep). Ans_branch-over-dead-code test shows 2 blocks,preds == [0], no phi.VIC-BT-014— the predicate matches AMD's own addrlib2:Gfx10Lib::IsInMipTail(src/amd/addrlib/src/gfx10/gfx10addrlib.h, mirrored in Mesa) checks onlymipWidth,mipHeightandnumMipsToTheEnd— no depth term. Addingmip_depth(i) <= fixed[2]would diverge from the hardware layout. The 16x16x64/4-mip/SW_64KB_S case also round-trips fine on main (no overlaps, no out-of-bounds).VIC-BT-045— the public GDK documentation forXSystemAnalyticsInfo::familygives the examples "Xbox" and "Windows" (learn.microsoft.com/gaming/gdkXSystemAnalyticsInfo), so the currenttext("Xbox")matches the documented value; I found no public source for "Windows.Xbox".AI-assisted (Kimi).
@kotekompotek on GitHub · 2026-11-26 12:35 UTC · original
More audit rows verified dead against current main — filing so nobody burns a PR on them:
VIC-BT-005:RegisterAppConstrainedChangeNotification/UnregisterAppConstrainedChangeNotificationexist and are exported underapi-ms-win-core-psm-appnotify-*(lifecycle.rs:84-92, 597-604).VIC-BT-033:dialog::procedurenow guardsWM_COMMANDwithif user_data == 0 { return 0 }(xgameui.rs).VIC-BT-034: vtable slot 0x50 isunregister_progress, notmissing::<10>(xpackage.rs).VIC-BT-003:pInitialStateis honored —state.set_pipeline(pipeline)+pipeline::bound(pipeline)in create_list_x (fixed ine52777a).VIC-BT-016:create_cbvwrites a null CBV for a null desc.VIC-BT-036: already covered by open PRs #1935 / #1445.VIC-BT-013: covered by open PR #1331 (host-identity compare).VIC-BT-039: covered by open PR #2001.VIC-BT-037: #2452/#3018.VIC-BT-040: #2990.VIC-BT-012: #1406.Still real per my check:
VIC-BT-027(fixed in #3198).