• Show log

    Commit

  • Hash : ca3d732d
    Author : Matthew Denton
    Date : 2025-07-24T16:22:31

    WGSL: support bool in uniforms
    
    WGSL does not allow booleans in the uniform address space.
    This CL changes the translator to substitute u32 for bool
    in the uniform address space, and convert it to bool on use.
    Arrays of bools are obviously arrays of u32s, and those
    will need special conversion functions to convert the entire
    array<u32> to array<bool> if necessary.
    
    This also includes the optimization of an array<bool> in a
    uniform--when indexing into it, only the indexed element
    will be converted to a native bool, instead of converting
    the entire array and then indexing.
    
    Note that substituting u32 for bool matches std140, so this
    change requires no changes to layout of uniforms.
    
    Also note that WGSL really likes explicit casts, so there's
    not really a way to avoid inserting explicit casts everywhere
    when using u32.
    
    Bug: angleproject:376553328
    Change-Id: I8f72e55c6b401c28ff622622df7a450b7032721f
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6785609
    Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
    Commit-Queue: Matthew Denton <mpdenton@chromium.org>
    Reviewed-by: Liza Burakova <liza@chromium.org>
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/angle.git
    Git SSH git@git.kmx.io:kc3-lang/angle.git
    Public access ? public
    Description

    A conformant OpenGL ES implementation for Windows, Mac, Linux, iOS and Android.

    Homepage

    Github

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags