Commit Graph
107 Commits
Author SHA1 Message Date
Marvis 6af0faeb3e Merge pull request #205 from asdaasdsaddf/fix/null-uav-dimension
GPU: give null texture UAVs the title's view dimension
2026-11-24 08:55:06 +01:00
Marvis 27c960ba6c Merge pull request #204 from Dufftwt/fix/crash-report-fault-memory
Crash reports: say what an access violation's address holds
2026-11-24 08:54:19 +01:00
Marvis 3dd37e60f0 Merge pull request #198 from Dufftwt/fix/crash-report-instruction-bytes
Crash reports: show the bytes of an instruction the CPU refused
2026-11-24 08:53:55 +01:00
Marvis 13ac0e6ff0 Merge pull request #167 from Maraco91/xmem/zero-length-unmap
xmem: mapping or unmapping no pages changes nothing instead of aborting
2026-11-24 08:53:32 +01:00
Marvis 787f665f4d Merge pull request #161 from lordon1a/fix/pipeline-staging-cleanup
pipeline: remove staging files when cache publication fails
2026-11-24 08:52:35 +01:00
Marvis ba7d873f98 Merge pull request #152 from Makto94/fix/net-test-win10
net: skip newer-Windows-only exports in only_loopback_is_reachable
2026-11-24 08:52:07 +01:00
Marvis 80c0d120f5 Merge pull request #140 from lordon1a/feat/cmp-class-f16
Shaders: lower v_cmp_class_f16 and v_cmpx_class_f16
2026-11-24 08:51:39 +01:00
Marvis 3d77d5e202 Merge pull request #117 from tedin7/vic-s-bitcmp-2
Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64
2026-11-24 08:51:06 +01:00
Marvis b0328bacc6 Merge pull request #111 from Dufftwt/fix/narrow-paths-translated-twice
Files: send rewritten narrow paths to the host, not to our wide wrappers
2026-11-24 08:50:16 +01:00
Marvis 0e990e4021 Merge pull request #104 from TG0000/perf/bitcode-worklist-liveness
Shaders: find the written instructions with a worklist, not repeated passes
2026-11-24 08:49:47 +01:00
Marvis c2e7254aeb Merge pull request #87 from jeremygold02/codex/copy-stat-frame-window
fix(gpu): average copy statistics over the full reporting interval
2026-11-24 08:48:47 +01:00
Marvis 1f858b0f27 Merge pull request #25 from artor410/packed-buffer-formats
Shader: decode the packed typed-buffer formats
2026-11-24 08:46:26 +01:00
artor410andClaude Opus 5.5 9fe73ba977 shader: decode the packed typed-buffer formats
Typed buffer loads in the 10_11_11, 11_11_10 and 10_10_10_2 families
(GFX10 unified formats 30-49) were refused, failing the shader. Fill in
their channel layouts and decode the unsigned 11- and 10-bit floats by
shifting them into half position for legacyF16ToF32, which is exact for
denormals, infinities and NaNs. Format numbers from LLVM's UfmtGFX10,
channel order from Mesa's ac_formats.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 23:03:19 -03:00
Andrea Casale 18b2716a2c net: rustfmt the presence assertion 2026-11-24 02:30:19 +01:00
Andrea Casale afc4641bd7 net: skip newer-Windows-only exports in only_loopback_is_reachable
WinHttpGetProxySettingsEx is absent from Windows 10's winhttp.dll, so the
host-presence assertion panicked there. The HLE supplies it itself; skip it
only when the host lacks it, keeping the check for every other export.

Fixes #118
2026-11-24 02:30:19 +01:00
julioandClaude Opus 5.5 cbb50b8016 GPU: give null texture UAVs the title's view dimension
When the host cannot make an unordered-access view (no host texture, a
format the host does not allow, a placed texture not mirrored), null_for()
wrote a 2D null UAV whatever the title asked for. A shader that writes a
3D texture through it then has a dimension mismatch: GPU-based validation
reports it ("UAV Dimension Expected: TEXTURE3D, UAV Dimension In
Descriptor: TEXTURE2D") for the world's wind field
(WindNew:CS_CopyWindFieldBeforeUpdateWithSmooth, compute 5bb23d336331db1d,
image_load/image_store dim:SQ_RSRC_IMG_3D). Shader views already get a
null view of the title's dimension (null_like); unordered views did not.

Null texture UAVs now keep the title's dimension: 1D, 1D and 2D arrays,
3D (WSize -1). Multisampled and unnamed dimensions stay 2D. With this,
the validation error is gone on an RTX 5070.

Tests: the dimension mapping, and a null 3D UAV made on the real device
leaves it alive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 21:24:11 -04:00
Duff 3390e47328 Crash reports: say what an access violation's address holds
An access violation is reported with the address it touched and
nothing else, so a read of free memory, a write to memory that was
reserved but whose commit failed, a stack guard page and a write to
code or constants all look the same in a report.

The report now adds what VirtualQuery says is at that address: nothing,
reserved but never committed, a guard page, or the page's protection,
with the module for an image's pages.
2026-11-24 02:18:49 +01:00
Duff babe2db61f Crash reports: show the bytes of an instruction the CPU refused
An illegal or privileged instruction is reported by its address only,
which does not say which instruction it was. On an Intel host that is
the question every such report raises (clwb, clzero, rdpru, an SSE4a
form...), and reporters have had to guess or dump the bytes by hand.

The report's first line now ends with up to 15 bytes at the faulting
address, as hex, read no further than the end of that page, so the
report names the instruction by itself.
2026-11-24 02:12:05 +01:00
Maraco91andClaude Fable 5.2 02fcf72407 xmem: mapping or unmapping no pages changes nothing
XMemMapPhysicalPages with a count of 0, and the GPU's page-mapping copy
of a zero-length range, went into unmap with an empty range. Its search
for views starting inside asked the view map for a range that runs
backwards, which BTreeMap panics on once any view exists; in an
extern "system" function that aborts the process. Without that panic
the view holding the address would have been unmapped and mapped again
as two.

unmap now returns at once for a length of 0.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 02:02:38 +01:00
Codex 7d73e2b249 pipeline: remove staging files when cache publication fails
Reserve a new staging path and clean it up if writing or publishing fails. Cover a failed publication with a synthetic destination directory.
2026-11-24 04:00:44 +03:00
Marvis d2a4bae1f4 Merge pull request #129 from Luislariosss/fix/duplicate-test-module
GPU: rename the second test module in host.rs so the tests compile
2026-11-24 01:57:52 +01:00
lordon1a 1823079f6c Shaders: lower v_cmp_class_f16 and v_cmpx_class_f16 2026-11-24 03:53:26 +03:00
LUIS LARIOS 7102a4989c GPU: rename the second test module in host.rs so the tests compile
cargo test --workspace does not compile on main: host.rs declares
#[cfg(test)] mod tests twice, once near the top for the warp adapter test and
once at the end for the Batch::texture_due tests, so rustc rejects the crate
with E0428 before running anything:

    error[E0428]: the name 	ests is defined multiple times
    --> crates\victory-gpu\src\host.rs:1974:1

The second block only touches Batch, so it becomes mod batch and keeps its
two tests. cargo test -p victory-gpu --lib goes from "could not compile" to
43 passed, 0 failed, 1 ignored, and cargo test --workspace compiles again.
Nothing else changes: one line, no test bodies touched.
2026-11-23 18:46:19 -06:00
Marvis 9aef3d9c06 Merge pull request #51 from BaggyALPHA/fix/windows-commit-limit-diagnostic
Report Windows commit-limit failures in crashes.log
2026-11-24 01:43:50 +01:00
Marvis 8a8a38d12c Merge pull request #53 from a55uka/fix/wine-physical-pages
xmem: commit physical-page sections whole under Wine
2026-11-24 01:43:31 +01:00
Marvis 4c0bb89788 Merge pull request #41 from LaunchDoesntCode/codex/proton-warp-safety
GPU: reject non-software WARP adapters under Proton
2026-11-24 01:43:06 +01:00
Marvis 91e9bc9924 Merge pull request #46 from 9hvn9yt2vk-netizen/shader-loop-limit
shader: VICTORY_SHADER_LOOP_LIMIT to find what makes world frames slow
2026-11-24 01:42:45 +01:00
Marvis 6168fc64f0 Merge pull request #70 from FIocker/gpu/diagnostic-pipeline-filter
GPU diagnostics: skip pipelines by shader hash
2026-11-24 01:42:21 +01:00
Marvis 97464baa91 Merge pull request #61 from TG0000/hle/physical-page-runs
xmem: write DirectStorage page destinations one view per run
2026-11-24 01:41:55 +01:00
Marvis 93bc9786db Merge pull request #60 from ifBars/perf/reuse-texture-row-spans
Texture: reuse contiguous column runs across rows
2026-11-24 01:41:34 +01:00
Marvis fa5ef73495 Merge pull request #79 from TG0000/perf/texture-check-once-per-submission
GPU: check a sampled texture once per submission, not once per list
2026-11-24 01:41:12 +01:00
Marvis 0f35dfc135 Merge pull request #66 from AndyLatimer/fix/gpu-rect-element-past-stride
GPU: leave rectangle vertex components past the stride alone
2026-11-24 01:40:50 +01:00
Marvis fc0c4dd331 Merge pull request #77 from Exorion1er/fix/guard-fault-race
GPU: keep a guarded block's write fault from being declined in a race
2026-11-24 01:40:25 +01:00
Marvis 683278b0f5 Merge pull request #36 from jeremygold02/codex/root-parameter-fixture
test(gpu): use the SDK root parameter in the serializer fixture
2026-11-24 01:40:04 +01:00
Marvis eda38aa4df Merge pull request #57 from Yaekai/fix/null-buffer-views
GPU: emit null buffer SRV/UAV when descriptor names a buffer with null resource
2026-11-24 01:39:35 +01:00
tedin7 3c860538e1 Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64
The scalar bit tests decode and are tracked in ir.rs (they write SCC) but the lowering had no case for them, so any shader using one failed to translate with Unsupported.
2026-11-24 01:38:59 +01:00
Marvis 237f2e85c4 Merge pull request #37 from alessiodeia/fix/valu-med3-fract-trig
shader: keep fract(NaN) as NaN on NVIDIA and add synthetic GPU VALU tests
2026-11-24 01:38:41 +01:00
Marvis 4926f72874 Merge pull request #80 from tedin7/vic-far-jump-backward
shader: decode backward far jumps (signed offset literal)
2026-11-24 01:37:00 +01:00
Marvis 46610eb846 Merge pull request #81 from tedin7/vic-scalar-carry
Shaders: set SCC from the carry of s_addc_u32 and s_subb_u32
2026-11-24 01:36:05 +01:00
Marvis 4a8a058988 Merge pull request #58 from Yaekai/feat/shader-xnor-swap
Shaders: lower v_xnor_b32 and v_swap_b32
2026-11-24 01:35:31 +01:00
Marvis 8fe0b7419c Merge pull request #56 from 9hvn9yt2vk-netizen/find-input-underflow
shader: look up an input channel without underflowing
2026-11-24 01:34:59 +01:00
Marvis a6888a6831 Merge pull request #43 from 9hvn9yt2vk-netizen/shader-mask-cycle
shader: a lane mask that needs its own value fails instead of overflo…
2026-11-24 01:34:43 +01:00
Marvis 062ad14eae Merge pull request #50 from Vanthys/fix/format-offset-overflow
Guard texture and XMA offsets against overflow
2026-11-24 01:34:04 +01:00
Marvis bf6c557c5f Merge pull request #75 from tedin7/vic-pe-export-holes
PE: skip unused export slots instead of reporting them at RVA 0
2026-11-24 01:33:39 +01:00
Marvis cc519270ee Merge pull request #30 from AndyLatimer/fix/pe-rva-offset-overflow
PE: checked offsets in rva_to_file_offset and layout, remove dbg_tls
2026-11-24 01:33:20 +01:00
Marvis cbd71a9bde Merge pull request #38 from raffclar/emulation-tests
Loader: test the AMD-only instruction emulation on any CPU (including AMD!)
2026-11-24 01:32:45 +01:00
TG0000andClaude Opus 5.5 24480a73f5 Shaders: find the written instructions with a worklist, not repeated passes
Module::write dropped unread phis by sweeping every instruction until a
sweep changed nothing, allocating an operand Vec per instruction per
sweep. A chain of merges needs one sweep per merge, so the cost grew with
instructions x merges. A worklist now visits each instruction once and
reads operands through a callback; the block DFS, latch folding and the
call/phi/gep records stop allocating too. The written bytes are the same
(pinned by a test against the previous writer's output).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 01:31:44 +01:00
Marvis 27e64428ca Merge pull request #28 from ifBars/fix/windows10-import-directory
Loader: preserve an empty import table for Windows 10 static TLS
2026-11-24 01:31:11 +01:00
Duff 27b530e7e1 Files: send rewritten narrow paths to the host, not to our wide wrappers
CreateFileA, GetFileAttributesA, fopen, fopen_s and the narrow
std::_Fiopen turn the title's virtual-drive path into a host path and
then passed it to our own wide wrapper, which looked it up a second time.
When the host path starts with a letter that is itself mounted, it was
rewritten again: with the game on a host G: drive (say G:\GTA6), the
title's G:\x64\a.rpf became G:\GTA6\x64\a.rpf and then
G:\GTA6\GTA6\x64\a.rpf, so every narrow open of a title file failed.
The same happens for T: when the data folder is on a host T: drive.

They now call the host's wide function directly, as DeleteFileA,
SetCurrentDirectoryA, _open, _stat64i32 and remove already do.
2026-11-24 01:31:06 +01:00
Marvis 7d33c4633c Merge pull request #45 from HenriqueSBueno/clwb
loader: emulate clwb on Intel CPUs before Ice Lake, a write-back loop in one exception
2026-11-24 01:30:02 +01:00