Skip to content

Fix packed GS output types and select-guard immediates - #78

Closed
erykwieliczko wants to merge 2 commits into
aurora-wipfrom
fix/g15-cts-stability
Closed

erykwieliczko wants to merge 2 commits into
aurora-wipfrom
fix/g15-cts-stability

Conversation

@erykwieliczko

@erykwieliczko erykwieliczko commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Preserve float/int/uint component types when geometry outputs share a varying slot. Keep synthesized select-guard constants within the instruction's eight-bit immediate range.

Add regressions for mixed GS output types and the 255/256 immediate boundary.

The seven crashing CTS cases pass with assertions enabled. GS stress passes 1,200 executions each on baseline and revised kernels with VM churn; wider geometry, transform-feedback, multistream and cross-stage checks pass. All 319 AGX tests and both poly regression executables pass.

Full Vulkan 1.4 CTS run on M3 Pro: 3,247,552 cases, 0 failures and 0 crashes, with no GPU faults or firmware crash. Tested with kernel m3plasma-5782625 and Mesa git-ea2c18f45c.

Kernel PR: omacom/linux-aurora#233

Output packing can place float and integer components in one slot. Preserve their bits and component types through GS lowering.

Generated-by: LLM
Signed-off-by: Eryk Wieliczko <eryk@wieliczko.ninja>
Select-guard rewriting could generate #256 for an eight-bit immediate. Restrict candidate constants to valid encodings; equivalent comparisons remain available.

Generated-by: LLM
Signed-off-by: Eryk Wieliczko <eryk@wieliczko.ninja>

@maralcbr maralcbr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at ea2c18f (source only; no build on my side). Approving.

  • Select-guard immediates: correct. agx_pack_alu_src() (and the select-value packer) require value < 0x100, so synthesized constants must stay below 256, and the 254/255 thresholds at 16 and 32 bits cover the boundary.
  • Packed GS output types: stores are scalarized before collect_output_types(), so tracking one type per component is valid. The disjoint write masks give each component its own src_type, and a component written with two different types falls back to unsigned. Looks right.

Notes, not blockers:

  • No checks ran on this PR; the 319 AGX tests and poly executables are as reported.
  • poly-gs-output-types only covers adjacent 32-bit components written once each. Adding a same-component conflict, a sparse or non-adjacent grouping, and a payload check would make the regression test stronger.
  • src/poly is shared upstream Mesa code (also used by Honeykrisp), so the GS fix and its test are worth sending upstream.

@RyanTheTide

Copy link
Copy Markdown

Thanks Eryk, and the M3 Pro CTS result is great. We checked it against the current aurora-wip. Both fixes are already there via #53: the select-guard immediate (ae035d5) and the GS component-type handling (a later rewrite of d4b6840). What #78 adds on top is the uint fallback in collect_output_types, where one GS output component is written with two different types and aurora-wip asserts instead, plus the two new tests (G17PSelectGuardImmediateBoundary and poly-gs-output-types). The branch is on 132fff8 and conflicts with aurora-wip. Could you rebase it onto aurora-wip so it carries just that fallback and the tests? We merged it locally on acb2189 and ran the full M2 rolling set: 0 changes across 428,195 tests, and the assert build matched the release build. The Neo run will follow the rebase.

@RyanTheTide

Copy link
Copy Markdown

Both fixes are already on aurora-wip: c5930dc (poly: preserve mixed types in packed GS outputs) and ae035d5 (select-guard immediates kept under 0x100), with the regression checks in 838493b. Closing as superseded, thanks Eryk.

@RyanTheTide
RyanTheTide deleted the fix/g15-cts-stability branch October 30, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants