Repository navigation
v0.22.4
The GLSL input frontend stays a preview: glsl.Parse reads a large part of Vulkan GLSL 440/450/460 and of the
GL 3.30 core / ES 3.00 dialects, and every form it accepts is verified end to end, but a few subgroup forms the
IR cannot express are still refused with named limitations (the ballot bit helpers and the gl_Subgroup*Mask
variables, and the clustered forms); the Min/Max/And/Or/Xor scans stay refused until the text backends write
them; and the ParseInfo / ParseOptions shape may still change until the frontend is complete.
Added
- Subgroup elect and all-equal across the IR, both frontends and every backend (card P2-IR-038, ADR-014).
The IR gainsir.StmtSubgroupElectandir.SubgroupOperationAllEqual(Rust naga has neither; elect is a
statement because it must run exactly once per invocation, and all-equal is a vote whose result is a bool).
The GLSL frontend now lowerssubgroupElect(basic family) andsubgroupAllEqual(vote family: bool, int,
uint, float and their vectors) instead of refusing them, and the WGSL frontend lowerssubgroupElect, which
it previously only gated. Each backend writes the form where the target has it: SPIR-V with
OpGroupNonUniformElectandOpGroupNonUniformAllEqual; MSL withsimd_is_first(), while all-equal is
expanded tosimd_broadcast_first+simd_allper component because Metal has no all-equal simd function;
HLSL withWaveIsFirstLane()andWaveActiveAllEqual(); the GLSL backend with the source builtins; and DXIL
withwaveIsFirstLaneandwaveActiveAllEqual(bool operands widened to i32, vector all-equal refused while
the emitter has no vector wave overload). The SPIR-V frontend maps both opcodes too.
The remaining subgroup gaps — the ballot bit operations, the clustered forms and the gl_Subgroup*Mask
variables — stay refused with named limitations, and the design fixes the IR shape each will take before the
v1.0 freeze.
Full changelog: https://github.com/gogpu/naga/blob/main/CHANGELOG.md