Commit Graph
186 Commits
Author SHA1 Message Date
localandClaude Opus 5.5 c00a0bbd79 Textures from the first level viewed; equal uploads left out; bakes take textures as they are; kept by the card's real room
Placed textures are read, kept on the card and uploaded from the first level their views show (VICTORY_HELD_LEVELS=0: whole;
after victory-amd 4436f8f1's spans). An upload of the bytes a host copy holds is left out (VICTORY_TEXTURE_SAME=0). A slot
shows its new view once that view's upload has run. A decoration bake takes slots due a few frames later too and waits for
memory being remapped (VICTORY_BAKE_EXACT=0). Host copies go only past 88 % of the budget, the longest idle first
(VICTORY_TEXTURE_KEEP=1: the rule before). A slot rewritten with other filler words keeps its view.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 02:56:28 -06:00
localandClaude Opus 5.5 0abcb9fd89 Shared locks for buffer and window lookups; early pipeline list without a small cap; crash report names what a list binds
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:59:21 -06:00
localandClaude Opus 5.5 b9672fd5a5 Speed and room: draws' own records left to the draws in the heap sync, 2^20 table slots, textures kept while the card has room
- VICTORY_HEAP_SYNC=all mirrors every copied record at once, as before.
- VICTORY_DYNAMIC_SLOTS sets the table slots past the title's.
- Room kept for card copies of buffers is 1 GiB at most (was 5 GiB on 24 GB).
- VICTORY_TEXTURE_KEEP=0 lets idle textures go after 5 s, as before.
- VICTORY_TEXTURE_AWAY_MS: a texture whose memory went is shown 3 s longer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:52:09 -06:00
localandClaude Opus 5.5 85b6fb5803 Crash tracing that can stay on: VICTORY_D3D12_DRED=light and =faults; lost texture writes named
A removed device is reported by whoever finds it first, and the list it
stopped in by its name. The window stand-in of VIctory 9145d9d is left out
until it has been tried.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:15:58 -06:00
localandClaude Opus 5.5 70502d8db5 Merge local/upcopies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:12:28 -06:00
localandClaude Opus 5.5 9634df7413 Merge local/lighting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:12:28 -06:00
localandClaude Opus 5.5 38410b88ab VIctory e29391f, 13185f5 and 4fc9d70, by hand
16-bit interpolations write the half op_sel picks, with omod and clamp; the
device says whether it was removed; detiling ends with its staging buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:12:28 -06:00
localandClaude Opus 5.5 329df7aef4 VIctory's 88 commits fitted in; clzero loops end as the console's do
The fork's emulation of a clzero loop zeroed from the start to the end and
left rax at the end: the instruction zeroes whole lines and the test comes
after it (VIctory's own test of it failed here). The title's descriptor
heaps are held shared while their slots are written (VIctory 628b95d held
them alone, for every thread that writes descriptors).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:06:46 -06:00
给伊莉雅补魔 c24a86cfbf gpu(list): log initial pipeline bound on reset/reset_x for parity with create_list
(cherry picked from commit 8d3a025df199e6e26ccb404d4cf0f172fdde8b1c)
2026-11-25 01:03:03 -06:00
HailLucifer666 3e8a472c03 GPU: serialize pipeline library atomic writes with unique temp files
save() releases LAST and library locks before calling write_atomically(), which always wrote to the same fixed host-pipelines.tmp path. Concurrent worker saves and shutdown save(true) can truncate or unlink each other's temp file on Windows.

- Serialize write_atomically() with a mutex and unique per-call temp filename (.tmp-<pid>-<n>), cleaning up the temp file on rename failure.
- Add a 4-thread concurrent write_atomically stress test.

(cherry picked from commit be824d9d218320c71f2623ed4b14045210785db5)
2026-11-25 01:03:03 -06:00
BastienRdz 37e0b45d73 GPU: fences answer for ID3D12Fence1 as documented
fence.rs already implements ID3D12Fence1::GetCreationFlags at slot 11
(0x58), but FENCE_IIDS only listed ID3D12Fence and PAGEABLE_IIDS, so
CreateFence and QueryInterface rejected ID3D12Fence1 with E_NOINTERFACE.

Add ID3D12Fence1 (433685fe-e22b-4ca0-a8db-b5b4f4dd0e4a) to FENCE_IIDS
and add a unit test covering creation, QueryInterface, and
GetCreationFlags.

Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit bbdc3ca7249948b7624ba65f4282615caef895b8)
2026-11-25 01:03:03 -06:00
bvtterbroot 474f949c4d GPU: log the TDR settings, and warn when a GPU hang would freeze the PC
With TdrLevel 0 Windows never resets a hung GPU: a slow or hung world
frame freezes the whole desktop, and the runtime never sees a device
removal it could report (#1054). With 1 the timeout is a blue screen.
Both are set by hand, often to keep slow frames from being reset, and
reports of "the PC froze" do not say so.

When the host device is made on a hardware adapter, read TdrLevel,
TdrDelay and TdrDdiDelay from HKLM\SYSTEM\CurrentControlSet\Control\
GraphicsDrivers, log them ("default" where a value is not set), and warn
for TdrLevel 0 or 1 with what to set instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 42961e8e577e5f195db0982e34bb59e800998c77)
2026-11-25 01:03:01 -06:00
给伊莉雅补魔 3a24b38bfb GPU: validate null args in create_deserializer to prevent d3d12 AV and add root.rs tests
(cherry picked from commit ef0c3e944916e2273457626be3d34f8dd5591eb4)
2026-11-25 01:03:01 -06:00
给伊莉雅补魔 14e15c8188 GPU: guard zero/overflowing stride in expand_rects and add primitive.rs unit tests
(cherry picked from commit e3c9dd0d53d92d7a1dc7b86d75147d3ed390c61a)
2026-11-25 01:03:01 -06:00
给伊莉雅补魔 7da03c4a8e GPU: add synthetic unit tests for query.rs and signature.rs
(cherry picked from commit 0be58e62d24181a9eb60244a7e4d878a3627d401)
2026-11-25 01:03:00 -06:00
TG0000 60518beb63 GPU: seek directly to private data on final release
Co-Authored-By: GPT 6.2 Sol <[email protected]>
(cherry picked from commit 3e98bd7e0ce79762162ac958e3ab67cc85de00c9)
2026-11-25 01:03:00 -06:00
KoLolX3 3c250125c5 GPU: VICTORY_* switches set to 0 are off
Six diagnostic switches (VICTORY_D3D12_DEBUG, _GBV, _DRED, _WARP,
VICTORY_GPU_TIMING and VICTORY_DUMP_TARGETS) were on whenever their
variable existed, so VICTORY_D3D12_WARP=0 still selected the software
adapter. They now go through one helper that reads a value other than 0
as on and an unset variable or 0 as off; every other value keeps the
meaning it had. The README says so above its switch table.

(cherry picked from commit a4974e4c21c16e2305942e37a868647d42eefe37)
2026-11-25 01:02:59 -06:00
broccolize cd82c63c62 GPU: clear DXGI outputs on out-of-range enumeration
(cherry picked from commit b796c8b8b80cfa4506f254474ab9fd7260bfd8e6)
2026-11-25 01:02:58 -06:00
Maraco91 a27ec9e57f GPU: every object answers for IUnknown
No graphics object's interface list holds IUnknown, so QueryInterface
for it (and every call that hands out an object by interface id) said
E_NOINTERFACE and returned null. COM code asks for it to compare two
pointers for identity, to keep an object as a plain reference, or to
pass it on to an API that takes any object.

object::is, which all of those go through, now also matches IUnknown.
The DXGI device answers with the D3D12 device, which it already stands
for: one pointer whichever of the object's interfaces is asked.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
(cherry picked from commit 92f2c60c8159e34a47570aa81f3d25624cc6db5c)
2026-11-25 01:02:57 -06:00
Manuel Pérez 51b9d09b34 GPU: hold SHADER_HEAPS across descriptor mirror and check query offsets
mirror() previously dropped the SHADER_HEAPS lock inside shader_slot() before using the returned &Heap, allowing a concurrent Heap::drop to free the heap while mirror() accessed it. Also guards copy_simple() against invalid descriptor kinds, rejects placed heaps whose address+size wraps u64, and checks offset+count*bytes in resolve_queries() against overflow (with a regression test).

(cherry picked from commit 628b95da5e738046d00995743e07137e48936ba6)
2026-11-25 01:02:56 -06:00
localandClaude Opus 5.5 f1650b7e45 Merge fork main a26859f (the first room renders right)
Descriptor records the title copies as bytes are mirrored before each
submission. Views off their copy's elements: our rule (raw views too, and
now typed views on 16 bytes), the fork's copies. Wave sums of halves: ours
(the fork's test passes with it). Sizes of descriptors nothing uses: ours,
then the fork's for 2D images. The fork's count of cut indirect groups is
left out: up to WIDEST groups run as asked here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:00:56 -06:00
localandClaude Opus 5.5 a2e7bf901f A texture filled while the runtime remaps takes the pages that are there
With VICTORY_TEXTURE_NO_WAIT=1 a refresh that met the runtime remapping
title memory read the whole chain or nothing. A texture the title holds
only the smaller levels of is never all there, so nothing was read, and
the upload recorded before put the staging buffer's zeros over the
levels on the card. A staging buffer never filled now takes the pages
that are there; what was away for the moment of a change is read after
it, and a filling with less than was mapped makes the slots due again
(at most 8 times in a row). VICTORY_TEXTURE_FILL=0: as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:55:56 -06:00
fxcelessandClaude Fable 5.2 6afd80f252 The first room renders right: byte-copied descriptor records are mirrored, views off their copy's elements get their own bytes, card room for the first world frame, levels on demand run on the card
- Descriptor records the title copies into its heap as bytes are mirrored
  before each submission (pull request #305 by Flyander, after upstream
  VIctory 86a5ed6), with a per-slot fingerprint so only records that
  changed are mirrored, the page read through the kernel, a switch
  (VICTORY_HEAP_SYNC=0) and a counter: about 40,000 records a frame on the
  test machine.
- A buffer view off its copy's elements gets a copy of its own bytes
  (after upstream 86a5ed6; VICTORY_VIEW_OWN_COPY=0: refused as before).
- Room on the card for the world's first-frame bursts: buffer copies
  (VICTORY_CARD_ROOM_FOR_BUFFERS, now on) and render targets
  (VICTORY_CARD_ROOM_FOR_TARGETS_MB, 3,072); a copy turned down gives its
  room up and is logged; the texture pass asks again every 32 MiB. 98
  buffer copies made (945 MB) where earlier runs made 1; 25 MB compared
  on the processor a frame where it was 550 to 710.
- Levels on demand: the fixes of pull request #747 by AscilCH. First run
  on a card (RTX 4070, VICTORY_LEVELS_ON_DEMAND=1): no device loss, 3.1 GB
  not allocated for levels the title does not hold. Still off by default.
- The guarded blocks under storage writes into physical pages are opened
  by default (VICTORY_PAGE_WRITES=0: counted only).
- Shaders: a program is translated with first-half interpolation pairs
  only if it was refused for one (with it on for every program 8,551
  working pixel programs came out changed); parked lane-mask pairs,
  f64 conversions and sums, lane permutations: 14 more programs translate.
- Counted, not fixed: an indirect compute pass asks for about 77,500
  groups in x and is cut to 65,535.

One five-minute game run of these changes on the test machine: no device
loss, no failed request. This merged tree was built; its test suites
were not run.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 01:46:49 -05:00
localandClaude Opus 5.5 f0bc1d234c Merge local/world: fork main 8dd30ab (every view of a page is guarded)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:39:06 -06:00
localandClaude Opus 5.5 c45d109380 Merge fork main 8dd30ab: writes through one view of a page are seen at its other views
The fork's guard over every view of a physical page is kept on our own block
bits, known holes, kernel writes and changing blocks; what both had, ours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:38:57 -06:00
localandClaude Opus 5.5 12c7e7c696 VICTORY_SEND_CHANGED off by default: run tile1-0 lost light and geometry with it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:31:25 -06:00
localandClaude Opus 5.5 ebd9d33b72 Title buffer copies stand where the list has them (VICTORY_COPIES_IN_PLACE)
On by default. They were all done on the CPU when their submission was
prepared, ahead of its first draw: of copy, draw, copy, draw both draws read
the second, and a source a shader writes earlier in the submission was read as
it was before. The list copies now, in the destination's host copy, out of the
source's host copy where shaders write it, else out of upload memory filled at
submission; copies into textures take what shaders wrote too. Title memory and
the reference of the host copy take the bytes at submission as before, so the
landing finds only what the card made of them.

VICTORY_WINDOWS_OWN=1 (off): windows have two sides as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:29:19 -06:00
localandClaude Opus 5.5 fb861f169e Stores by raw address declare what their dispatch names, not every copy reached so far
Also: victory replay --images writes the bytes of buffers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:20:28 -06:00
local e888289c6f Buffer views that begin between elements read their own bytes
A view D3D12 cannot place (a raw view off 16 bytes, a structured one off
16 and off its stride, a typed one off its element) was null, and the
shader read zeros: the colour-table bakes' parameter blocks are raw views
at byte 8. Such a view now gets a copy of its own bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b2a3ce9ced69e669d2d56e20c2dca7011b7e405a)
2026-11-25 00:17:46 -06:00
localandClaude Opus 5.5 c6604f99cf Merge Each submission's shaders read the bytes it was prepared with (VICTORY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:17:28 -06:00
local 193f50fe5a Merge commit '572bd4c' into local/upcopies 2026-11-25 00:08:25 -06:00
local 1161647e1d Merge local/next 2026-11-25 00:01:05 -06:00
localandClaude Opus 5.5 7a2b0b0099 Addresses of ray-tracing structures: views of a structure have no buffer
A shader that walks a structure takes its address out of the structure's
descriptor. The view has no resource, so the address came out 0 and every
ray missed. Also: only programs that store by raw address declare the
copies they reach that way as written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:08 -06:00
localandClaude Opus 5.5 6bdb85106c A pipeline sync waits for shader writes on the host
The console's syncs recorded nothing on the host, which orders nothing
between dispatches by itself. The ray-tracing structure builder has no
other wait between its stages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:07 -06:00
localandClaude Opus 5.5 fa83615d1e victory replay --flow, --images, --until; shader-info names the hashes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:07 -06:00
localandClaude Opus 5.5 05f7bcff65 Each submission's shaders read the bytes it was prepared with (VICTORY_SEND_OWN)
On by default. Sends to card copies were copies out of their CPU sides made
when the card came to them, and later submissions had written those by then:
of three submissions that each copy a value to the same bytes and read them,
all read the last one's (test: 12 of 12 wrong). The bytes are taken into
memory of the submission's own at preparing; short runs go as one scatter per
copy. Title buffer copies go up whether our side changed or not.

VICTORY_CARD_ALL=1 (off): every title buffer's copy has two sides, so that
this holds for the small ones too (they are written in place now, under the
submissions in the air). VICTORY_PICKED_WRITES: 1 declares, 2 lands too.

The check (VICTORY_UPCOPY_CHECK): what a submission took twice is no longer
counted as older values sent; copies of the title's out of their place in a
submission; copies held for unchanged that are not title memory's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:59:54 -06:00
local 22967b2124 Indirect dispatches of more than 65,535 groups run whole (VICTORY_INDIRECT_WIDE)
The title's tile lists are dispatches of a group per tile: in the captured frame 2dc364df5d3278b8 asks for 67,440 groups (the one before it 67,272) and 940c2635dc1312f4 for 47,760, the 115,200 tiles of 2560x1440. The clamp cut the first to 65,535: 1,905 tiles at the list's end, the lowest of the picture, did not run. Up to 2^20 groups run as asked on AMD cards (a test on the card: every group once, under its number); more still runs 65,535.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b856c46dd10bbb550157b255d113a3cca2f3f38a)
2026-11-24 23:55:23 -06:00
localandClaude Opus 5.5 f1541634fd Merge local/shaders2: the dynamic descriptor search
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:54:17 -06:00
localandClaude Opus 5.5 7704c3e460 Dynamic descriptor slots: the search goes past the cursor as far as it should
The scan was cut to the heap's length, which left out the slots past the
cursor a run that crosses it needs; upstream's corrected test (072fde0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:52:47 -06:00
local 4f54afe221 Merge commit 'c651346' into local/upcopies 2026-11-24 23:51:11 -06:00
local b64d65845f wip: submissions send their own bytes 2026-11-24 23:51:11 -06:00
localandClaude Opus 5.5 1f5ea84955 Merge victory replay --pixel: which commands change a pixel, in every target
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:04 -06:00
localandClaude Opus 5.5 0703d16748 Merge How much of a texture is mapped is read from the runtime's own record
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:02 -06:00
localandClaude Opus 5.5 8e124f4b76 Merge A refresh of a copy on the card sends the dwords title memory changed,
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:01 -06:00
localandClaude Opus 5.5 2d2f9477fc Merge Merge local/next (e6f492d) into local/tests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:51:01 -06:00
localandClaude Opus 5.5 b4b13e4f32 victory replay --pixel: which commands change a pixel, in every target
After each command that can change a texture, the texel under a point of
the picture is copied out; commands that changed one are named with their
pipeline and the values before and after. The listing names textures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:50:34 -06:00
localandClaude Opus 5.5 61cbfe3ea0 A refresh of a copy on the card sends the dwords title memory changed, and no others (VICTORY_SEND_CHANGED, on)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:48:35 -06:00
localandClaude Opus 5.5 4833ae6ea2 Merge local/next (e6f492d) into local/tests
Blocks the kernel writes, or the runtime is unmapping, are no known holes
and not published; foreign blocks are never held; freed memory forgets its
known holes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:47:04 -06:00
localandClaude Opus 5.5 34a278c990 How much of a texture is mapped is read from the runtime's own record of its views
The pass that uploads textures picked by index asked the host for every
64 KiB of every texture it looked at, and twice for each block that was not
there (12,000 slots wait for their memory during a load, each looked at
again and again): 146 us for a texture of 22 MB, 721 us with 1 MB of it
there. The views of physical pages are known: 1.4 and 0.1 us. Memory that
is in no view is asked of the host as before. VICTORY_MAPPED_BY_VIEWS=0:
always. Measurement: cargo test --release -p victory-gpu --lib look_costs
-- --ignored --nocapture

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:46:35 -06:00
localandClaude Opus 5.5 cb5384fc9c Merge local/shaders2: upstream translator and state fixes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 23:44:32 -06:00