Repository navigation
Fix packed GS output types and select-guard immediates - #78
erykwieliczko wants to merge 2 commits into
Conversation
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
left a comment
There was a problem hiding this comment.
Reviewed at ea2c18f (source only; no build on my side). Approving.
- Select-guard immediates: correct.
agx_pack_alu_src()(and the select-value packer) requirevalue < 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 ownsrc_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-typesonly 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/polyis shared upstream Mesa code (also used by Honeykrisp), so the GS fix and its test are worth sending upstream.
|
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. |
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-5782625and Mesagit-ea2c18f45c.Kernel PR: omacom/linux-aurora#233