Skip to content
  • Timothy Arceri's avatar
    glsl: define gl_LightSource members in ARB_vertex_program order · 4cca5137
    Timothy Arceri authored
    
    
    GLSL shares functionality with ARB_vertex_program but the GLSL
    spec defines the gl_LightSource builtin with a member order that
    is different from the packing expected in ARB_vertex_program.
    This difference introduces a need for specialist lowering code
    when handling builtin structs that is not required for normal
    uniform structs due to member location mismatches.
    
    Since gl_LightSource can't be redefined it shouldn't matter if
    we add the members in the order listed in the spec, just so long
    as we add them all. So here we rearrange the definition of the
    glsl builtin to reflex our internal layout and that of
    ARB_vertex_program. This required for the following patch.
    
    CC: <stable@lists.freedesktop.org>
    Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>
    4cca5137