Alyssa Rosenzweig
6e59474ced
asahi: Identify partial render pipeline
...
Needed if a partial render is incurred from overflowing the parameter
buffer (too much geometry).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
666f307d41
asahi: Add a depth bias structure
...
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 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
cb760a00c2
asahi: Identify depth bias enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
7a0c220401
asahi: Identify "set depth bias index" field
...
Grouped together with the "set scissor index" field, which is natural.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
ff84c07b21
asahi: Identify depth bias array
...
"Inspired" by PowerVR code, by comparison.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
a39fb009d2
asahi: Note unknown field
...
...used internally with visibility tests, together with a weird
vertex/compute-like shader used to zero the visibility buffer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
baa54da7d6
asahi: Relax Draw "command" check
...
Other values in the lower byte seen with multiple draws and
visibility testing.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
d8541d52d2
asahi: Add XML used for visibility tests
...
Aka occlusion queries. There is an annoying limitation in the hardware
(reflected in Metal) that only a single buffer may be bound per render
pass, with the per-draw settings merely specifying an offset.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
a5e6a5e585
asahi: Identify more depth pipeline fields
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:00 -04:00
Alyssa Rosenzweig
6aadd72bd4
asahi: Account for every byte of the cmdbuf
...
This adds the remaining XML. I don't know how much of this is correct,
but it nominally accounts for every byte. So there shouldn't be more
surprises in the command buffer after this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-21 22:01:33 -04:00
Alyssa Rosenzweig
c61e660323
asahi: Handle 3rd deflake address
...
Context switching is so broken. Just trying to get closer. Adding some
XML here to see if we're missing something else obvious.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-21 22:01:33 -04:00
Alyssa Rosenzweig
43f6c08a3b
asahi: Handle uncompressed Z32F depth buffers
...
This uses a subset of the depth/stencil infrastructure we built out to
support writing back tiled, uncompressed Z32F depth buffers to memory.
Texturing from this format is already supported.
This gets glmark2 -bshadow working.
v2: Fix partial renders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
b219e9a96e
asahi: Port driver to macOS 12.x ABI
...
There's lots of reshuffling required. Nothing "interesting", though.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig
f5ae88d36f
asahi: Identify IOGPU_MISC data structure
...
This will be elaborated upon soon.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig
d5ee1eacf1
asahi: Add stencil buffer attachment type
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig
50f9b4ceba
asahi: Identify IOGPU Internal Pipelines structure
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig
eb9da583d7
asahi: Identify aux framebuffer data structure
...
Total guess at the name.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig
535f1c1166
asahi: Identify IOGPU Clear Z/S structure
...
Not sure on the details yet but identify and dump the data structure to start.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482 >
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig
cc3e98e201
asahi: Identify minimum/maximum LOD fields
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903 >
2022-02-18 23:48:33 +00:00
Alyssa Rosenzweig
a8bf729f8a
asahi: Support 2D array and 3D textures
...
As far as I can tell, these *must* be tiled. Other than that, the
implementation is completely routine. Passes
dEQP-GLES3.functional.texture.format.unsized.*2d_array*
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903 >
2022-02-18 23:48:32 +00:00
Alyssa Rosenzweig
d103d64df6
asahi: Add some notes to XML about mipmapping
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903 >
2022-02-18 23:48:32 +00:00
Alyssa Rosenzweig
06b2d97666
asahi: Add 2D Array and 3D texture dimensions
...
Add to XML and translate in the driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903 >
2022-02-18 23:48:32 +00:00
Alyssa Rosenzweig
1a3e21a4de
asahi: Identify Level field of render target descriptor
...
Hardware support for rendering into nonzero mip levels.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903 >
2022-02-18 23:48:32 +00:00
Alyssa Rosenzweig
daab41b80b
asahi: Identify IOGPU_ATTACHMENT::size
...
Oops.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14898 >
2022-02-06 09:48:34 -05:00
Alyssa Rosenzweig
dcc12656e3
asahi: Route sample mask from shader
...
Compiler-controlled bit in the cmdstream.
Some other magic bits are needed for sample mask writes to work
properly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14219 >
2022-01-16 18:23:28 +00:00
Alyssa Rosenzweig
9b57600502
asahi: Rectify confusing XML comment
...
The field was split up...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14219 >
2022-01-16 18:23:28 +00:00
Alyssa Rosenzweig
3341abc5d7
asahi: Break out Fragment Parameters word
...
What the other 31 bits are for is anyone's guess.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14219 >
2022-01-16 18:23:28 +00:00
Alyssa Rosenzweig
fc5a72be2f
asahi: Add XML for unknown 0x4a packet
...
Enough bits of this packet are known that open-coding hex bytes for it
is annoying. Add some XML correpsonding to what we know.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14219 >
2022-01-16 18:23:28 +00:00
Alyssa Rosenzweig
81d22da6de
asahi: Fix BIND_PIPELINE sizing and alignment
...
Fix a bug in BIND_PIPELINE XML reported by Dougall, which cleans up
a bit of both decoder and driver.
Instead of...
* 17 bytes BIND_PIPELINE (17)
* An unused 8 byte record (25)
* A set of N 8 byte records (25 + 8 * N)
* Oops, 1 byte too many! One just disappeared (24 + 8 * N)
It seems to instead be
* 24 bytes BIND_PIPELINE (24)
* A set of N 8 byte records (24 + 8 * N)
without the sentinel record. These means the 8 byte records themselves
are shuffled, with the high byte of the pointers split from the low
word, but that's less gross than an off-by-one.
It's still not clear what the last 8 bytes of the BIND_VERTEX_PIPELINE
structure mean, or the last 4 byte of the BIND_FRAGMENT_PIPELINE
structure which seems to be a bit shorter.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784 >
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig
30433ae716
asahi: Deflake addresses
...
Reported by Dougall.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784 >
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig
1671022bf2
asahi: Identify texture dimension field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
23f5ad668f
asahi: Fix sampler filtering flag
...
Typo in the XML. Fixes broken filtering. Still chasing an off-by-one.
Fixes: cad54e2721
("asahi: Add command buffer XML definitions")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
f376a90d21
asahi: Identify texture address field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
3d75cff7d7
asahi: Identify triangle/lines vs point varyings
...
Seems to allow skipping over point coords?
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
01174fcec8
asahi: Use XML for interpolation packet
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
4c99510d3b
asahi: Identify attachment length field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
b8bc5ed297
asahi: Use GenXML for main bind fragment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
19bb9d278f
asahi: Extend IOGPU header to contain encoder
...
Let's squash together all the resulting zeroes. Trying to discern some structure out of this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
c1d8ed1bc2
asahi: Move IOGPU header to XML
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
8e3f81ccc4
asahi: Add XML for the attachment structure
...
We need a lot more control over these magic structures to get Z/S attachments working correctly. This is an early start.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
18a34dc47e
asahi: Implement the stencil test
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
dc968a9bec
asahi: Prepack rasterizer faces
...
A bit more efficient and will allow easy implementation of the stencil test.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730 >
2021-07-06 13:44:50 +00:00
Alyssa Rosenzweig
bee077f5e2
asahi: Identify vertex texture/sampler counts
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718 >
2021-07-05 20:56:04 +00:00
Alyssa Rosenzweig
eabcf9f31e
asahi: Identify varying descriptor fields
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718 >
2021-07-05 20:56:03 +00:00
Alyssa Rosenzweig
6899f002fa
asahi: Add mipmapping state to the XML
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
6bb7172622
asahi: Hide pixel formats behind an opaque type
...
Convenient for mapping a format table.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
022e482eaa
asahi: Add format enums
...
Split it up into the underlying parts. Now we can decode every format
accessible in Metal.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
bfd5e52f16
asahi: Note that "render target" lacks an sRGB bit
...
sRGB is handled through other mechanisms.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
118682dd83
asahi: Identify line stride in texture/RT XML
...
The off-by-four is concerning.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
9c0ef01c68
asahi: Add layout enum to XML
...
Used for textures and render targets. There are more values here, probably for
other tiling schemes and compression.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00