Skip to content
  • Alyssa Rosenzweig's avatar
    asahi: Rework system value lowering · c086f277
    Alyssa Rosenzweig authored and Marge Bot's avatar Marge Bot committed
    
    
    The previous lowering was insufficient in two areas:
    
    * No support for indirection. This is required for dynamically indexing into
      UBOs, SSBOS, etc in OpenGL ES 3.2
    
    * Only a single table supported. Multiple tables are required to implement
      indirect dispatch/draws efficiently, in order to bind the indirect buffer as
      uniforms.
    
    The first problem is addressed here by reworking the lowering of
    system values to happen in NIR, decoupled from the uniform register assignment
    details, such that we can handle 1:n lowerings in a straightforward way.
    Namely, indirect sysvals are lowered to indirect memory loads relative to the
    base address of the sysval table, where the table address is itself pushed as a
    (direct) sysval.
    
    The second problem is addressed in this patch by generalizing to multiple
    uniform tables.
    
    Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
    Part-of: <mesa/mesa!21703>
    c086f277