Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3735"
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?
Imported from Marvisak/VIctory. Originally posted by redNSF on 2026-11-28T13:12:47Z.
Stacked on #439 (console flow in halves) and #2999 (lane quads); the last two commits are this change.
Problem. On a host without 64-lane waves, #439 refuses a console wave64 compute program that has an
image_sampleorimage_sample_b("an implicit-derivative sample in the console flow on a host without 64-lane waves"), because the sample had no valid DXIL form in compute.Change. With the lane quads of #2999 such a sample is a
sampleGradwhose gradients are read from the lane's quad, which is valid in compute. In halves each host wave holds whole quads of the console wave in the console's order (host lane n is console lane n or n + 32), so the quad is read within the host wave and nothing crosses the halves. The refusal now applies only to a sample left without quad gradients (a cube).Effect. Grand Theft Auto VI,
translate --list --host-lanes 32-32: compute programs that translate go from 2,593 (#439) to 2,605; the 12 gained are the ones refused for this reason, none are lost. Among them:indirect_light_probes:CS_IrradianceCache_ShadeandShadeSecondary, the fourptx_prerenderlight-atlas programs,CS_DensityShadowMapMips,CS_ProjDecalResolve, twortdirectionalshadowsdenoisers.Tests (RTX 3060, 32-lane waves only):
implicit_samples_in_halves_take_the_console_quads: a console wave64 program with a sample and a cross-half lane read, groups of 8x8 and 16x4, run on a 32-lane hardware adapter (skipped elsewhere); every thread's level and texel are checked.implicit_samples_stop_the_console_flow_in_halvesbecomesimplicit_samples_translate_in_the_console_flow_in_halves.gathers_at_a_level_match_the_hardwaredoes. (With #2885 also merged, their buffer reads gave 0 on this card without it.)cargo test -p victory-shader --libon WARP: the same 4synthetic_testsfail here as on #439 alone. On the cardgathers_at_a_level_match_the_hardwarefails at lane 0 (the NaN coordinate), identically on #439 alone.In the title. On a local branch that also has #3683, #2885, #3674, #3670 and #2451, these programs ran in the game's first scene on the RTX 3060 without a device loss. The picture did not visibly change, so this PR claims only that the programs translate and compute what the test checks.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T14:57:36Z.
NVIDIA row for this PR: it passes on a second Ampere card, and the new tests fail without the PR's last commit.
RTX 3070 (desktop), driver 616.56, Windows 11 Pro 10.0.26100, debug. Head
359baa6, tested as the PR's own branch. It contains main63bcca4and the stack it names: #439 (e2d3cfd) with #2999 (3f6b205) merged in at134d9cc.Each test passed in 3 of 3 runs (6 passed, 0 failed):
synthetic_tests::implicit_samples_in_halves_take_the_console_quads: ran on the hardware adapter, 8x8 and 16x4, 64 sample and wave-base pairs matched each. Hardware only by design, so WARP is not run.tests::implicit_samples_translate_in_the_console_flow_in_halves: translation only, no device.synthetic_tests::compute_samples_take_derivatives_from_lane_quads: ran on hardware and WARP, wave32 and wave64, Plain, Offset and BiasOffset.synthetic_tests::multirow_samples_and_console_wave_reads_keep_each_guest_thread: hardware Wave32 6x8, 6x16 and 8x8 matched. It printedwarp: Wave32 unsupported; skippedandWave64 unsupported; skippedfor both hardware and WARP, so the hardware Wave32 cases are the only ones it ran here.lane_read_loop_tests::lane_reads_in_a_loop_lanes_leave_at_different_iterationsandlane_read_loop_with_a_joined_exec_back_edge:NVIDIA GeForce RTX 3070: wave32 exact,wave64 exactandjoined back edge exact. These tests run on hardware adapters only.Negative control: the same tests with
crates/victory-shader/src/emit/lower.rsfrom134d9cc, the PR's parent (git diff --stat HEAD: 1 file, 10 insertions, 18 deletions). In 3 of 3 runs, 4 passed and 2 failed. The 2 failures were the two new tests, both refused with "an implicit-derivative sample in the console flow on a host without 64-lane waves". I used134d9ccand not main because main'slower.rscomes before the stack.cargo test --locked -p victory-shader --lib -- --skip heap_direct_texture_reads_mark_their_heap_index:63bcca4: 298 passed, 3 failed, 3 ignored.The 3 failures are the same on both:
stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride,stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zerosandsynthetic_tests::gathers_at_a_level_match_the_hardware. The skipped test crashes the binary on this card (open issue #2571).Not tested: a title run; #439 or #2999 on their own; the lib suite at
134d9cc.AI-assisted (Claude Code, Claude Opus 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.