3 Commits
Author SHA1 Message Date
m2 (AI Agent)andClaude Opus 5.5 d83f541c54 fix(shader): ballot each predicate once per block
Every OpGroupNonUniformBallot now goes through SpirvModule::AddSubgroupBallot.
A repeated ballot of the same predicate in the same block becomes an
OpCopyObject of the first ballot. Within one block the active invocations do
not change, so the result is identical. The cache is cleared at every label,
function boundary, function call and demote, and helper functions keep their
own cache.

When SPIRV-Tools is enabled, block merging and specialization can still put
two ballots of one predicate into the same block after emission, so
ValidateAndOptimizeSpirv collapses repeated block ballots the same way on
every module it returns, optimized or not.

NVIDIA 580's SPIR-V compiler segfaulted (libnvidia-gpucomp+0xe3facc) on GTA V
compute shaders that ballot one predicate many times in a block. One such
shader had 163 repeated ballots across three blocks. With them collapsed, both
crashing captures (compute-fe506552cec99bfc and compute-c02e5e3f35010fa5)
compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 09:30:26 +02:00
Adrià FranchandClaude 391eb6ffe8 feat(shader): decode DPP8 on VOP1 and VOP2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 03:32:30 +02:00
Nicolas Abosch f1d8ec8913 fix(shader): isolate wave32 operations in wide host subgroups 2026-10-04 21:02:46 -03:00