Commit Graph
128 Commits
Author SHA1 Message Date
Marvis 97ef64d792 Merge pull request #336 from hophaver/fix/dynamic-descriptor-exhaustion
GPU: drop draws whose fresh tables cannot be made; 2^18 dynamic slots
2026-11-24 09:00:41 +01:00
Marvis 051482334c Merge pull request #313 from Abdellah-Khanani/loader-aligned-unwind
loader: unwind a 16-byte aligned copy of the context
2026-11-24 09:00:12 +01:00
Marvis a6aa850464 Merge pull request #285 from Dufftwt/fix/name-title-dll-that-fails-to-prepare
Loader: a title DLL that fails to prepare is named in the error
2026-11-24 08:59:50 +01:00
Marvis 0226b24ee1 Merge pull request #276 from Dufftwt/fix/s-ttracedata-imm-opcode
Shaders: s_ttracedata_imm is SOPP opcode 0x28, not 0x26
2026-11-24 08:59:20 +01:00
Marvis 30e510c0bf Merge pull request #260 from Dufftwt/fix/f32-to-half-rounding-carry
GPU: a half-float rounding carry raises the exponent instead of halving the value
2026-11-24 08:59:04 +01:00
Marvis 370fc43d42 Merge pull request #249 from Maraco91/gpu/get-device-newer-levels
GPU: GetDevice and the DXGI device hand out the device at every level
2026-11-24 08:58:40 +01:00
Marvis a76eb7900a Merge pull request #245 from Dufftwt/fix/import-trap-in-crash-log
Loader: a trapped unimplemented import goes into the crash log
2026-11-24 08:58:12 +01:00
Marvis fd6c1c8b77 Merge pull request #239 from Maraco91/xtaskqueue/terminate-ends-dispatch
XTaskQueue: terminating a queue ends a dispatch waiting on it
2026-11-24 08:57:51 +01:00
Marvis 52e55b493a Merge pull request #229 from Dufftwt/fix/gamertag-modern-suffix-empty
XUser: a gamertag without a suffix has an empty modern suffix
2026-11-24 08:57:16 +01:00
Marvis 2909cb0780 Merge pull request #209 from Maraco91/xgamesave/empty-configuration-id
Game saves: an empty configuration id no longer deletes the other configurations' saves
2026-11-24 08:56:50 +01:00
Marvis 6443126216 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 6e225dc2c5 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 ca4477b6f2 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 5df399851f 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 6015fbbc96 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 d046bb8901 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 172a7d5703 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 708b818662 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 6c459f33c5 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 b5167a893c 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 b8d3d51b0e 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 a1ea951500 Merge pull request #25 from artor410/packed-buffer-formats
Shader: decode the packed typed-buffer formats
2026-11-24 08:46:26 +01:00
hophaver cbc9ece918 GPU: the larger dynamic range only where the heap still fits
A host that refuses the title's slots plus 2^18 dynamic ones (NVIDIA's
1,000,000-view cap) now gets 2^16 dynamic slots, as before, instead of
losing mirrored title slots to the larger range: at the cap, 2^18 left
737,856 title slots against 934,464, and titles were seen to index slots
up to 917,140. The cap itself is unchanged. Hosts that take the larger
heap (RX 9070 XT) keep 2^18.
2026-11-24 05:55:13 +02:00
hophaverandClaude Opus 5.5 02348ffe70 GPU: drop draws whose fresh tables cannot be made; 2^18 dynamic slots
When HostHeap::dynamic ran out, State::tables skipped the fresh table and
the stage's user data fell back to the title's table offset. Constant
buffer tables are always made fresh and never mirrored, so the shader read
whatever host descriptor sat at those slots as a constant buffer; on AMD a
texture or null descriptor read as a buffer gives a wild base address and
the device is removed (#59: faults at 0x7000037xxxxx, 0x8000037xxxxx,
0x33c4000, a different pipeline every run, about 60 s in).

bind now reports that a table could not be made, and the draw, mesh
dispatch, dispatch or indirect execution is dropped. The dynamic range grows
from 2^16 to 2^18 slots, which the world did not exhaust on an RX 9070 XT.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 04:22:41 +02:00
Abdellah K.andClaude Opus 5.5 e5cac3512b loader: unwind a 16-byte aligned copy of the context
RtlVirtualUnwind and RtlCaptureContext want a 16-byte aligned CONTEXT,
and windows-sys 0.61 declares the x64 CONTEXT without align(16). In a
debug build the by-value copy in unwind_into, and the test's stack
context, landed 8 bytes off (an address ending in ...838), so
unwinds_like_the_system_walk crashed the whole victory-loader test binary
with a stack-overflow message and STATUS_ACCESS_VIOLATION. Aligning only
the test's context was not enough: the copy in unwind_into, which the
crash handler and stacks.rs also unwind with, faulted as well.

unwind_into now copies its context into an Aligned16 wrapper and unwinds
that; the test captures into one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 03:14:00 +01:00
artor410andClaude Opus 5.5 7ff79d9463 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
Duff 39245bc085 Loader: a title DLL that fails to prepare is named in the error
Reading and loading a title DLL report its path when they fail;
preparing it, in between, did not. A DLL the PE parser refuses ended
the run with just "malformed image: ..." (or the like), without saying
which of the title's DLLs it was.

The prepare step now adds "preparing <path>" like its neighbours.
2026-11-24 02:54:49 +01:00
Maraco91andClaude Fable 5.2 60f3c5b71b GPU: GetDevice and the DXGI device hand out the device at every level
The device answers QueryInterface for ID3D12Device and for its newer
levels (Grand Theft Auto VI creates it as ID3D12Device11). A device
child's GetDevice and the DXGI device's QueryInterface knew only the
first: asked for the device by the interface the title holds, they
answered E_NOINTERFACE with a null pointer.

Both now ask the device's own test (is_device).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 02:48:40 +01:00
Duff 7129bde6a8 GPU: a half-float rounding carry raises the exponent, not halves the value
f32_to_half rounds to nearest by adding half an ulp to the mantissa,
then or-ed the shifted mantissa into the exponent field. When the
rounding carried out of the mantissa, that carry is the exponent's low
bit: or-ed into an odd exponent it was lost, so values just below a
power of two came out at the power below (2 - 2^-12 gave 1.0, not 2.0).
Rectangle lists use it for the fourth corner of half-float elements.

The carry is now added into the exponent.
2026-11-24 02:47:28 +01:00
Duff 02e4504704 Shaders: s_ttracedata_imm is SOPP opcode 0x28, not 0x26
The SOPP table had s_ttracedata_imm at 0x26, as Mesa's opcode list
does; RDNA2 encodes it at 0x28 (AMD's RDNA2 ISA, LLVM's GFX10 tables
and disassembler tests). A shader with the thread-trace marker decoded
it as an unknown opcode and failed to translate, though the IR drops
the marker as harmless.
2026-11-24 02:45:09 +01:00
Maraco91andClaude Fable 5.2 6aa823e491 XTaskQueue: terminating a queue ends a dispatch waiting on it
XTaskQueueDispatch with an infinite timeout waited until a callback was
queued. Terminating the queue refuses new callbacks and drained the
queued ones without waking anyone, so a dispatcher thread's loop
(`while (XTaskQueueDispatch(queue, port, INFINITE));`, which ends by
terminating the queue) stayed in its wait for good, and so did whoever
joined that thread. A dispatch begun after the termination did the same.

A dispatch now also ends, returning false, when its queue is
terminated: the termination wakes the port's waiters after draining it.
The flag is the queue's, so a dispatch on another queue that shares the
port waits on.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 02:42:41 +01:00
Duff a6569753b9 Loader: a trapped unimplemented import goes into the crash log
An unimplemented import with the default Trap policy printed its name
and aborted. abort() is a fast fail: it skips the exception handlers
and the panic hook, which are what append to crashes.log, so the most
common bring-up crash left nothing there, not even which import it was.

The trap now reports through log_crash, which prints the same line,
appends it to the crash log and adds the title's last debug output.
2026-11-24 02:39:39 +01:00
Duff f64a3cc0e5 XUser: a gamertag without a suffix has an empty modern suffix
XUserGetGamertag returned the name for every component, the modern
suffix included. The GDK documents the suffix as empty when there is
none, and a title that shows "name#suffix" whenever the suffix is not
empty showed "Player#Player".

The modern suffix (component 2) is now empty; the classic, modern and
unique modern components are still the name.
2026-11-24 02:32:25 +01:00
Andrea Casale 6583b9068f net: rustfmt the presence assertion 2026-11-24 02:30:19 +01:00
Andrea Casale 73ec61d39d 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
Maraco91andClaude Fable 5.2 1cd5aacc56 Game saves: an empty configuration id is the default, not every configuration's folder
A provider's folder is the user's folder plus the configuration id as a
file name. An empty id gave the user's folder itself, where the other
configurations' folders are. Opening the provider converts containers
of the old layout, which are folders without a `~` or a dot in their
name, as a configuration's folder is: each was taken for one, an empty
container was committed in its place and the folder was removed with
every save in it.

An empty id is now treated as no id (the default configuration).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 02:26:58 +01:00
julioandClaude Opus 5.5 ecb5dc99c2 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 f98d7e8e34 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 a87917d779 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 557bdae844 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 620940fc37 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 35e8407c9c 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 70e22cb987 Shaders: lower v_cmp_class_f16 and v_cmpx_class_f16 2026-11-24 03:53:26 +03:00
LUIS LARIOS 7c59cc6f48 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 2e52345f19 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 23a6fe2539 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 3fe3f1b09f 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 73bdf6db84 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 66670005fe 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 4229e5f9a8 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