Skip to content

v0.22.4

Choose a tag to compare

@kolkov kolkov released this 16 Nov 12:01
· 24 commits to main since this release

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 gains ir.StmtSubgroupElect and ir.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 lowers subgroupElect (basic family) and subgroupAllEqual (vote family: bool, int,
    uint, float and their vectors) instead of refusing them, and the WGSL frontend lowers subgroupElect, which
    it previously only gated. Each backend writes the form where the target has it: SPIR-V with
    OpGroupNonUniformElect and OpGroupNonUniformAllEqual; MSL with simd_is_first(), while all-equal is
    expanded to simd_broadcast_first + simd_all per component because Metal has no all-equal simd function;
    HLSL with WaveIsFirstLane() and WaveActiveAllEqual(); the GLSL backend with the source builtins; and DXIL
    with waveIsFirstLane and waveActiveAllEqual (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