• Connor Abbott's avatar
    panwrap: Rewrite panwrap decoding and add Bifrost support · 0dddbcdf
    Connor Abbott authored
    In order to properly support 64-bit jobs as well as Bifrost, a number of
    structures need to be moved around, split, etc. which requires a lot of
    shuffling things around. I think this would probably be hard to untangle
    from the actual new Bifrost bits, so I've left everything together in
    one commit. The list of things changed includes:
    - To save some space due to the larger pointers, vertex and tiler jobs
      no longer have the same layout (i.e. common fields like shader_meta,
      etc. no longer have the same offset). A few of the tiler-only fields
      and vertex-only fields now overlap. The tiler job structure is much
      larger than the vertex job structure, although most of the new fields
      are zero for the things I've tried so far. It's not clear whether this
      also also happens on Midgard 64-bit jobs. In addition, there is a new
      Bifrost-only fused job type, where the common fields in the beginning
      are shared. The end result is that there is now a common prefix,
      followed by tiler-only or vertex-only fields (or both, for Midgard),
      and then a common postfix.
    - For Bifrost, we no longer have to make a special incomplete FBD just
      for vertex and tiler jobs. Instead, the relevant fields (tiler_meta
      and the scratchpad) have been moved out into separate structures, and
      removed from the FBD when not needed for fragment jobs.
    - There is no Bifrost driver that uses the SFBD, so we need to decode
      the MFBD now.
panwrap-shader.c 1.71 KB