Repository navigation
Conversation
|
Tested
It is intermittent and only in parallel:
Cause: fn reference_draw(params: bool) {
+ let _one = super::valu_tests::ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner());The title-side numbers of the PR (195 geometry programs) are untouched by this; it only affects the test run. I have no game copy, so I did not run Tested and written with the help of an AI (Claude Code). |
|
I found a copy-shader case on Fix and regression test on your exact head. It reports the unsupported EXEC write at its instruction offset. A control that writes zero to ordinary register AI-assisted review. The new test failed before the change and passed after it. The Linux CPU shader library suite passed 103 tests with one ignored. I haven't measured whether a retail draw uses this case. |
|
Automated triage for the maintainers. Needs work: it would now break the file-size policy on The substance is as judged before. The ring-address tracing in Two smaller points from brainbudt's review, which the author acknowledged: The choice between this PR and #1924 is still open for the maintainers. Push the split and this will be reviewed again. CI: passing on the PR's own base (it would fail the policy check once merged with current Generated by Claude Code |
|
One family, one instruction: 196 geometry programs that all stop at offset Census over a local 1.0.2.1 archive (26,503 containers,
Two things fall out of that, and the second is the useful one for the work in this issue:
The code that refuses them is What I have not done: read the instruction at If it helps whoever is on #877/#1924: the number to watch is that 196, and one program of the family is enough to iterate on, since they all stop in the same place. No game data is involved: counts, stage letters, program names and an offset. Written with an AI assistant. |
Raise the GS-to-VS ring writes and stream messages of a native geometry program into geometry stage I/O, using the copy VS to map each ring dword to its export target. Emit DXIL geometry shaders (metadata, PSV state), exempt the proven ring-address instructions from root resource tracking, and give host graphics pipelines a geometry slot. On main: programs build through `range::build` from `NativeProgram::translation_code` (the patched code, or for a geometry program the code one host invocation runs, its EXEC set-up a no-op); resource tracking takes a skip list for the proven ring-address steps (`track_io`); the DXIL GS state and PSV are main's (`Shader::gs`, as for the rectangle-list GS); a host pipeline with a geometry stage is refused for rectangle lists, which keep main's generated GS; a geometry record whose copy VS or stage data does not parse keeps no stage I/O instead of failing its container; and rows of geometry inputs that hold an integer element are constant throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An uncompressed (0x0c) XDAT entry that is not a valid FSSM, or lies out of bounds, is skipped, as all were before they were read, and no longer costs the container its packed entries. Tests for it, and for a geometry record whose copy VS points past the payload: it keeps no stage I/O (the geometry commit's fallback) instead of failing the container. Review follow-up from the contribution thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aram0 From c4k3ss's review of the geometry programs on Marvisak#293: - raise takes each ring slot's value at the EMIT that consumes it, while the console's copy VS reads the ring after the GS ends. A store to a vertex already emitted would translate with the earlier value; it is now refused ("a geometry ring store to a vertex already emitted"). - The reference draw ran pos0 only. A second fixture carries input row 1 (TEXCOORD0.xy, LDS dwords 4-5) in ring dwords 4-5, which the copy VS exports as param0 (output table: generic, row 1); it is drawn against the dxc-compiled GS with a PS that writes TEXCOORD0 into green and blue, and raise is checked to give pos0 plus a two-channel param0 per vertex from all six input dwords. - The draw test says when it skips (no dxc.exe beside dxil.dll, or no device) instead of returning silently. Untested at commit time: waiting for the machine's test queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two reference draws create a host and draw on the hardware adapter and WARP without `valu_tests::ONE_AT_A_TIME`, so on CI's WARP adapter they could dispatch at the same time as the other GPU tests; the run on 6ddbdfc ended with the victory-shader test process dying with STATUS_ACCESS_VIOLATION and no failing test named, the crash seen before on Marvisak#704, Marvisak#160 and Marvisak#265 for that reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each translated EMIT runs the copy VS's exports for every active invocation, so an EXEC write in the copy (which would suppress exports for some lanes) is refused at its instruction. Found and fixed by ryotdev on f74eab0 (ryotdev/VIctory f64ad72, review on Marvisak#1315); taken here on the rebased branch, with the test's program built through `translation_code`. The test failed before the change and passes after it (WARP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A GS that stores all three vertices' ring slots before its first EMIT, the write batching that made Marvisak#1399 draw nothing: each EMIT still takes its own vertex's values (checked through the input reads they come from). raise takes each slot at the EMIT that consumes it, by its offset in the invocation's ring, so it needs no change. Untested at commit time: waiting for the machine's test queue (WARP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The address is not an instruction: it is SGPR 2, which has no producer — all 195 of them I said in the comment above that reading the instruction at Correction, my invocation. My first attempt reported Correction, the method. What answers it instead, and it is the useful part: a two-line probe at the refusal site in All 195 refusals are the same value: SGPR 2, and it has no defining instruction. That is not "an instruction we cannot lower" — it is an incoming register. In a geometry shader the SGPRs on entry are whatever the host set before invoking it, so the program is taking a memory base straight out of an input register and the address analysis refuses it because that base is not a root parameter in the layout we build for the stage. That fits the offset too: So the question for this issue is not "which instruction should we lower" but "what does SGPR 2 hold for a I have not gone further than that: reading the GS input layout is the next step and it needs the native stage data for that container, which is where I stopped. No game data is involved: an SGPR index, an instruction-name lookup and counts. Written with an AI assistant. |
f74eab0 to
0d45a59
Compare
|
Rebased onto main
@KainanP your diagnosis of the parallel crash was right. The lock is @ryotdev reproduced on the rebased head: your test fails without the change and passes with it (WARP). It's taken as @fiestorra yes. Offline count on Compared with the other two geometry efforts. Same 642 containers, same command (
So the counts tie. The difference is in what each refuses rather than guesses. #1924's own description lists four open risks from its review thread. Here is how this PR handles each:
It also refuses a ring store to a vertex already emitted and an EXEC write in the copy (ryotdev's). It covers the write batching that #1924's second commit fixes, with a test ( For #1924, whose description says its Windows GPU tests had not run: I ran My suggestion to the maintainers: take one of the two, not both. If #1924 is the one, I can port these refusals onto it. Its 20 vertex programs are worth taking either way. Tests on
The title was used only for the offline counts above (counts and reasons only); none of the tests use it. AI-assisted |
|
The two reference draws on
This was WARP only; the hardware GPU here is off-limits for tests for now. GPU-based validation was not turned on. The title was not used in these tests. If a debug-layer switch for the shader tests' host is wanted upstream, I can open it as a small separate PR. AI-assisted |
…eometry programs
… summary lines say what was not checked) Conflict in apps/victory/src/translate.rs: the DXIL summary line keeps Marvisak#1315's "vertex, geometry and pixel programs" and takes Marvisak#2115's checks() wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@fiestorra a follow-up to "my set has 195, yours 196". A full-archive list of main The title was used only for that offline list (counts, names and offsets). AI-assisted |
|
Note 🤖 Gemini 4 Neon (with GPT-6.2 Astra, Mistral Large 4, and DeepSeek V4.1 Flash) responding on behalf of brainbudt Independently verified
Two small follow-ups (non-blocking):
|
|
@brainbudt thanks for the independent run on
Both after the current queue on this PC drains. I'll post the head and test counts here when they are done. AI-assisted |
|
Offline corpus measurement: this clears the whole Merged onto
Every other refusal is byte-identical to The mechanism matches @kotekompotek's decode of that bucket: all 195 are one geometry program family failing at the same instruction, and the tracker refusal is only the first wall — on Worth stating for whoever triages the cluster: on current Not measured here: host pipeline creation (the census makes none, AI-assisted (Claude Code); both rows from the runs described. |
|
@BaggyALPHA thank you. An independent count on current On what isn't measured, you're right. The PR's own evidence for correct output is the synthetic reference draws in AI-assisted |
…' and journal's locks (port of fxceless PR Marvisak#1315, merged with GUARD_PRIVATE) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ2PrBCXiMRWPWfcXFvb59
|
Tested
These are offline pipeline-creation results for the title combinations. Pixel readback was measured on the two synthetic draws only. |
Marvisak#1315 VICTORY_GUARD_OUTSIDE
…metry) with file split
…m triangle geometry programs Conflicts: the shader resource lookup takes the program of the translated stage (keeping this branch's compute thread and 64-bit atomics fields); the graphics pipeline library name takes the pixel stage by position, since a geometry stage may follow the vertex stage with no pixel stage between (keeping Marvisak#2336's `made.pso` and `in_library`); lower.rs keeps the host heap size and sets the geometry vertex count, and keeps `leaves_with_no_lane` beside `geometry_message`. native.rs: Marvisak#1621's part budget now covers the PR's two new read paths. An uncompressed FSSM entry costs its size (its own unpacked form) and the code and tables read out of it, like a packed blob; a malformed one is still skipped, but a part past the budget is refused. `read_program` takes the budget, so the geometry record's copy VS costs its code and tables too, and a copy VS past the budget refuses the part instead of leaving the record with no stage I/O. `MAX_UNPACKED`, gone with Marvisak#1621, is no longer used. geometry.rs reads instruction words through `Instruction::words()`, since the words are kept inline and private on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…leting rectangles With Marvisak#1315 a host graphics pipeline can carry the title's own geometry stage, and `HostPipeline::rectangles` was `!gs.is_empty()`, so it was also set for a translated geometry stage. Such a pipeline never draws rectangle lists (it is refused), but `completes_rectangles` checks the bound pipeline's flag, so the flag now means what its doc says: set only for `rectangle_gs`. The follow-up raised in Marvisak#1315's review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn wave sizes The synthetic console GS of Marvisak#1315 runs 64 lanes per wave, and a run translates for the device's wave sizes (`shader_cache::host_target`), not for any host: D3DMetal on Apple GPUs and NVIDIA have 32-lane waves only. The reference draws now also translate for `Host::target()` and draw that, and translate and validate for 32-lane waves only (drawn when the device runs 32 lanes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…budget Two tests for the read paths Marvisak#1315 adds, now under Marvisak#1621's 16 MiB part budget. Uncompressed FSSM entries cost their size and their code: four 5 MiB raw blobs, or three raw blobs with 3 MiB of code, refuse the part instead of being skipped like a malformed raw entry. A geometry record with a 5 MiB copy VS fits once, packed or raw, with its copy and its geometry stage I/O; two such blobs refuse the part, where they would fit if the copy's code were not charged. `geometry_part_sized` builds its FSSM with a new `geometry_fssm` so the test can pack it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, part budget on the native-blob reads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Geometry: merge upstream PR Marvisak#1315 (single-stream triangle geometry)
Console geometry programs are refused today: their GS-to-VS ring addresses look like SGPRs that are no root parameter, and the native stage data of a geometry record was never read. As fiestorra measured on #293, no open PR reaches them. This translates the single-stream triangle case.
What it does
native: reads uncompressed FSSM entries (XDAT kind0x0c; the geometry containers use them) and a geometry record's copy VS and GS-to-VS ring layout (StageIo::Gs).geometry(new): one host GS invocation per console invocation. It follows the LDS offsets of the input vertices packed in v0/v1, the private slice of the ring the invocation writes, and thes_sendmsgemit/cut messages, then uses the copy VS to map each ring dword to the export target and component it ends up in.resource::track_io).victory-gpu: host graphics pipelines take a geometry stage (refused together with a mesh stage).Limits (refused, not guessed):
GS_OP_EMIT_CUT(0x32), no control flow in the GS body, nothing past the copy VS's stream predicate;A geometry record whose copy VS or stage data does not parse keeps no stage I/O, and its container's other programs are unaffected. The same goes for an uncompressed entry that is not a valid FSSM, which is skipped as before. The copy record at stage data
+0x34and the ring sizes at+0x27c..+0x28care not documented anywhere I know of. Two internal checks hold on all 195 geometry programs (vertex_dwords × max_vertices == invocation_dwords, and PSV0's max vertex count equal to+0x284), and they are the evidence for that layout.Tests
emit::geometry_tests::geometry_vertices_match_reference_drawtranslates a console GS and draws with it, on the hardware adapter and on WARP. It compares the result with the same operation as an HLSL GS compiled by the Windows SDK'sdxc.exe(the test skips without the SDK, and says so).geometry_parameters_match_reference_drawdoes the same for the parameter-export path: input row 1 (TEXCOORD0.xy) goes through ring dwords 4-5, which the copy VS exports asparam0(output table → signature row 1), and the PS writes it into green and blue. On an RTX 5070 and on WARP, both draws equal the reference image (44 of 256 pixels covered). Also tested:raisegivespos0plus a two-channelparam0from all six input dwords, component order and constants in the copy export, refusal of untraced reads and exports and of a ring store to an emitted vertex, and the parse fallbacks innative.940d32f(head0d45a59); CI passes. Both CIcargo clippycommands with-D warningsare clean locally. Local tests on this head are WARP only, because after a hard PC crash no test here runs on the hardware GPU for now. Geometry andnativetests: 23 passed, and both reference draws match on WARP. Thevictory-shaderlibrary on WARP, one thread: 254 passed. 2 failed insynthetic_tests, and those fail the same way on main underVICTORY_WARP=1(hardware-only checks). Earlier, on6ddbdfc,cargo test --workspace --lockedpassed on an RTX 5070 and withVICTORY_WARP=1(350 passed).victory translate --validate, CPU plus dxil.dll, no title launch, no pipelines. It covers 642 containers from the title's shader archive that an earlier build refused, 195 of them geometry programs. Counts only: on main940d32fall 195 geometry programs stop atan address in an SGPR that is no root parameter(offset0x44). With0d45a59all 195 translate and validate, and nothing that validates on main stops validating.GS_VoxelizeGeneric_<h>was paired with theVS_VoxelizeGeneric_<h>containers of the same technique hash (13 hashes, 195 of each). Their container holds both the ES and the VS payload, and the translation takes the VS. Within a hash, the VS were grouped by output signature and the GS by input signature, and one VS + GS (+ stub PS) pipeline was created per pair of groups. In 12 hashes there is one group of each, and the pipeline is created. Hash912dfba0has two of each (2 and 33 members): the size-matched pairs (2 with 2, 33 with 33) link, and so does 33 VS with 2 GS, but the 2 VS with the 33 GS is refused by D3D12. I can't tell from the archive which VS the title pairs with which GS. If the pairs follow the group sizes, every one links.Where it already runs: the fork's tester tree
r4tedx/VIctoryintegration/testerscarries the first two commits since update 8 (d45ea23). The third commit is the follow-up from that tree's review. c4k3ss was about to start a geometry-stage path (#293 (comment)); this is it, and review or measurements are welcome.Overlap: main's rectangle-list GS (
683ad7a, from #1020) is reused for the DXIL GS state; a pipeline with both a geometry stage and rectangle lists is refused. #1924 (a rebase of #1399) and #877 reach the same 195 programs. The comparison is in #1315 (comment). Please take one, not both.AI-assisted
🤖 Generated with Claude Code