asahi: Identify object type field via PowerVR

src/imagination/csbgen/rogue_ppp.xml STATE_ISPA bits 28. Looks like that
got split into two structs in AGX (with info duplicated?) but yeah I
have a lot to work with here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18421>
This commit is contained in:
Alyssa Rosenzweig 2022-09-04 14:43:18 -04:00 committed by Marge Bot
parent d93878f77a
commit f7ef5eefdd
2 changed files with 12 additions and 4 deletions

View file

@ -65,6 +65,13 @@
<value name="Quad strip" value="15"/> <!-- guess, confirm with piglit later XXX -->
</enum>
<enum name="Object Type">
<value name="Triangle" value="0"/>
<value name="Line" value="1"/>
<value name="Point sprite UV=10" value="2"/>
<value name="Point sprite UV=01" value="4"/>
</enum>
<enum name="Layout">
<value name="Linear" value="0"/>
<!-- Default layout if no other layout is set -->
@ -370,8 +377,7 @@
<struct name="Unknown face" size="4">
<field name="Unknown" size="8" start="0:20" type="hex" default="0x7e"/>
<field name="Lines" size="1" start="0:28" type="bool"/>
<field name="Points" size="1" start="0:30" type="bool"/>
<field name="Object type" size="4" start="0:28" type="Object Type"/>
</struct>
<struct name="Unknown 4a" size="20">

View file

@ -1537,8 +1537,10 @@ demo_unk11(struct agx_pool *pool, bool prim_lines, bool prim_points, bool
cfg.reads_tilebuffer = reads_tib;
cfg.sample_mask_from_shader = sample_mask_from_shader;
cfg.front.lines = cfg.back.lines = prim_lines;
cfg.front.points = cfg.back.points = prim_points;
cfg.front.object_type = cfg.back.object_type =
prim_points ? AGX_OBJECT_TYPE_POINT_SPRITE_UV01 :
prim_lines ? AGX_OBJECT_TYPE_LINE :
AGX_OBJECT_TYPE_TRIANGLE;
};
return T.gpu;