URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad214fcaf7f9581a9c315c11e8cabe19deca8504
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jul 20 10:52:42 2023 -0400
asahi: Advertise Z16_UNORM
This works (on the downstream kernel, anyway).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0197d46b34c54f9a4e2bb477a538ca091d89faca
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 16:38:48 2023 -0400
asahi: Execute preambles for background programs
This will be useful when spilling render targets.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9fbe2fdea04ee5d315e596dd6cc989a540d9c387
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 15 07:03:32 2023 -0400
asahi: Offset clear colour uniform by 4
Frees up u0_u1 for a bindless base address which will make render target
spilling easier to implement.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0597c100ccb1658ceb6a38d9af74747a1687f071
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 17:07:18 2023 -0400
asahi: Ignore spilled render targets for background load
Nothing to reload.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef5a5e170fe74c8b68dfb8ea40be3928edb1a64d
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 16:45:54 2023 -0400
asahi: Permit meta shaders to use preambles
Preambles are occassionally useful with background programs.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f167c9f728e16a27cbeff7af395261573564d3c
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 16:26:42 2023 -0400
asahi: Lower multisample image stores
These will be used for spilling multisampled render targets.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff16397912032873ed6fb3e9a99d09e15f054118
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Jul 17 21:39:14 2023 -0400
asahi: Lower tilebuffer access for spilled RTs
Conceptually similar, we just don't have the tilebuffer available this time.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=66e8afe7c98da8f1945567038745f589b99dc1aa
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 14 17:48:14 2023 -0400
asahi: Extract some tilebuffer lowering code
In prep for spilling. No functional change.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=46b54064837ee8da25c4cb04c22ff10d6dc02977
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri Jun 23 14:23:59 2023 -0400
asahi: Ignore spilled render targets with partial renders
Partial renders exist to the spill the tilebuffer to memory, there's
nothing to
do if it's already spilled (and would just waste memory bandwidth and
create a
feedback loop).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc38f24de364006f32de0380c37e2143b354c07e
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 14 17:42:01 2023 -0400
asahi: Ignore spilled render targets in EOT shaders
Regardless whether we implement Apple-style eMRT or something simpler, the
EOT
shader isn't involved here.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=73fb1543fd50e707d20c47a8677ff26223909c9d
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 14 17:53:38 2023 -0400
asahi: Do not support masking with spilled RTs
Extra complexity for this interaction, not worth it until we have an actual
use
case IMHO.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa0e671b7b2891c661d1656557bb8352a0069ae1
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 15 07:05:39 2023 -0400
asahi: Add agx_tilebuffer_spills query
We can skip various work in the driver if we're not spilling render targets.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6bc42054d118f3980c25b0ca2a94e618502e1475
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 14 17:37:04 2023 -0400
asahi: Introduce concept of spilled render targets
To accommodate framebuffers which exceed tilebuffer limits, we'll need to
spill
render targets to main memory. In effect, we need to emulate an
immediate-mode
renderer for some render targets. This decision is made on a per-render
target
basis. In our tilebuffer layout calculation, rather than asserting that all
render targets fit, introduce a notion of spilling.
This doesn't actually implement spilling -- it just pushes the assert
failure
down to the users. But it's progress.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17e10499b94bd26dbf6d09699445d1232ff664d2
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri Jun 23 14:23:30 2023 -0400
asahi: Extract sampler_view_for_surface
We'll reuse this logic for the spilled RT case.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=10fc9e3d5935ee5e76970ab74d61dd02e39824ea
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 17:19:21 2023 -0400
agx: Plumb in coverage mask
This is internally used by the hardware when writing to the tilebuffer. We
need
to use it externally to spill multisample render targets.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=56bb3dcc2137348d3bc88d6c17bffc9378f7ee76
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 15 08:48:31 2023 -0400
agx: Require tag writes with side effects
Otherwise the fragment shader might be skipped entirely. (Possibly this is
the
wrong approach to this though...)
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=46bb0037ce47d80a8e72da1f5c966ea3e26520d0
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 8 11:11:22 2023 -0400
agx: Add simple image fencing pass
Minimum needed to pass CTS.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ed2596fe7773bd4ef9bdbfd08d087f6048b5de4
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 8 10:07:31 2023 -0400
agx: Implement fence_*_to_tex_agx intrinsics
We need these fencing intrinsics because our image caches aren't coherent
with
memory. Furthermore, we need some sync intrinsics for imageblocks (which are
spicy images). These are a stub of what the final fragment shader interlock
implementation will look like, or what a real Metal-grade imageblock
implementation needs, but this is good enough for handling the sync
requirements
with spilled render targets.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1afe26be626d2a798a787584c56eabbb3b2d8ce
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 7 16:53:11 2023 -0400
agx: Don't emit silly barriers
Trust in the scoped_barrier.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b618ba93309078c177ee1a6e6e58698f67bcff92
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 7 14:21:19 2023 -0400
agx: Emit global memory barriers for images
This is part of image atomics, since those go through the regular memory
path.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=93f26abe493912abbfc172474728394a4694010d
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 7 10:57:00 2023 -0400
agx: Implement image_load
Texture loads can be reordered freely but image loads can't be (since there
could be writes). Implement image_load natively to avoid subtle problems
with
CSE and scheduling.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5f37ac5cb0248febfcf09918c08999a8179266e
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 8 12:15:01 2023 -0400
agx: Extract texture write mask handling
image_load will share the logic.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=34c759467c059d57859179a9012e06a0070f485e
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 7 11:04:40 2023 -0400
agx: Add image_load opcode
This is equivalent to texture_load but cannot be reordered, since it might
be
writeable.
It also sets bit 43. This needs more investigation, but it fixes
KHR-GLES31.core.shader_image_load_store.basic-glsl-misc-fs. Some sort of
cache
control bit.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=02b1ddeca66db895249d5d8f542481310c87f8bc
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 7 16:14:13 2023 -0400
asahi,agx: Fix txf sampler
Bizarrely, the clamps/wrap modes are respected so we need to set them
appropriately for correct out-of-bounds behaviour (returning all zero).
That in
turn means we can't use whatever sampler is already there, instead we need
to
allocate a dedicated sampler just for txf. Good news is we have an extra
sampler
state register available for the purpose.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1106e2499eeddee8b34c1dd1f3bf6d98377c53f6
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 19:26:02 2023 -0400
agx: Lower buffer images
Similar to buffer reads, we need to implement buffer images as 2D images
with
fixed width and some lowering code.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=15915f021ae547747e797c5d80378105b368cbf1
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 19:25:18 2023 -0400
agx: Lower image atomics
Lower image atomics to texel address loads, and lower texel address loads to
arithmetic and descriptor reads. This implements image atomics.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c09089025d7ed5ea110eca83d92183ffb5c9611c
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 17:33:39 2023 -0400
agx: Extract texture_descriptor_ptr_for_* helpers
For implementing image_texel_address, when there's no point in creating an
internal texture instruction just to lower immediately.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a43141f3b5411180b0ca3df55d004e72ae1626c2
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 18:58:40 2023 -0400
agx: Extract coords_for_buffer_texture helper
The mapping of 1D -> 2D coordinates for indexing into buffer textures
(lowered
to fixed-width 2D images) will be shared between both texture load and image
store code paths, so pull it out.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2cfd2a228576035c61238532d0d2066e468422e
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 18:54:44 2023 -0400
agx: Add interleave opcode
We'll use it for texture atomics.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6ed776a13a84bf397f6cc45ee4d8e60c9f55f4d
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon May 29 20:34:50 2023 -0400
agx: Handle early_fragment_tests
Simply doing nothing fixes
dEQP-GLES31.functional.image_load_store.early_fragment_tests.*. However, we
need
to actually insert the sample_mask instruction to make sure the shader runs
at
all (I think), doing that fixes:
KHR-GLES31.core.shader_image_load_store.basic-glsl-earlyFragTests
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=76641762cee4d6997a5bed1b5bf6d1f6f0e10b22
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon May 29 19:30:16 2023 -0400
agx: Implement image barriers
Or cache flushes or whatever these actually are. Probably could be optimized
once we understand what the 4 individual instructions are actually doing.
Fixes
dEQP-GLES31.functional.image_load_store.2d.qualifiers.*.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad456a683c76a63f764be86d8fd8a0e81d2c92c6
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon May 29 22:51:29 2023 -0400
agx: Wait for outstanding stores before barriers
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b3635a19744ccae2fc36cc0d6f6ce9cc6cee894
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue May 30 20:16:07 2023 -0400
agx: Handle frag side effects without render targets
We still need to insert our lowering code, though this case could probably
be
optimized somehow. Fixes a massive number of KHR-GLES3 and KHR-GLES31 tests,
including
KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 and
lots
of PBO tests.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ef89e71bac056abf721222d170399d0a1495590
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 13:08:13 2023 -0400
agx: Translate image_store from NIR
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=13bb1209e2e5586f1561175c21605f0612eba5ba
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat May 20 13:44:37 2023 -0400
agx: Translate texture bindless handles
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb21160a19b18a3ce4cae9fcac1e3cd901cc92d8
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat May 20 13:46:50 2023 -0400
agx: Pack bindless textures
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=34a95820913fde3cfc150101553e231b5b713271
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 14:22:40 2023 -0400
agx: Handle bindless properly for txs lowering
When I wrote this pass I mostly guessed what our bindless handles would look
like. Now that we know we can do it right.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4aa6fd22e9cf898e59e785dce5632d602015bbf
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat May 20 13:36:10 2023 -0400
agx: Model texture bindless base
Extra source we need to implement bindless.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4505cb962c63ebf303f6eba7406b792f456454f9
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 13:07:52 2023 -0400
agx: Add image write instruction
Model and pack what's in the hardware for this.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2978f4eef24677b57897f74d0466b7fbbd0cdf48
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 13:06:41 2023 -0400
agx: Generalize texture/PBE packing
For the generic image write instruction we'll want the full forms of these
fields.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8398a2469ad98165c6a2ebd6800293f9a7d3b8b4
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 16:51:20 2023 -0400
agx: Lower image size to txs
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6e33249801fcf3e88ab2d645df0b628df4cc712
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 15:01:22 2023 -0400
agx: Legalize image LODs to be 16-bit
Required by the hardware. Do it in NIR so we can optimize the conversion.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dfea028aa27bdd6b5576c632c3c1ff0eec69ef7b
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 27 18:33:57 2023 -0400
asahi: Use nir_lower_robust_access
This makes images robust as required by the OpenGL ES spec.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ebdd5fd1232e5caf4b63ebcf1f8625b650a2637
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 15:43:22 2023 -0400
asahi: Extend PBE packing for image support
We need to support arrayed images and sRGB images, which are hardware. For
atomics, we need to pack the augmented software data structure. Finally, we
need
to support buffer images. Like their texture counterparts, these get
lowered to
2D images.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a77facd4599f5dbc530c3a769c9d2345885467d2
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 15:39:57 2023 -0400
asahi: Augment PBE descriptor for software access
For implementing image atomics (and multisample image writes), we need
information about the image layout in the shader. It's a lot nicer to
determine
the image layouts on the CPU (where we have ail) and stash the results in
the
PBE descriptor, where we have a convenient hole to do so, rather than
trying to
do all the layout calculations on the GPU on the fly. Add a data structure
that
the driver will fill out and the image atomic lowering will consider as
part of
the hardware.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee83453f69f8ef5c82c7e2b5cc90e9779c638b6d
Author: Asahi Lina <[email protected]>
Date: Tue Jul 11 00:45:17 2023 +0900
asahi: Add a shared library interface for decode
Add a simple API so that decode can be used as a shared library by the
Python hypervisor. Note that this is not thread-safe. If we ever want to
use this in other contexts with thread safety, it will need a refactor
(along with the core decode code anyway).
Signed-off-by: Asahi Lina <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=55d363e02ef45fbf57c5ef46706a8ed69ee6e0dd
Author: Asahi Lina <[email protected]>
Date: Tue Jul 11 00:43:57 2023 +0900
asahi: decode: Add a function to construct decode_params from a chip_id
Should be useful on macOS later to properly support detecting the right
GPU, but for now just hardcode T8103/G13G.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=56d5db247acfb41f22ac2c61eeca0fc94841247d
Author: Asahi Lina <[email protected]>
Date: Tue Jul 11 00:42:52 2023 +0900
asahi: decode: Refactor to always copy GPU mem to local buffers
We want to plug this library into the hypervisor, but there we don't
have all GPU memory already mapped in our address space. Refactor the
GPU mem read function to always allocate local buffers and copy in the
data there.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c2858c2afda009c35556dad372ec6eb621e0142
Author: Asahi Lina <[email protected]>
Date: Tue Jul 11 02:23:33 2023 +0900
asahi: wrap: Handle freeing shmems
Needed for some Metal demos that end up creating multiple queues.
This is still definitely broken/not fully correct, but it at least
gets things working for those.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0dc819f284a2fff633ca0a6cebf684d3344a0e91
Author: Asahi Lina <[email protected]>
Date: Fri Jul 7 19:45:28 2023 +0900
asahi: Add extra CDM header block for G14X
Looks like we finally found our first properly divergent codepath.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69e91527d3d3d40429509141e855889cc9fc2d59
Author: Asahi Lina <[email protected]>
Date: Fri Jul 7 19:41:48 2023 +0900
asahi: decode: Add a params argument to pass through
Sooner or later we were going to need divergent codepaths in decode, and
it looks like now is the time. Add a `params` typedef and pass it
through all the decoder callbacks. This is an alias for
drm_asahi_params_global, but use a typedef so we can change that later
without changing dozens of instances.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=de1174791d7612c1d08d0ef7c6ebbd41fa7f8dfe
Author: Alyssa Rosenzweig <[email protected]>
Date: Sun Jul 2 13:30:44 2023 -0400
agx: Fix bogus assert
Dolphin uses all the uniforms.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=80e103d71805eb39f65187f445e5810b56663935
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat Jul 1 14:43:53 2023 -0400
agx: Reduce un/packs with mem access lowering
Often not needed and makes the NIR harder to read.
shader-db is noise.
total instructions in shared programs: 1752712 -> 1752688 (<.01%)
instructions in affected programs: 8338 -> 8314 (-0.29%)
helped: 21
HURT: 8
Inconclusive result (%-change mean confidence interval includes 0).
total bytes in shared programs: 11943572 -> 11943434 (<.01%)
bytes in affected programs: 56716 -> 56578 (-0.24%)
helped: 21
HURT: 8
Inconclusive result (%-change mean confidence interval includes 0).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=afa38c7d4f5064e8b033262f6f342f95806b8130
Author: Alyssa Rosenzweig <[email protected]>
Date: Sun Jul 2 09:57:26 2023 -0400
agx: Vectorize 16-bit parallel copies
If we have two 16-bit copies to/from adjacent 16-bit registers, we can
instead
use a single 32-bit copy from the 32-bit register pair. Since 32-bit integer
arithmetic is (almost) as efficient as 16-bit on AGX, this (almost) doubles
performance of affected parallel copies.
total instructions in shared programs: 1788606 -> 1788301 (-0.02%)
instructions in affected programs: 17057 -> 16752 (-1.79%)
helped: 150
HURT: 0
Instructions are helped.
total bytes in shared programs: 12196492 -> 12194662 (-0.02%)
bytes in affected programs: 122894 -> 121064 (-1.49%)
helped: 150
HURT: 0
Bytes are helped.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a4c09b728b1e117f96994d9b3003fbba11fdf7
Author: Alyssa Rosenzweig <[email protected]>
Date: Sun Jul 2 09:46:12 2023 -0400
agx: Try to allocate phi sources with loop phis
total instructions in shared programs: 1788666 -> 1788606 (<.01%)
instructions in affected programs: 7953 -> 7893 (-0.75%)
helped: 29
HURT: 0
Instructions are helped.
total bytes in shared programs: 12196852 -> 12196492 (<.01%)
bytes in affected programs: 53908 -> 53548 (-0.67%)
helped: 29
HURT: 0
Bytes are helped.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0caa08c26e1d1c0d5eb918d517d11d65fff1abf
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat Jul 1 13:11:46 2023 -0400
agx: Try to allocate phi sources with phis
Not meaningfully using more registers since this is just about how we assign
registers after fixing the maximum # of registers used (note that thread
count
is unaffected).
total instructions in shared programs: 1790901 -> 1788666 (-0.12%)
instructions in affected programs: 230680 -> 228445 (-0.97%)
helped: 681
HURT: 2
Instructions are helped.
total bytes in shared programs: 12210266 -> 12196852 (-0.11%)
bytes in affected programs: 1634100 -> 1620686 (-0.82%)
helped: 682
HURT: 2
Bytes are helped.
total halfregs in shared programs: 532130 -> 532218 (0.02%)
halfregs in affected programs: 848 -> 936 (10.38%)
helped: 3
HURT: 13
Halfregs are HURT.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=73da872a66deef2bc0923619b8388494527ad136
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat Jul 1 12:56:02 2023 -0400
agx: Try to allocate phis compatibly with sources
All shaders affected for thread count are in pubg... by chance the
allocation
before used fewer registers than the calculated register demand (I guess
because
we're conservative with our vector handling) and so got lucky and got higher
thread count. That shader is also helped massively for instructions.
The halfreg change doesn't matter -- we're not actually increasing register
demand, we're just being more choosy about our registers.
total instructions in shared programs: 1799738 -> 1790901 (-0.49%)
instructions in affected programs: 306081 -> 297244 (-2.89%)
helped: 889
HURT: 14
Instructions are helped.
total bytes in shared programs: 12263290 -> 12210266 (-0.43%)
bytes in affected programs: 2150966 -> 2097942 (-2.47%)
helped: 889
HURT: 14
Bytes are helped.
total halfregs in shared programs: 531981 -> 532130 (0.03%)
halfregs in affected programs: 1925 -> 2074 (7.74%)
helped: 0
HURT: 26
Halfregs are HURT.
total threads in shared programs: 18885184 -> 18884224 (<.01%)
threads in affected programs: 13440 -> 12480 (-7.14%)
helped: 0
HURT: 15
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cc8d7b52a68c665dc7d6450740cc55c6766748a
Author: Alyssa Rosenzweig <[email protected]>
Date: Sun Jul 2 09:33:53 2023 -0400
agx: Add try_coalesce_with helper
Common logic the next few patches will use to try to assign something to the
same register as something else. "If it's already been assigned a register
and
that register is free now, use it, otherwise bail."
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42fbbd2a73f8444ec14546b7e75bf2e239167a92
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 18:57:47 2023 -0400
asahi: Forbid 2D Linear with images
There's no known use case, so forbidding this reduces the combinatorics
required
in the texture atomic lowering.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e53da72659f7e063aaf8f88dad0cb433b0d1299
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 15:58:19 2023 -0400
asahi: Don't restrict sampler views
We now emulate an infinitely large binding table with bindless, so the sky
is
the limit for this CAP. Note we still have the limit for samplers, so this
probably doesn't do anything for OpenGL.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6788194c3944797c12f4e4f561769ab0d259d1ef
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 15:41:28 2023 -0400
asahi: Make clear the non-sRGBness of EOT images
For sRGB render targets, we encode sRGB when writing pixels into the
tilebuffer
(in the fragment shader), not when writing out the image. When we actually
write
out the tilebuffer to the image, we don't use the PBE's sRGB conversion, we
just
bind it as a UNORM 8 image and blit the pre-transformed pixels.
We're about to add real sRGB support for the PBE, so make this linearization
explicit.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8db9eeaeece9e384a62cdf3b0fb9354ea45bc795
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 16:21:20 2023 -0400
asahi: Upload image descriptors
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=689d47fe7c63b2cb6bd347c595dec4494e1e3f6c
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 16:02:44 2023 -0400
asahi: Upload at most the max texture state registers
The rest are bindless now.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=274d0d1c8243f0b32ebe0fc755fe4caedf031f16
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat May 20 13:24:13 2023 -0400
asahi: Add texture/image indexing lowering pass
Both textures and images share a unified indexing scheme in AGX. When
binding
tables are used, they can be mapped to texture state registers. Otherwise,
there
is bindless access available.
It would be nice to map OpenGL's binding table based textures and images to
AGX
texture state registers 1:1. The problem is that OpenGL allows more combined
textures and images than we necessarily have texture state registers. So,
we use
as many texture state registers as we can, and then we fallback on an
internal
bindless scheme mapping an extended binding table.
Add and use a lowering pass to map all of the API-level texture/image
indices to
either texture state registers or bindless handles as required.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ad4a35a6c5fbd6537d4bc00fd06ac8acf87854f
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 16:03:15 2023 -0400
asahi: Add agx_batch_track_image helper
Adapted from Panfrost.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=868d85bd830f74a0d97f14af47c6a1840d031f09
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 20:28:11 2023 -0400
asahi: Reallocate to set the writeable image flag
...If needed, for array images.
But avoid doing so for non-array images.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=92cd946028fbaf012ff9f75f6cd47cfda2835761
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 19:44:40 2023 -0400
asahi: Mark writeable images as such
ail needs this information to select the appropriate layout.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=16f081bf2a88f7d2b82bfee88da063936c139235
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 18:12:22 2023 -0400
ail: Page-align layers for writable images
This appears to be necessary for PBE writes.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f716da596b005c2bcac146bd49d6ed84a1771b3e
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jul 5 12:19:51 2023 -0400
asahi,agx: Set coherency bit for clustered targets
We need to set a particular bit on atomics for them to be coherent across
clusters. Fixes atomics on G13X.
Setting this bit on the single-cluster G13G, on the other hand, wedges the
GPU.
So best be careful ;-)
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f66fc18886120bcee27908edb6b4cda365dfc64f
Author: Janne Grunau <[email protected]>
Date: Wed Jul 5 20:58:48 2023 +0200
asahi: toggle more barrier bits after transform feedback
Fixes
KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays
and
KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-elements
on M1 Ultra (G13D). Let's assume that same bits are required on M1 Pro
and Max.
Signed-off-by: Janne Grunau <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=58d43ca03c448e6f10bfbea38744ab2855c9b1a9
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jul 20 09:58:26 2023 -0400
asahi: Identify background/EOT counts
Similar to the counts for VDM/PDM/CDM.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=198c51d66495197e12ce3fad36e9e1c6dc8d9be4
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 20:24:40 2023 -0400
asahi: Serialize NIR in memory
Deserializing isn't expected to be much more expensive than cloning, and the
serialized NIR is *significantly* smaller. So store the serialized instead
of
the deserialized, and deserialize on the fly.
This reduces a lot of noise in valgrind due to random crap alloc'd against
the
NIR shader by lowering passes that now get properly freed.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8df0a86cc09d1f0b4521096edcc37fe505fa21d6
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu May 25 14:34:42 2023 -0400
asahi: Extract shader_initialize helper
To fill out an agx_uncompiled_shader struct, since the logic was duplicated
between graphics and compute.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e08923a7bc4418124bebb77fd2b8cf65c019e8c
Author: Asahi Lina <[email protected]>
Date: Wed Jul 5 20:28:46 2023 +0900
asahi: Add nomsaa debug flag
This forces off MSAA, which together with smalltile mode helps test more
combinations.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9b2f02c2facc70a3e59b85a176d3fa0f4751a2f
Author: Asahi Lina <[email protected]>
Date: Wed Jul 5 20:25:01 2023 +0900
asahi: Add smalltile debug option
This lets us force small tiles when they otherwise would not be
necessary, which is useful for decoupling tile size and the logic that
depends on it from things like MSAA and MRT which can trigger small
tiles.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=35715db30d7ccceeeaadf7cfbcf506b16a34541c
Author: Asahi Lina <[email protected]>
Date: Wed Jul 5 20:16:19 2023 +0900
asahi: Add synctvb debug flag
This requests synchronous TVB growth (instead of split renders). Mostly
for testing at this point.
Only works with newer kernels and the kernel will complain on dmesg for
now.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d33375bb052df0e9a4812ad15816bb2dd36d63fe
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 14:09:17 2023 -0400
asahi: Refactor PBE upload routine
In general, PBE descriptors map pipe_image_views for the hardware. That we
use a
writeable shader image internally for render targets is an
implementation-detail
of the end-of-tile program. So, refactor the PBE upload routine to take a
pipe_image_view (not a pipe_surface), and translate the pipe_surface into an
internal pipe_image_view for end-of-tile programs.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=85c829d64f6ce8eaab4a07ab75815018d3c43d87
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jul 4 22:26:36 2023 -0400
asahi: Remove unused #define
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f10d51541d57a38b8a8001e103cf657153e2c79c
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jul 4 22:24:28 2023 -0400
asahi: Use nir_builder_at more
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c20c9f06d359000ea31f9fb9ca5abff1313db3c9
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jul 20 10:45:18 2023 -0400
asahi: Augment fake drm_asahi_params_global
Stub out a bit more UAPI so we can build with the additions in this patch
series.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>