Alyssa Rosenzweig
e5637f44b8
asahi: unify naming for COUNTS structs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
a173c2e38c
asahi: split CDM Launch words
...
similarly separates counts from USC words.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
5fbd8bb694
asahi: split frag shader words
...
Isolate the counts from the rest, in particular.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
7dcd5f1f02
asahi: don't allocate for USC words
...
let the driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
06d59d3f5c
asahi: rename meta -> bg/eot
...
meta is for making meta gallium calls, we already have something else
appropriately named meta. bg/eot programs are not meta, they're their own
hardware mechanism. use the appropiate powervr name instead.
nfc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
ed2d15d42f
asahi: track imports for decode
...
otherwise we fail with interesting dmabuf tracing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
ff553d1ac8
asahi/decode: QoL improvements
...
- plumb through a context so we can handle multiple VMs in a single process
- add image heap dumping helper for bindless images
- try to guess betwen texture & PBE to reduce noise
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247 >
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
d2cf17022d
libagx: don't use get_group_id()
...
We don't want to see base_wg intrinsics.
Fixes: d22f936019 ("nir: remove workgroup_id_zero_base")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
21f0b14844
libagx: add query copy kernel
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
13d875da32
libagx: use sub_group_scan_inclusive_add
...
now that the backend has a full subgroup impl.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
76bb81dd59
asahi: don't reserve extra UVS space for layer
...
it's a sysval now
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
48d16b3972
asahi: extend epilog key for force early frag handling
...
need to be extra careful around the sample mask.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
ee9dab83e7
asahi: don't ralloc in agx_fast_link
...
let the driver allocate upfront so we can suballoc etc.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
c1d68da5e2
asahi: plumb tri fan flatshading through common
...
not yet used in the GL driver but we should probably fix that.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
cad60ab4b1
asahi: extend varying linking for tri fan weirdness
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
d763ab2de0
asahi: don't allocate for ppp updates
...
let the driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
3eacd8a8b2
asahi: don't allocate varyings ourselves
...
let the driver do it.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
59d2b7283c
asahi: add agx_ppp_push_merged helper
...
convenient for ppp merge trickery.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:27 +00:00
Alyssa Rosenzweig
22292afd3c
asahi: pack tilebuffer usc word ahead-of-time
...
reduce draw time overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
289cc5f5dd
asahi: drop bogus assertion
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
64e2502e54
asahi: eliminate num_workgroups for VS->GS + VS->TCS
...
this is a step towards simpler geom/tess uniform management.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
c829f46fde
asahi: update comment for maint5
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
c16df593a5
asahi: update comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
a2094e8142
asahi: rm always true param
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
52211088a2
asahi: rm more dead lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
45e5b7ad50
asahi: mv initialization of grid z for indirect GS
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
4a344de276
asahi: rm redundant input_vertices
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
e5c7bca88d
asahi: rm num_vertices uses
...
inline the last one to make obvious what we have left.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
1a9841ddef
asahi: rm unused lower
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
d90887a7f1
asahi: rm dated comment
...
no longer confusing.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
8fd2e3c71b
asahi: rm another num_vertices use
...
this wasn't even for vertices, just primitives!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
5af1828440
asahi: mv vertex_id_for_topology_class into GS lowering
...
not used with tess.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
a76e8447ac
asahi: don't use load_num_vertices in geometry shaders
...
It makes the uniform upload path more complicated (since num_vertices is backed
by a software compute shader construct), but we can just use gs_grid[0] the way
we already for rast shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
0b7b201ab6
asahi: move some GS lowering into lower_gs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
a27a803961
asahi: add agx_index_size_to_B helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
f6b863df30
asahi: set src_type for store_output
...
Fixes: 1632948a76 ("nir: validate src_type of store_output intrinsics, require bit_size >= 16")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
5b3af5b7e6
asahi: rearrange VS uniforms
...
this puts draw parameters in the right order and adds in the draw ID. together
this makes MDI a lot more straightforward to do efficiently.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
6d518609e3
asahi: eliminate troublesome empty uniforms
...
these don't do what you expect and are wasteful.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
0e845e38f9
asahi: free libagx if we don't use a ralloc memctx
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
6b47d9c600
asahi: move primitive MSAA field
...
works on Cull but not Cull 2, because forget me.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
cccf0609a6
asahi: simplify image atomic lowering
...
Do more calculation in the preamble so we can do less pointer chasing and keep
everything within our 64-bit budget.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
9069ac986b
asahi: fix cull unknown bits
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
e04779ad4b
asahi: lower texture instructions with epilogs
...
for eMRT
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
f4991baa89
asahi: fix sample ID with multiblock epilogs
...
eMRT + MSAA + epilog case.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
cf653997d7
asahi: fix store_output component/offset
...
with epilogs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
696f4654d4
asahi: fix rgb565 blending
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
292cd87054
asahi: clarify format code in image lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
18239f3e88
asahi: handle agx_ppp_fragment_face_2 with no info
...
for null fs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
afdc6891c1
asahi: mv AGX_MAX_OCCLUSION_QUERIES define
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00
Alyssa Rosenzweig
883b5407c8
asahi: rework VBO lower for divisor=0
...
silly special case that we should handle.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179 >
2024-05-14 04:57:26 +00:00