[GH #38] **Title:** Second-run perf data (RTX 4060 Ti): ~1.7 fps, 12 untranslatable compute shaders, new dstorage write failure, VRAM/commit pressure #38
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Zettrox/ztrx. Originally posted by ToxicmaggotRP on 2026-11-25T04:50:05Z.
ztrx.log
ztrx-second-run.log
Environment
b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93(same in both runs)scripts\play.ps1, noVICTORY_*tuning variables setSummary
Both runs are stable (no crash), but the in-world frame rate is 1-2 fps. The warm-cache run is clearly steadier than the cold one, as the README expects, but a few warnings are new or worse in run 2, and the machine is close to its memory limits while running.
1. Frame rate (after the menu phase, which runs at ~30 fps)
Last frame report of run 2:
1.6 fps, 645.0 ms/frame (223.0 preparing: copies 98.8 ms 119.2 MB, textures 3.4 ms 6.0 MB; 348.1 on the GPU; 63.7 copying back 30.7 MB), 11156 draws/frame, dropped 1336 without a host pipeline (0 being made) and 1974 indirect.This is within the 1-3 fps in the README, but on a 4060 Ti I expected the GPU not to be the only limit. In run 2 the time is split between GPU, CPU-side preparation and copy-back.
2. Warm cache works, but the first minutes are slow
loaded=68 started_early=0. 48 "slow host submission" warnings within ~2 minutes (mean 690 ms).loaded=1595 started_early=1770. 50 slow submissions over 33 min (mean 404 ms), one of 1672 ms.3. New or worse warnings in run 2
dstorage: a destination's physical pages could not be written (unknown page or a host failure); its request fails offset=20480 len=12288 pages=1shader does not translate; its pipelines' draws are droppedwent from 1 to 12 distinct shaders. Reasons seen:f133e35efed2a48a: a lane mask exchanged where not every lane runsa929109552ce1e84:v_permlanex16_b325dc3b25986622949,6f225b641c5b0708,926c46bab3b86bd6:v_cvt_f32_f6438bf0814e721a1b3,78f3f2fc53a69531: first half of an interpolation2fd01fca16993001,6b6db9f1a526daeb,abc6a80d46edc294,7d0f14ce44746d7e: a descriptor read only as dataceb5eb68cd99cb07: a descriptor's address or format read as dataParametro non corretto. (0x80070057)): 4 in run 1, 6 in run 2. Compute02384a60fda6f2d0,369cbe906ea72764,2da4beb386509b77,2cc4c197ee29e291in both; new in run 2: compute6b82bc7d22016cb5and mesh/pixelf5e50eb2108c425b/ce3f0432a08f1d35.a queue still held a submission at a present: its fence was not reached.Dropped draws stay high in run 2 (1336 without host pipeline and 1974 indirect in the last frame), so it is possible these shaders are related to the known "shadows are black / lighting does not run" issue. I could not verify this from the log.
4. Warnings identical in both runs
a pipeline creation method that is not implemented: the title goes without this pipelinea pipeline enables the depth bounds test, which its host pipeline leaves outhost view heap capped at 1000000; views past it read a null slot(count=1245184), errorParametro non corretto. (0x80070057)placed unordered texture view not mirrored dimension=3constant buffer not 256-byte aligned on the hosta shader takes the address of a buffer view that is not there(slot=1)a host DLL outside the host policy: refused dll="rpcrt4.dll"5. Resource pressure (Task Manager, during run 2)
The committed memory is close to the limit, which may be related to the error 1455 note in the README. VRAM is full and spills into shared memory.
Questions
VICTORY_RELAY=2,VICTORY_LATE_WAIT=3+VICTORY_WIDE_BACK=1,VICTORY_PIPELINE_WAIT_MS=24for 8 GB GPUs?I can attach both full logs and the three Task Manager screenshots.
Imported from Zettrox/ztrx. Originally posted by Altorru on 2026-11-25T05:59:37Z.
The compute program
a929109552ce1e84stopped byv_permlanex16_b32should translate with #49, which adds the lowering forv_permlane16_b32/v_permlanex16_b32plus a test. It does not address the other 11 shaders in your list.Imported from Zettrox/ztrx. Originally posted by Altorru on 2026-11-25T06:35:45Z.
Two more of the untranslatable programs in this log now have lowerings / GPU fixes behind PRs:
Shaders: lower v_cvt_f32_f64 (binary64 to binary32)— thev_cvt_f32_f64arm was missing from the VOP1 lowerer, which is what stopped5dc3b259…,6f225b64…and926c46ba…. It emits the doubled-f64 pair check plus af64 -> f32conversion and has a host test (cvt_f32_f64_lowers) that decodes the real encoding (0x7E02_1E10).GPU: clamp every host view heap to a null slot, and key the shader cache by it— the AMD view-heap limit is now probed and clamped everywhere a heap is built, and the limit is part of the shader cache key, so a shader compiled against a different heap size can no longer be served from cache. This is the other half of the upstream fix that also touches the texture path.Neither PR touches the dstorage write failure or the VRAM/commit numbers; those still need a separate look once the missing shaders stop masking them.
Imported from Zettrox/ztrx. Originally posted by Altorru on 2026-11-25T06:49:44Z.
Looked into the two items that are not shader translations: the DirectStorage destination write and the memory numbers.
The failed destination write
The warning comes from
into_destinationincrates/victory-hle/src/modules/dstorage.rs. A request writes its destination two ways: if the destination's 64 KiB pages are consecutive it maps one window and writes in place (xmem::page_window); otherwise it decodes into a buffer and callsxmem::write_physical, which fails whenruns()cannot resolve a page number the module has never seen mapped, or whenView::mapfails on the host (commit or address space short).Your line is
offset=20480 len=12288 pages=1:20480 + 12288 = 32768, so the whole write sits inside a single 64 KiB page. That rules out the page-list case: it is one page that either is not known at that moment or could not be mapped right then. The message cannot say which, becausewrite_physicalreturns a barebooland both causes collapse into it — that is worth fixing on its own, since "unknown page" is a modelling bug and "host refused" is a memory-pressure symptom.The fork has both halves of that already:
3bff182retries the write before failing (VICTORY_DSTORAGE_RETRIES, default 12, backoff 2 ms doubling to 128 ms, roughly 1.5 s in all), logsknownand the OS error when the retries run out, and logs at info when a retry saved the request. Its comment names exactly the two cases above: a page the title has just made, and a view the host refuses for a moment while a load maps many at once.8dd30abcounts writes into physical pages and records where the pages are mapped, so the failure names its cause instead of guessing.Neither is in this tree yet; both are in
victory-hleonly.One occurrence in a 33-minute warm run is consistent with a transient refusal rather than a systematic mis-parse, and your machine state supports that reading: 4.4 GB available of 32 GB with 51.1 GB committed of 54.9 GB, so a mapping that needs new commit has nowhere to grow and the pagefile has to make room.
The memory numbers
VICTORY_CARD_BUFFERS_MB(512) andVICTORY_CARD_BUFFERS_MIN_MB(16) size the card copies kept for title buffers,VICTORY_HEAP_TEXTURESand the in-place window (VICTORY_INPLACE_MB) decide which texture heaps stay host-resident. Lowering the first two is the cheapest test of whether commit pressure is what hurts you.host view heap capped at 1000000; views past it read a null slot (count=1245184)line is expected and is the clamp working: the title asks for 1.24 M views and the host heap holds 1 M. What was missing until #50 is that the limit is not part of the shader cache key, so a translation made against one limit could be served under another.Imported from Zettrox/ztrx. Originally posted by huihuihuha on 2026-11-25T08:25:15Z.
Independent reproduction of your compute list on a different 8 GB card: RTX 3070 (8 GB), driver 32.0.16.2101, Win11 26300, same retail 1.0.2.1 package.
5dc3b25986622949(v_cvt_f32_f64@ 0x7e8),6f225b641c5b0708(@ 0x7f8) and926c46bab3b86bd6(@ 0x4258) are refused here too, all stage="compute", and their draws are dropped. Also refused on this card:a929109552ce1e84(v_permlanex16_b32@ 0xd00),f133e35efed2a48a(lane mask exchanged where not every lane runs @ 0x1eb4) andceb5eb68cd99cb07(descriptor address/format read as data @ 0x38).Full-package
translate --validateon the same install gave 26,084/26,084 programs translated and 25,370/25,586 DXIL validated, so the refusals are instruction coverage, not a translation or validation regression. World runs 2.4-2.8 fps at 5,000-7,124 draws/frame with no device removal or dstorage write failure in 15 minutes; the VRAM/commit pressure you saw did not reproduce at 8 GB VRAM + 15 GB RAM.Per-hash table, stage split and the wider census are in #74. Happy to attach the raw log if it helps.
Imported from Zettrox/ztrx. Originally posted by xiaotu030202 on 2026-11-25T11:42:37Z.
The refusal list in this report is the most useful part of it, because each reason is a specific place in the translator. Cross-referencing them against what is already in flight:
Covered by an open pull request
v_permlanex16_b32a929109552ce1e84v_permlane16_b32)v_cvt_f32_f645dc3b25986622949,6f225b641c5b0708,926c46bab3b86bd638bf0814e721a1b3,78f3f2fc53a69531v_interp_p1_f32)v_pk_fmac_f16s_quadmask_b32/b64v_mad_i64_i32mul_hiwithout INT64ds_bpermute_b32/ds_permute_b32f133e35efed2a48aSo a good part of the 12 is already being worked. Worth re-running the census once those land rather than chasing each here.
Not covered by anything I could find
a descriptor read only as data— four shaders:2fd01fca16993001,6b6db9f1a526daeb,abc6a80d46edc294,7d0f14ce44746d7e. Plusceb5eb68cd99cb07,a descriptor's address or format read as data.Both come from one place,
emit/lower.rsaround 5560–5585:Two conditions gate it, and either can be what those five shaders hit:
count <= 4— the scalar load reads more than four dwords of the entry.view_addressreturnsNone, which it does unlessused.dwords == 4and the root is a table at a 32-byte-aligned offset:A
UsedResourcewithdwords = 8(an entry the compiler reads whole) fails that even whencount <= 4, so the second branch is not reached and the descriptor is refused outright.None of the four refusals in this area has a test. Searching the five
*_tests.rsfiles for each message:That is why this can sit in the log for three runs without anyone noticing which branch it is: nothing fails when the branch changes.
What I tried and did not get
I set out to write a synthetic program that reaches this refusal, so the behaviour could be pinned before anyone widens it. I got as far as building a
NativeProgramby hand and hit an earlier refusal:My
layoutgives one SGPR to the table whiles_load_dwordx8 s[0:7], s[0:1]needs two, so the address tracking gives up before the descriptor path is reached. Encoding the SGPR pair correctly for a table entry is where I stopped — it needs the same care the existingvalu_tests.rshelpers take, and I would rather hand over the finding than guess at the encoding and leave a test that asserts the wrong thing.If someone familiar with the SMEM encoding wants to finish it, the shape is: two SGPRs for the table base,
used.dwords = 8, ones_load_dwordx8, and animage_*orbuffer_*that uses the slot souse_offinds it. The assertion worth having is thatdwords = 8refuses witha descriptor read only as datawhiledwords = 4withcount <= 4succeeds — that is the difference between the two branches, and it is currently untested in both directions.No patch from me on this one.
cargo test --workspaceis green on90b529fhere (0 failures), so nothing in the suite is failing because of it.