asahi: Add a depth bias structure
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 3 Apr 2022 01:09:27 +0000 (21:09 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 22 May 2022 21:09:04 +0000 (17:09 -0400)
This is simple and corresponds directly to the Metal inputs. However,
the alignment is a bit tricky, so let's add formal XML for it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>

src/asahi/lib/cmdbuf.xml

index 4753c6b..4f7e65c 100644 (file)
     <field name="Max Z" size="32" start="3:0" type="float"/>
   </struct>
 
+  <!-- Note: this structure is not padded. It really is 12 bytes -->
+  <struct name="Depth bias" size="12">
+    <field name="Depth bias" size="32" start="0:0" type="float"/>
+    <field name="Slope scale" size="32" start="1:0" type="float"/>
+    <field name="Clamp" size="32" start="2:0" type="float"/>
+  </struct>
+
   <struct name="Rasterizer face" size="8">
     <field name="Stencil reference" size="8" start="0:0" type="hex"/>
     <!-- line width is 4:4 fixed point with off-by-one applied -->