Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b6b344b07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let slot = self.s.op(c, "binary.i32", Attr::ReadNone, i32t, 40, &[slot, last]); | ||
| self.s.m.tag(slot, Tag::Clamp); | ||
| let three = self.s.m.i32(3); | ||
| let byte = self.s.m.bin(c, Bin::Shl, slot, three); |
There was a problem hiding this comment.
Index view records with their 16-byte stride
For a computed descriptor index above 0, this uses an 8-byte stride even though the host allocates and writes four dwords (16 bytes) per slot. The four-component load therefore reads overlapping records instead of the selected slot, so shader code can use a bogus address when walking the buffer. Shift by 4, or otherwise match the host writer's 16-byte entry size.
Useful? React with 👍 / 👎.
| self.as_int(stride), | ||
| ); | ||
| let off = a.offset as i32; | ||
| let (lo, hi) = self.address_plus(lo, hi, off); |
There was a problem hiding this comment.
Do not add the table byte offset to the loaded view address
When the s_load address has a nonzero root-relative descriptor-table offset, heap_index has already used that address to select the absolute heap slot read from SLOT_VIEWS; a.offset is part of the descriptor-table address, not an offset into the selected buffer. Adding it here shifts the returned title pointer (for example, an entry at byte offset 32 yields its buffer address plus 32), so address-based walkers can read unrelated bytes. Leave the fetched address unchanged.
Useful? React with 👍 / 👎.
|
Linux offline comparison for the 64-lane question, with a 32-lane control. I built the translator separately at main
The useful next check for the new pixel shaders is a readback with distinguishable buffer addresses at nonzero descriptor indices and a nonzero table offset. AI-assisted: Hermes Agent ran the local comparisons and validator, checked the byte equality, and wrote this comment on ArturoWolff’s behalf. |
|
In-game check (RTX 5070 12 GB, driver 32.0.16.2124, Series X profile,
The 7 refused compute pipelines ("Paramètre incorrect") appear on main too. One crash in three on the branch against one run on main is too few to say whether the PR changes crash odds (0xC0000005 during loading is already reported in #416/#453); the fps difference is within run-to-run spread. Not checked: any picture difference for the 35 programs that now translate. |
A program that loads a buffer descriptor at an index it computes, and only
uses the descriptor's address as data, found no root view to ask and was
refused ("a descriptor read only as data"). The host now keeps one table of
the title addresses of the heap's buffer views by heap slot (SLOT_VIEWS, a
root SRV like SLOT_STRIDES, 2^21 slots x 16 bytes), filled where a slot is
written, and the lowering reads the address, length and stride from it.
A computed term in a used descriptor's address takes the same table.
Adapted from uiliannn/VItoriaBr commits b62bbc0 and 77ad907 (GPL-3.0, the
fork's own licence); the draw.rs part is rewritten for the current main,
the rest applies unchanged.
Co-authored-by: uiliannn <uiliaannn@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
9b6b344 to
41a3892
Compare
…dress Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the review. Both findings are fixed in 41a3892, and the branch is rebased on main a26859f.
Tests: The P2 test is a source check on the function body (no |
|
I checked the nonzero-index/nonzero-offset case against The same synthetic one-thread compute shader used a table base of 32 bytes, dynamic index 4, and immediate table offset 32 bytes (expected slot 6). Eight 16-byte host records had distinct addresses and stride tags. The shader returned the address and tag; it did not dereference the address.
The tag identifies the record independently of the returned address: the parent both selected the wrong record and added 32 after loading it. Neither error occurred on your fix. Unlike my earlier puddle-shader translation comparison, this checks the values produced by the emitted operations. The isolated lavapipe attempt timed out during initialization, before dispatch; actual host binding, device output, and in-game pixels remain unverified. AI disclosure: Hermes Agent built the synthetic fixture, validated the DXIL, reran the CPU/IR comparison, and wrote this follow-up on ArturoWolff’s behalf. |
…ograms Ported in part from ea40c9a (fxceless#738). A mask that holds lanes outside EXEC where it is written is the ballot of every lane where every lane of the wave runs that block. That was known only for two exchanging host waves; a native compute program's wave is the console's, so its lane branches (all_lane_blocks) tell too. A compute program refused with MASK_ELSEWHERE is now retried wide, as one refused with LANE_MASK is. Port notes: only the mask part of fxceless#738 is taken. Its buffer-address table (SLOT_VIEW_ADDRESSES, t252) does what fxceless#749's SLOT_VIEWS does, which this branch has, and t252 is this fork's SLOT_VIEW_MARKS.
…s its address from SLOT_VIEWS fxceless#738's case (the ray-tracing shadow-mask programs), which fxceless#749's view table covers on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ArturoWolff thanks for checking the emitted DXIL on 41a3892 and for pinning the bad parent (a1855ac). The in-game and device-readback side is still unverified on our end; we will report a run on this head when the queue reaches it. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41a3892c9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| l.SetGraphicsRootShaderResourceView(param, gpu); | ||
| } | ||
| }, | ||
| None => once!("a shader reads view addresses of a heap that is not set"), |
There was a problem hiding this comment.
Drop draws when the view-address table is unavailable
If the 32 MiB views upload allocation fails, HostHeap::new leaves views unset and heap_views returns None. This arm only warns and continues, so the draw or dispatch still runs without a valid SLOT_VIEWS root SRV; the shader's raw loads then read zero or undefined addresses. Refuse the submission when this required table cannot be bound.
Useful? React with 👍 / 👎.
Refs #279 (the pixel programs whose descriptor is "read only as data").
What is in it
SLOT_VIEWS, a root SRV likeSLOT_STRIDES, 2^21 slots x 16 bytes, so +32 MiB of upload buffer per view heap). It is written where a slot is written; the lowering reads the address, length and stride from it. A computed term in a used descriptor's address takes the same table.translate --validateon the same title pack with both trees: VItoriaBr had no "read only as data" failures, main had 40. Thelower.rs,descriptor/host.rs,pipeline/host.rs,emit/mod.rsandemit/shader.rsparts apply unchanged; thedraw.rspart is rewritten for the current main (it conflicted).Tested
victory translate <pack> --validate,VICTORY_HOST_WAVE=32, main 8dd30ab against this branch:cargo build --workspace --lockedandcargo test --workspace --locked -- --test-threads=4on this branch: 526 passed, 0 failed, 10 ignored.Not tested
AI use
Regression run
🤖 Generated with Claude Code