Repository navigation
Conversation
The 195 "an address in an SGPR that is no root parameter" failures are the GS half of one merged ES+GS stage (fxceless#138). Step 1 of its support, without emitting anything: - StageIo::Gs and io::raise for a geometry program. User data 0 and 1 of the merged stage (s8, s9) are the console runtime's table pointer when the root layout puts nothing there; resource tracking traces a load through it to resource::RUNTIME_TABLE instead of failing. Other stages and other unbound SGPRs fail as before. - merged::pair_es_gs pairs the ES program (vertex container) with the GS program (geometry container): same wave size, one meaning per user-data dword, merged root layout. emit::translate_merged_gs runs the pair as far as emission. - emit refuses a geometry program with GS_EMIT ("GS emit"). `translate` counts those on their own "geometry" line, not among the failures. Not done: DXIL geometry emission, the ES to GS handoff through LDS, the output records, GS_EMIT/GS_CUT, the host pipeline. The runtime table's contents and the GS stage data are not read. Refs fxceless#138 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fxceless#138) pair_es_gs keeps both halves' ranges of one descriptor table pointer instead of calling them a user-data conflict. The runtime table pointer is only inferred through resource::track_merged, i.e. for the merged layout of a pair (translate_merged_gs) or, in victory translate, as a stated assumption for an unpaired geometry program: a geometry program traced alone no longer takes user data 0 and 1 as free. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s#311) StageIo::Es and StageIo::Gs now carry MergedIo (LDS bytes from the common record). merged::limits counts the vertices a GS program emits along its longest path from its s_sendmsg GS_EMIT / GS_CUT / GS_EMIT_CUT messages, refusing a message in a loop. The runtime table pointer is also resolved for the ES half, which shares the SGPRs. victory translate counts the GS programs with a bounded vertex count. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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: b622e17409
ℹ️ 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".
| } | ||
| on.push(b); | ||
| let after = match p.blocks[b].exit { | ||
| Exit::End | Exit::Indirect => 0, |
There was a problem hiding this comment.
Reject unresolved GS control flow when claiming a vertex bound
If a GS has an unresolved s_setpc_b64 whose target reaches another GS block, the IR marks the exit Indirect, but this branch treats it like End. limits then counts only pre-jump emits, so max_vertices can be lower than the shader's actual maximum; reject such paths or resolve their targets before reporting a bound.
Useful? React with 👍 / 👎.
| let first = native.stage.user_sgpr(crate::merged::RUNTIME_TABLE); | ||
| let taken = native.layout.iter().any(|p| { | ||
| let at = u32::from(native.stage.user_sgpr(p.user_data)); | ||
| at < u32::from(first) + 2 && u32::from(first) < at + p.sgprs |
There was a problem hiding this comment.
Check the SGPR range before adding its untrusted length
For ES/GS containers, RootParam.sgprs is deserialized from the layout without a range check, so a malformed entry with a large count can overflow at + p.sgprs: checked builds panic, while release builds can wrap and incorrectly treat s8/s9 as free. Use checked or widened interval arithmetic here and in pair_es_gs.
Useful? React with 👍 / 👎.
…unts (fxceless#311) Review fixes: a GS program with an indirect jump has no vertex bound, and the user-data overlap tests saturate the container-supplied SGPR count. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Both review findings fixed in d8e53e1 (with tests):
|
Step 2 of #138, for #311. Stacked on #309: this branch starts from #309's, so until #309 merges the diff here includes its commits (and the review fix on it); the commit of this step is the last one. The base is
mainbecause the stacked branch is not in this repository.What is in it
StageIo::Es(MergedIo)andStageIo::Gs(MergedIo): the record of either half of a merged stage now gives its LDS bytes (the common record field, as mesh programs already read it). The other stage data after the record (output signature rows, limits) is in a layout nothing in the tree has a fixture for, so it is not read.merged::limits(program): from the code, the vertices a GS program emits along its longest path (s_sendmsgGS_EMIT / GS_EMIT_CUT), the streams used, whether it cuts; a message inside a loop or a program that emits nothing is refused.merged::GsMessagedecodes the geometry messages (message, operation and stream bits ofsimm16).MergedGs::lds_bytes(): the larger of the two records' LDS size.io::raiseaccepts an ES program (no exports, runtime table input only).victory translate: thegeometrysection gains a line with how many GS programs have a bounded vertex count in their code and the largest bound.Tested
cargo build --workspace --locked,cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 517 passed, 0 failed, 7 ignored (Windows). One unrelatedvictory-gpuin-place WARP test failed in a first run and passed in the rerun of that crate and in the full run.Not tested
victory translateover the title: not run, so the new bounded-count line is unmeasured.Still to do: #312 (ES half, LDS handoff), #313 (GS output as DXIL stream emits), #314 (pipeline path); #138 stays open.
AI use
Written with Claude Code (Claude Sonnet 5.5). The tests are synthetic programs; no title shaders or game files were read.