Skip to content
  • Alyssa Rosenzweig's avatar
    panfrost: Rewrite varying assembly · b98955e1
    Alyssa Rosenzweig authored
    
    
    There are two stages to varying assembly in the command stream: creating
    the varying buffers in the command stream, and creating the varying meta
    descriptors (also in the command stream) linked to the aforementioned
    buffers. The previous code for this was ad hoc and brittle, making some
    invalid assumptions causing unmaintainable workarounds to pile up across
    the driver (both compiler and command stream side).
    
    This patch completely rewrites the varying assembly code. There's a
    trivial performance penalty (we now memcpy the varying meta to the
    command stream on draw, rather than on compile). That said, the
    improvement in flexibility and clarity is well-worth it.
    
    The motivator for these changes was support for gl_PointCoord (and
    eventually point sprites for legacy GL), which was impossible to
    implement with the old varying assembly code.  With the new refactor,
    it's super easy; support for gl_PointCoord is included with this patch.
    
    All in all, I'm quite happy with how this turned out.
    
    Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
    b98955e1