Repository navigation
Shaders: lower 24-bit mul_hi, saturating 16-bit packs, integer dot pr… - #157
9hvn9yt2vk-netizen wants to merge 1 commit into
Conversation
…oducts and v_ldexp_f32 Ten VALU instructions the translator refused, so any shader using one dropped its draws or dispatches: - v_mul_hi_u32_u24 / v_mul_hi_i32_i24: the high 32 bits of the 48-bit product, with the operands taken as v_mul_u32_u24 takes them; - v_cvt_pk_u16_u32 / v_cvt_pk_i16_i32: both sources saturated to 16 bits and packed (src0 low); - v_dot2_i32_i16, v_dot2_u32_u16, v_dot4_i32_i8, v_dot4_u32_u8, v_dot8_u32_u4: products of the packed fields summed into src2, wrapping; clamp and operand selects are refused; - v_ldexp_f32: src0 * 2^src1 as three exact power-of-two factors whose exponents stay in the normal range (src1 clamped to +-375, past which every finite nonzero src0 has over- or underflowed). Found by lowering every GFX10 ALU opcode alone in a pixel shader whose export depends on it. The formulas were checked against the ISA definitions on random inputs (0 differences; ldexp differs only where a result turns denormal before the last factor, noted as a shortcut). Tests: packing_dot_and_ldexp_instructions_translate (each one goes through the whole translation; fails without this change), and GPU tests in valu_tests comparing every instruction with its definition on edge values. The GPU tests were type-checked and clippy-clean for x86_64-pc-windows-msvc but not run (no Windows machine here).
9hvn9yt2vk-netizen
left a comment
There was a problem hiding this comment.
hey
fast
|
Tested
No game data used. |
|
Overlap note: Static review, not built or run. |
…t packs, integer dot products and v_ldexp_f32) into the integration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
Marvisak#157 adds a vop3p helper without modifiers to the same file; a distinct name and a place before the file's last test let the two changes merge.
|
Ran this PR's tests on Windows, since the description says the GPU tests have not run yet. Windows 11 (26300), AMD Radeon RX 5700 (RDNA1, driver 26.11.2) and WARP,
Merged together with #465 (the f16 dot products) on AI-assisted (Claude Code ran the builds over SSH and read the logs); every run is on my machine. No game files. |
… & shader ops - Prefer high-performance discrete GPU via IDXGIFactory6::EnumAdapterByGpuPreference and VICTORY_ADAPTER (index or name substring) in victory-gpu and victory-shader (Marvisak#208/Marvisak#1132) - Cap shader-visible sampler heaps at D3D12's 2,048 architectural limit instead of failing heap creation (Marvisak#100/Marvisak#86) - Fall back to the in-memory translated shader if shader-cache disk write fails (Marvisak#358) - Add F11 / Alt+Enter borderless fullscreen toggle and clean WM_CLOSE handling to both title windows (lifecycle.rs) and VIctory's fallback window (host.rs); clamp fit_into() dimensions to >= 1 (Marvisak#451) - Enhance PC keyboard+mouse fallback gamepad with Space/LShift/R/LCtrl aliases, LMB/RMB/MMB triggers, and RMB/F9 mouse camera look; support null-device cross-device previous/next reading walk (Marvisak#361) - Fall back to a no-op display deferral when PowerSetRequest returns ERROR_NOT_SUPPORTED - Clamp short virtual-drive '..' paths at the virtual drive root (Marvisak#182) - Wake and cancel sleeping delayed callbacks immediately on XTaskQueueTerminate (Marvisak#132) - Cache XMA IMDCT rotation sin/cos tables across subframes (Marvisak#172) - Lower additional RDNA2 VALU instructions (v_mul_hi_{u,i}32_{u,i}24, v_mad_{u,i}32_{u,i}16, v_lerp_u8, v_sad_u{8,16,32}, v_cvt_pk_{u,i}16_{u,i}32, v_dot{2,4}_{i,u}32_{i,u}{16,8}) with DXIL validation and conditional INT64 feature flagging (Marvisak#157) - Add portable victory.toml lookup next to victory.exe, interactive [S] Setup wizard and [K] Controls guide in victory.exe, and scripts/build-windows.ps1 release packager Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
…oducts and v_ldexp_f32
Ten VALU instructions the translator refused, so any shader using one dropped its draws or dispatches:
Found by lowering every GFX10 ALU opcode alone in a pixel shader whose export depends on it. The formulas were checked against the ISA definitions on random inputs (0 differences; ldexp differs only where a result turns denormal before the last factor, noted as a shortcut).
Tests: packing_dot_and_ldexp_instructions_translate (each one goes through the whole translation; fails without this change), and GPU tests in valu_tests comparing every instruction with its definition on edge values. The GPU tests were type-checked and clippy-clean for x86_64-pc-windows-msvc but not run (no Windows machine here).