Repository navigation
Conversation
Upstream: fxceless#808 (head cef1f94) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRkAEvF29hMbrBJw8os
…ss#802-fxceless#806 fxceless#808) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRkAEvF29hMbrBJw8os
…ddPacked and fmad
|
I independently checked
The first case is The Linux shader library suite passed at the parent, PR head, and locally corrected snapshot (171 passed, 2 ignored each). Windows MSVC test-target |
|
An AMD run of this PR's new tests. The setup, and the same run for eight related shader PRs, are in one table on #637: #637 (comment) |
|
Thanks @avt0m4t48 for catching that double negation in Updated in
Verified after the final edit:
|
|
Retested That case is src0 |
…fxceless#834) and share shader cache between release and diag
…haders 2.1 fxceless f5c03f3 (PR fxceless#999), texback.rs: textures of the water kinds that shaders write are copied into read-back buffers when the list closes and tiled back into title memory once it has run, so the CPU's ocean sampling (boats) reads what the GPU wrote. ON by default here: VICTORY_TEXTURE_BACK unset or 1 takes the four water kinds, 0 turns it off, a list of <w>x<h>f<format> picks others. Merged with this tree's in-place write ranges (Deferred::placed): flights now carry both their placed ranges and their readback ranges. 2.2 fxceless a35c557, VICTORY_TARGET_VARIANTS (on unless =0): a draw into a render target whose format differs from what its pipeline declares for that slot gets a pipeline of the same state for the bound formats. Adapted to this tree's blending: host_blend() still turns blending off per format at creation, and integer_targets_unblended() now keeps the title's blend state (blend_as_given) for variants to start from. RTV records and pipeline states both carry stand-in formats (target_format), so they compare like for like. fxceless 025b042 (integer targets do not blend) was already here as e92dbb4; not ported again. 2.3 Marvisak 842b0cb7 (fxceless#158) not ported: the depth bounds test already reaches the host here (c96b4f2, fxceless#82: OMSetDepthBounds, adapter check, DEPTH_STENCIL1 for vertex and mesh streams, replay, test). 2.4 fxceless PR fxceless#808: v_dot4_i32_i8 / v_dot4c_i32_i8 / v_dot4_u32_u8 and v_dot2* lower to DXIL dot4AddPacked and fmad (emit/dot.rs, listed in sources(); Module::eval_u32 for constant operands). Only the PR's lowering and its new test were taken; the PR also deleted unrelated valu tests (cvt_f32_f64, permlane16), which stay. byte_dot_products_match_the_hardware is no longer ignored. 2.5 Shader correctness batch: - fxceless PR fxceless#1041: resource::track visits blocks in reverse postorder. - fxceless PR fxceless#1042: saturating clamp on packed 16-bit integer ops, with its tests (its clamp-taking vop3p helper kept; fxceless#808's test uses its own vop3p_dot). - Marvisak f3578e3 (#2493): f16 inline float constants in whole-wave v_add_f16 simulation; its test expects this tree's Shape::Active instead of Marvisak's Shape::Half. - justr4mzi 6ba165b2 (fxceless fxceless#1030): a ds_swizzle source lane outside EXEC reads zero. Restricted to console wave32 compute (no exchange, no twin), where the host lane is the console lane; the wave64 forms on 32-lane hosts keep the plain read, since a host ballot does not see the console's upper 32 lanes. - justr4mzi 640262ee (fxceless fxceless#1024): image_get_lod on cubes in pixel shaders (lower_image.rs), with its test. - justr4mzi a15e95d8 (fxceless fxceless#1019): typed half loads keep NaN payloads (widened through a finite half), with its test. - Skipped, not in this tree: Marvisak e815cef (#2484, the dirty bitmap of its memory view; ours is a page directory of copies), 366a978 (#2468, no dead_on_edge here), 120233c (#2448, no Lower::konst here). - Skipped on purpose: justr4mzi 6c9a9032 (fxceless fxceless#1026) makes v_mac/v_mad_legacy_f32 fused with flushed sources. Neither upstream has merged it, and the semantics reference here and in Marvisak/VIctory still takes the legacy multiply-add unfused; it is the title's most used arithmetic, so it waits for a hardware measurement. Gate: Windows check, diagnostics check, clippy -D warnings (default and all features), tests 342 passed / 0 failed / 8 ignored, policy 230 files ok, viz. The semantics and valu tests (and the new victory-gpu tests) are Windows-only: built and linted here, not run; pc-home is offline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@HAL9000RELOADED Thanks for the hardware measurement on RX 7900 XTX. The RDNA2 ISA does not specify the rounding behavior when both low and high f16 inputs to Pushed commit Verified after the edit on Windows (Intel Arc A770):
|
Adds hardware-accelerated packed dot-product lowering to
victory-shader(crates/victory-shader/src/emit/dot.rs, hooked intolower.rs):v_dot4_i32_i8,v_dot4c_i32_i8, andv_dot4_u32_u8directly to SM 6.4@dx.op.dot4AddPacked.i32(opcodes 163 / 164), supportingop_sel/op_sel_hihalf-selection onv_dot4_i32_i8/v_dot4_u32_u8andv.clampsaturation.v_dot2_f32_f16andv_dot2c_f32_f16vialegacyF16ToF32and chained fused multiply-adds (fmad/tertiary.f32) matching RDNA2 rounding, honoring both VOP3P (opsel/opsel_hi/neg_hi) and VOP2 encodings plusv.clamp/v.omod.v_dot2_i32_i16,v_dot2_u32_u16(viapacked_srcwithopsel/opsel_hi), andv_dot8_u32_u4, with exact saturation whenv.clampis set.emit::valu_tests::packed_dot_products_and_clamps_execute_cleanlycovering all instructions, modifiers, and saturating clamps on both hardware GPU and WARP.Testing
cargo clippy -p victory-shader --all-targets --locked -- -D warnings: passedcargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings: passedcargo test -p victory-shader --locked packed_dot_products_and_clamps_execute_cleanly -- --test-threads=1: 1 passed, 0 failedcargo test -p xtask --locked: 4 passed, 0 failed (repository_passes_policy)victory-gpu144 passed / 0 failed / 3 ignored;victory-shader214 passed / 1 failed (whole_wave_f64_sum_and_cvt_f32_f64due to Arc A770 lacking native fp64) / 3 ignored.AI use
dot.rsand verifying hardware/WARP execution and CI checks.