Commit Graph
230 Commits
Author SHA1 Message Date
Vyacheslav VenglovskyandClaude Opus 5.5 32c6229990 GPU tests: the benchmark also runs with the budget in the card's memory
Two more cases, one record at a time and windows of 32, with this
tree's clamp and the budget words in a device-local buffer instead of
CPU-mapped memory: whether the clamp's atomics crossing the bus are
what a draw clamped alone still costs on a card.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:12:47 +01:00
Vyacheslav VenglovskyandClaude Opus 5.5 23daba3650 GPU: the clamp walks only its group's records; benchmark against main's clamp
- The clamp's charge per group walks the group's own records (one, for a
  record clamped alone) instead of all 64 slots.
- The host-list tests read the debug layer's messages after closing the
  list and before the submission, which moves them to the log (review).
- The benchmark lives in its own file and records five cases: what main
  records, one record at a time and in windows of 32; what this tree
  records, both ways; and windows with the new barriers but main's clamp,
  to tell the two changes apart. main's clamp is kept in the benchmark to
  measure against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:06:29 +01:00
Vyacheslav VenglovskyandClaude Opus 5.5 3db5a0e87f GPU: the indirect clamp charges the budget once per thread group
The clamp charged the list's budget record by record: an atomic read and
a compare-and-swap loop per record on one word, every thread of a window
racing for it, so a group of n records took n rounds and about n*n/2
atomics. The word is CPU-visible memory (zeroed on the CPU at
submission), so on a card of its own each of them crosses the bus. On an
RTX 5070 Ti the benchmark's windows of 32 took 46-50 ms for 3,200 draws
where draws clamped one at a time took 19 ms (#220).

Now the records' costs go to group-shared memory, one thread charges
their sum with one compare-and-swap (retried only if another group got
there first), simulating the same saturation record by record in lane
order, and every thread reads whether its record fitted. The mesh
diagnostics (largest group count asked, groups asked in all) are summed
in the group and added once. What a record costs and when it runs empty
are unchanged; which records of a group fit is now their lane order
instead of the order the GPU served the race.

Test: a group with 300 left of the budget keeps its first draw (100),
empties the second (250, which takes the rest) and the ones after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:59:58 +01:00
Vyacheslav VenglovskyandClaude Opus 5.5 a4a745ed3c GPU tests: a benchmark of the indirect scratch buffer's barriers
A frame's worth (3,200) of one-record indirect draws of our own, clamped
one at a time and in windows of 32, recorded with the old barriers (back
to the common state after every execution) and the new ones, timed with
GPU timestamps around the list. Ignored by default; any machine with a
GPU runs it in seconds, no title files needed:

cargo test -p victory-gpu --release --lib indirect::bench -- --ignored --nocapture

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:47:12 +01:00
Vyacheslav VenglovskyandClaude Opus 5.5 cc11cccc57 GPU: the indirect scratch buffer stays readable between executions
Every indirect execution was followed by a move of the list's clamped
arguments back to the common state, and the next clamp moved them from
common to unordered access. Drivers may treat a barrier into or out of
the common state as a full wait, so even the window path
(VICTORY_INDIRECT_WINDOW=1), whose draws skip the clamp, still recorded
one barrier between every two draws.

The list now remembers that its scratch buffer was left readable as
indirect arguments: executions read it with no barrier of their own, the
next clamp moves it straight back to unordered access, and it returns to
common once, when the list closes or a bigger buffer replaces it. The
waits for earlier shader writes around the clamp are unchanged.

Tests: two windows of executions with no barrier between them, on WARP
and through a host list; the tracked state across clamps, growth and
reset; the existing clamp tests follow the new states. With
VICTORY_D3D12_DEBUG=1 in a diagnostics build, the host-list tests also
check that the debug layer reports nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:34:30 +01:00
fxcelessandClaude Fable 5.2 2119b0e44c Put the parked lane-mask change (#11) back
The previous commit took it out; that was not wanted. The tree is again as
it was before that commit.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 17:00:18 -05:00
fxcelessandClaude Fable 5.2 9e49b8a04e Take the parked lane-mask change (#11) back out for now
Its programs translate and run, but on the test machine the lighting gain
could not be shown, it costs about 40 ms of GPU time per frame, and the
picture is being re-checked one change at a time from a known-good tree.
It may come back once that is settled.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 16:59:43 -05:00
fxcelessandClaude Fable 5.2 4e17478b9c The game is no longer named in the tree
Comments, documents and descriptions now say "the title". No code changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:45:05 -05:00
cxccxcandClaude Opus 5.5 90228a7dc6 Shaders: restore parked lane-mask pairs a few instructions apart; relative VGPR reads keep parked lanes (#11)
The console compiler parks a wave64 lane mask in two lanes of a spare VGPR
and may restore the halves with other instructions between the two
v_readlane_b32. The pair restore now looks ahead in the block (nothing between
may touch the second register, write the first, or save into the lanes), so
the mask comes back as a mask. This lets indirect_light_probes
CS_IrradianceCache_Shade / ShadeSecondary translate: they were dropped every
frame, leaving the irradiance cache unlit and everything in shadow black.

An M0-relative read (v_movrels_b32) names every VGPR from its base up, which
marked the parking VGPR as an ordinary one and turned unspilling off for the
whole program. Relative reads no longer count there (relative writes still
do). billboard_nobump CS_RaytracingResolve_a56bfb9c translates with it.

translate: VICTORY_TRANSLATE_ONLY=<hash prefixes> limits a run to those
containers; VICTORY_HOST_MAX_WAVE=32 translates as on a 32-lane host, so
--pipelines matches what the runtime creates on NVIDIA.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-24 15:35:04 -05:00
oddiums 3930989355 Fix mesh pipeline test on unsupported GPUs (#14) 2026-11-24 15:35:00 -05:00
fxcelessandClaude Fable 5.2 16849898f3 Shader clean-up passes; a test that needs a card skips without one
- Clean-up passes over each translated module (VICTORY_SHADER_OPT bits: dead
  code, folding, reuse, branch facts, loads within a block, wave64 first-lane
  exchange), part of the shader cache key. About 43 % fewer host instructions
  over the pack; about 20 ms less GPU time per frame on the test machine.
- translate: a census of the emitted code.
- Checked with plain game runs of this tree on the test machine.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:13:27 -05:00
fxcelessandClaude Fable 5.2 7b0f736d0b Shader tests: recognise the software adapter from the device's own adapter
Hosted runners list a display stub first, so the default device there is the
software adapter; the tests that need a real card now skip it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 14:32:07 -05:00
fxcelessandClaude Fable 5.2 e9765a73a6 Fix the device loss introduced by the wave64 update
The update moved the particle light-atlas compute programs to a form that
puts group barriers inside branches and loops; a dispatch of them stood on
the card until the device was reset. That form is now off unless
VICTORY_WAVE_WIDE=1, and the shader cache key includes the wave switches.
Checked with a plain run of this tree on the test machine.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 14:30:28 -05:00
fxcelessandClaude Fable 5.2 004bf69a4b Test fix for hosted runners, stencil diagnostics, and a stability warning
- Shader tests: a software adapter given as the default device is not taken
  for a hardware device, so the tests that need a real card skip there.
- Diagnostics: the stencil plane of dumped depth-stencil targets and the
  title's descriptions of its stencil views.
- README: the newest commits lose the GPU device shortly after start on the
  test machine; the cause is not found yet.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 14:01:26 -05:00
ZazaJr24andZazaJr24 d279e69ae9 Make host pipeline waits configurable and prewarm pending requests (#1)
Co-authored-by: ZazaJr24 <[email protected]>
2026-11-24 13:55:08 -05:00
fxcelessandClaude Fable 5.2 6a2d9f99c9 Shadow and trace programs translate, lint clean, ray-tracing write-up
- 59 of the 64 trace programs and the irradiance-cache shading program
  translate; 51 programs leave the approximate wave64 forms.
- The workspace passes the lint with warnings as errors in both feature sets;
  a few style lints are let through in Cargo.toml for this fork.
- README status updated (relay and in-place memory results);
  docs/fork-ray-tracing.md describes what the title does and what is built.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 13:48:06 -05:00
fxcelessandClaude Fable 5.2 578d459c34 victory-gta6: this fork's changes on top of VIctory main (ffe310e)
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI
(Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README
describes the state, the changes and the credits. Based on VIctory by Marvisak
and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as
a reference. No game files are included.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 13:02:18 -05:00
MarvisandClaude Opus 5.5 ffe310eb20 Shaders: the console's waterfall loop over a first-lane table offset
The console compiler loops over a per-lane descriptor by reading the
first active lane's table offset (v_readfirstlane_b32), narrowing EXEC
to the lanes with the same one (v_cmpx_eq_u32), loading that entry
(s_load_dwordx8) and dropping those lanes (s_andn2_wrexec). Such a load
now goes through the waterfall proof; when it holds, each lane loads its
own entry through a non-uniform handle. Unproven, the offset stays the
first lane's, as before.

Translation census over the title's 26,096 programs: none lost, 108 get
past these loops to a later refusal. The 249 programs behind #736 also
need per-lane size queries in loops without an access.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 10:53:38 +01:00
Marvis ca48fbea88 Merge pull request #566 from r4tedx/shader/per-lane-phi
Shaders: per-lane descriptors chosen by control flow (stacked on #307)
2026-11-24 10:53:16 +01:00
r4.andClaude Fable 5.2 74a9d3316d Shader tests: the waterfall tests take the GPU one at a time, with the VALU tests
The four tests of emit/waterfall_tests.rs each dispatch on the hardware
adapter and on WARP. Run in parallel, the test process sometimes died of
an access violation (7 of 24 runs of these four tests on an integration
branch; an image test beside a VALU test does the same on WARP). They now
take the VALU tests' lock, which moves out of `run_cases` to be shared.
With it: 340 workspace tests pass with VICTORY_WARP=1, as on a CI runner,
and the shader tests pass on the RTX 5070.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 11:26:39 +02:00
r4.andClaude Fable 5.2 e09dbb6dae Merge upstream main (8e79c80) into shader/per-lane-phi
main now has CI (clippy with -D warnings, then the workspace's tests) and
three new tests that call `resource::track`, which this branch gives a
fourth argument. No textual conflict, but the test target did not build:
those three calls (emit/lower.rs, twice in emit/mod.rs) now structure the
program first and pass it, as this branch's other callers do. Both of
CI's clippy commands are clean on the result.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 11:10:23 +02:00
MarvisandClaude Opus 5.5 8e79c80e4b CI: clippy and tests on pull requests and main
A Windows job on the pinned toolchain: clippy with -D warnings on the
default and the --all-features (diagnostics) build, then cargo test
--workspace, which includes the asset-policy test.

main did not build its tests: scalar_bit_tests_lower called lowers()
without the rsrc2 argument a parallel change added (0, no input
registers). Also drops a double parenthesis clippy flagged in an xasync
test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 09:55:29 +01:00
Marvis c7a5f4953f Merge pull request #93 from TG0000/perf/bcpack-bucket-lookup
BCPack: find a slot's bucket from a window table
2026-11-24 09:47:34 +01:00
Marvis 2005e35afd Merge pull request #88 from AndyLatimer/fix/title-size-overflows
Audio, watch: no overflow on huge title sizes (XMA read advance, fread)
2026-11-24 09:47:09 +01:00
Marvis 58fed3704f Merge pull request #706 from Lyrnc/fix/cmp-lg-ordered
Shaders: v_cmp_lg is ordered on AMD hosts too (olt | ogt, not fcmp one)
2026-11-24 09:24:08 +01:00
Marvis a51bdfa500 Merge pull request #696 from catminou4/devin/formats-doc-micro-link
Docs: drop the private intra-doc link to MICRO in texture.rs
2026-11-24 09:23:50 +01:00
Marvis 02f404efec Merge pull request #685 from catminou4/devin/constant-color-cfg-windows
Shaders: gate the constant_color test helper to Windows
2026-11-24 09:23:32 +01:00
Marvis 5cd7421715 Merge pull request #681 from fuzeofficlal/fix/vertex-buffer-null-unbind
GPU: unbind vertex buffer slots for null view arrays
2026-11-24 09:22:41 +01:00
Marvis 8d23f0762f Merge pull request #680 from EatCodeSleep2/fix/wine-staging-upload-128
GPU: use the host upload path for texture staging copies
2026-11-24 09:21:50 +01:00
Marvis 22700b9771 Merge pull request #675 from lameloball2813-ui/docs/rustdoc-private-links
Docs: rustdoc builds the loader, GPU and shader crates without warnings
2026-11-24 09:21:26 +01:00
Marvis 6db02ea34e Merge pull request #671 from fuzeofficlal/fix/copyresource-cpu-texture-source
GPU: upload CPU-written textures before full and region copies
2026-11-24 09:20:52 +01:00
Marvis 16bd5771a0 Merge pull request #666 from lameloball2813-ui/fix/load-probe-target-dir
Loader tests: build the probe fixture under CARGO_TARGET_TMPDIR
2026-11-24 09:20:26 +01:00
Marvis b4b4110371 Merge pull request #654 from SantannaCarlos/fix/uav-describe
GPU diagnostics: describe a buffer UAV by its range, not as uav None
2026-11-24 09:20:07 +01:00
Marvis cf0bb43868 Merge pull request #637 from AlanQiang0418/codex/gfx10-packed-inline-constants
Shaders: decode GFX10 packed inline constants by operand type
2026-11-24 09:19:35 +01:00
Marvis 6f0a10a758 Merge pull request #634 from SAitken91/shader/image-sample-o
Shaders: image_sample_o with constant offsets
2026-11-24 09:19:15 +01:00
Marvis 9a92ccf4a6 Merge pull request #612 from KoLolX3/fix/phi-liveness-transitive
Shaders: a phi that only another read phi consumes is live too (#604)
2026-11-24 09:18:51 +01:00
Marvis 204bdcc108 Merge pull request #611 from AdvaitPalve11/fix/config-show-data-dir
core: show data_dir in config and check its asset policy
2026-11-24 09:18:28 +01:00
Marvis a4d7b16da0 Merge pull request #565 from SAitken91/shader/conservative-depth-position
Shaders: centroid position with conservative depth
2026-11-24 09:18:04 +01:00
Marvis fd925582f1 Merge pull request #520 from Quat3rnion/victory-xasync-payload
HLE: return XAsync payloads for nonnegative results
2026-11-24 09:17:39 +01:00
Marvis dd54de2f71 Merge pull request #448 from Dufftwt/fix/min-max-signed-zeros
Shaders: maximums and minimums order -0 below +0, as RDNA2 does
2026-11-24 09:15:49 +01:00
Marvis 0ddbce888e Merge pull request #433 from r4tedx/tests/serialise-valu-gpu-tests
Shader tests: run the VALU GPU tests one at a time (cargo test hangs now and then)
2026-11-24 09:15:28 +01:00
Marvis ce42e77634 Merge pull request #432 from Proudnoob4/fix/uninitialized-sgprs
Shaders: reads of uninitialized SGPRs read as zero, as VGPRs do
2026-11-24 09:14:53 +01:00
Marvis f0894c2b5c Merge pull request #429 from marquezinii/fix/xgamesave-documented-errors
XGameSave: the documented errors for a full disk and a small read buffer
2026-11-24 09:14:37 +01:00
Marvis 9f18eb4587 Merge pull request #423 from pedrofort/shader-perm-no-int64
Shaders: lower dynamic v_perm_b32 without requiring INT64
2026-11-24 09:13:04 +01:00
Marvis dd273df1b8 Merge pull request #419 from itsRevela/fix/swallow-keyboard-menu
Window: keep Alt and F10 from freezing the title in menu mode
2026-11-24 09:10:57 +01:00
Marvis 3c86238217 Merge pull request #418 from enzoduarte1/gpu/half-subnormal-output
GPU: write half subnormals from f32 rectangle outputs
2026-11-24 09:10:36 +01:00
Marvis 2e4e280dc0 Merge pull request #384 from LouisRiverstone/shader-cvt16-saturate
Shaders: v_cvt_u16_f16 and v_cvt_i16_f16 saturate at 16 bits
2026-11-24 09:10:02 +01:00
Marvis faba64c5f3 Merge pull request #382 from Dufftwt/fix/stencil-ref-shader-flag
Shaders: a pixel shader writing SV_StencilRef declares StencilRef
2026-11-24 09:09:30 +01:00
Marvis c30fc990ec Merge pull request #381 from Dufftwt/fix/psv-sample-frequency
Shaders: PSV0 says a pixel shader runs per sample when an input does
2026-11-24 09:09:11 +01:00
Marvis ebf3615931 Merge pull request #376 from LouisRiverstone/shader-cvt-norm-f16
Shaders: lower v_cvt_norm_i16_f16 and v_cvt_norm_u16_f16
2026-11-24 09:08:34 +01:00