URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbe2230408a5fefbd45188ead96f78a7490d9ad9
Author: Janne Grunau <[email protected]>
Date: Sun Sep 17 10:42:15 2023 +0200
asahi: decode: Fix uint64_t format modifiers in agxdecode_stateful()
Fixes i386 build.
Fixes: acd5ed0451d6 ("asahi: decode: Implement VDM call/ret")
Signed-off-by: Janne Grunau <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d99ed6d66d03d419813d7953e08c266e5d7b66c6
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 11:41:16 2023 -0400
asahi: Handle layered background programs
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3715586580badb558fe552d35b551482e12dfa61
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 09:43:56 2023 -0400
asahi: Generate layered EOT programs
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c87095e518df125e116400bd32475d320f79ca97
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 16 15:53:13 2023 -0400
asahi: Use a 2D Array texture for array render targets
Fixes KHR-GLES31.core.geometry_shader.layered_framebuffer.blending_support
with
eMRT forced.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=87a7b239e1f659075c2132fe61ddf7479e93bcf3
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Aug 17 12:51:45 2023 -0400
asahi: Write to cubes/etc attachments as 2D array
To reduce shader variants, the tilebuffer lowering code does not know the
actual texture targets of the spilled render targets, only whether they are
layered or not. As such, all layered targets (3D, cube map, etc) get
written out
uniformly as 2D Arrays. For that to work, the driver needs to do the
corresponding transform.
Regular imageStore() instructions are not affected by any of this.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0cbecc1ad14447c7b790bf657f73b38f58d5d6ae
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 16 17:58:48 2023 -0400
asahi: Predicate layer ID reads
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2a0d64d52415994cfe2af8a830da3c52fa62d2a
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 16 17:58:06 2023 -0400
asahi: Add pass to predicate layer ID reads
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e518c92d26e5aab7d1308323cad87451fda269b3
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:46:06 2023 -0400
asahi: Assume LAYER is flat-shaded
It can't be anything else, this makes sure the varyings are sorted properly.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=68437eb0bab6403e149821e467fb8cf6273f2878
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:44:56 2023 -0400
asahi: Account for layering for attachment views
Do not force a single-layer view, use an actual array attachment when there
are
multiple layers, since this corresponds to a layered framebuffer that will
write
to an array with the eMRT path.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9dc87a00fdf331fe6b58e060d2ba84269a6f3079
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:44:04 2023 -0400
asahi: Expose VS_LAYER_VIEWPORT behind a flag
We can't technically expose the extension without a higher GL version, but
the
implemented subset should work and this lets us test with piglit.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2396d3fe6267e6462dd7ed58e018df1a645d6091
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:43:20 2023 -0400
asahi: Use layered layouts
For correct eMRT code.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a48af4f8f98418b35e4dc4bf57b26ad80b65a30
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:36:40 2023 -0400
agx/lower_tilebuffer: Support spilled layered RTs
If we spill render targets with a layered framebuffer, our spilled targets
are
assumed to be 2D Arrays (in general). We need to use arrayed image
operations to
load/store from these. The layer is given by the layer as read in the
fragemnt
shader. This handles the eMRT portion of layered rendering.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=041451b655c7f59d1baa2bca256312973bdffa24
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:42:14 2023 -0400
agx/tilebuffer: Support layered layouts
Just add a flag for it. We don't care about the actual # of layers when
calculating the layout, only the boolean fact of being layered or not. The
reason we need this at all is because the eMRT implementation needs to
account for layering and that is only keyed off the tilebuffer layout.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b252630604e487be0dbbb7296511b45e7ac3eeb1
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:35:28 2023 -0400
agx: Support packed layered rendering writes
With the new pass.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a954dff07e97e60aea5012859a304bc152144cc
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:17:19 2023 -0400
asahi,agx: Select layered rendering outputs
These 2 are together
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=88fd76d378da515eb3a0848943690f147b7db231
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri Sep 15 16:20:15 2023 -0400
asahi: Add helper to get layer id in internal program
For background/EOT only.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d94f2ee49caa3201e8a6605a9103d719d2c5ffe
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 08:14:58 2023 -0400
agx: Add pass to lower layer ID writes
The hardware needs the layer ID and the viewport index packed together. That
consumes an entire varying slot, if we want those available in the frag
shader
we need a separate slot. Add a pass to insert the extra packed write.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=175819eec605a4548207ef028da735cc759ed31b
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 11:40:39 2023 -0400
agx: Handle layered block image stores
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3a208d6d9efc19f15c6997465f3742abdfe8e0d
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 09:58:00 2023 -0400
agx: Pack block image store dim correctly
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=da0da5d6f8aecdec8e7ccf070c1dc054c9862a99
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 12:32:47 2023 -0400
agx/nir_lower_texture: Allow disabling layer clamping
For background program with layered.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=10b9c2fa3644ad54dc9703f9e44f2a5de53e1de5
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Aug 28 09:40:46 2023 -0400
nir: Support arrays in block_image_store_agx
For layered rendering, runs once per layer.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4042afd5779f6e98b4369e90e9af4952bb0161c
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 16 17:58:27 2023 -0400
nir: Add layer_id_written_agx sysval
We'll implement layer ID reads in the frag shader with a varying read, but
if
the VS doesn't write the varying we need to return 0 per the spec. Add a
sysval
to detect that case so we can handle it at runtime without keys.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d83d24e96af1dd82360fce5361c9fef25d3e657c
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 16:03:46 2023 -0400
agx: Insert jmp_exec_none instructions
With the exception of the backwards branch for loops, all the control flow
we
insert during instruction selection just predicates instructions rather than
actually jumping around. That means, for example, we execute both sides of
the
if even for a uniform condition! That's inefficient. The solution is insert
jmp_exec_none instructions after control flow in order to skip unexecuted
regions, which is much faster than predicating them out. However,
jmp_exec_none
is costly in itself, so we need to use a heuristic to determine when it's
actually beneficial.
This uses a very simple heuristic for this purpose. However, it is a massive
performance speed-up for Dolphin uber shaders: 39fps -> 67fps at 2x
resolution.
Nearly a doubling of performance!
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=79c4d4213c2ad4eeec284c991946cc4b5f0956b5
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 16:47:31 2023 -0400
agx: Add agx_prev_block helper
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd6106c8bd685e937db48ebe4ba0fca16fbd500b
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 16:25:02 2023 -0400
agx: Add jumps to block ends
jmp_exec_none variant that jumps to the last instruction of the target
block,
rather than the beginning. This is convenient for skipping over elses, while
still executing the block-final pop_exec instruction. Similarly for skipping
over loop bodies while still executing the block-final pop_exec, after break
instructions.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=22ab505a3d2abcc8a9dbc2bfd0259101f115764a
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 15:43:51 2023 -0400
agx: Augment if/else/while_cmp with a target
Add an optional pointer to a target block for these instructions. This does
NOT
act like a logical branch, and does NOT get added to the logical control
flow.
It is ignored wholesale until after RA, when physical edges may be inserted
by a
pass we add later in this series.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a894c9a334816e5d7b10e05086937855213b8fb
Author: Alyssa Rosenzweig <[email protected]>
Date: Sun Sep 3 19:03:04 2023 -0400
agx: Set PIPE_SHADER_CAP_CONT_SUPPORTED
So we get adequate testing of continues, rather than lowering them in GLSL.
We
don't really /want/ to see continues but lowering them away will just make
them
harder to test... and besides, we should be optimizing them in NIR (not
GLSL) so
we can get the win on Vulkan too.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d05657e0d675a80486e9325b558a5681d14a7a37
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 17:56:37 2023 -0400
agx: Hoist sample_mask/zs_emit
Although this is well-motivated, perf effect seems to be neglible for
Dolphin.
It does prevent the scheduler from making things worse by sinking these
instructions though, so as a way to prevent future problems this seems
sensible.
The kind of problem this affects (late discard) isn't modelled in shader-db.
Nevertheless, nothing concerning there:
total instructions in shared programs: 1756699 -> 1756722 (<.01%)
instructions in affected programs: 10106 -> 10129 (0.23%)
helped: 21
HURT: 41
Inconclusive result (value mean confidence interval includes 0).
total bytes in shared programs: 11525404 -> 11525452 (<.01%)
bytes in affected programs: 72900 -> 72948 (0.07%)
helped: 27
HURT: 41
Inconclusive result (value mean confidence interval includes 0).
total halfregs in shared programs: 483394 -> 483286 (-0.02%)
halfregs in affected programs: 4945 -> 4837 (-2.18%)
helped: 88
HURT: 78
Inconclusive result (value mean confidence interval includes 0).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d8362b8427414d5b89c4b5b70a7a6581282698e
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Sep 4 10:03:57 2023 -0400
agx: Align the reg file for 256-bit vectors
This fixes live range splitting with 3D textureGrad(), which involves
vectors
larger than the natural 128-bit maximum and hence requires special handling.
Fixes this assert with a combination of debug flags and new patches:
unsigned int find_best_region_to_evict(struct ra_ctx *, unsigned int,
unsigned int *, unsigned int *):
Assertion `(rctx->bound % size) == 0 && "register file size must be
aligned
to the maximum vector size"' failed
Signed-off-by: Alyssa Rosenzweig <[email protected]>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb14cddfa50759aea3f80bce07008f551c877ea2
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Aug 30 20:29:43 2023 -0400
asahi: Clamp index buffer extent to what's read
This makes for cleaner agxdecodes, I think this matches what I've seen on
the
macOS side but I might be misremembering. Certainly shouldn't hurt.
This only applies for direct draws.
Signed-off-by: Alyssa Rosenzweig <[email protected]>