URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a28f9738e1781ebdfb6e485284544905793d42d3
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 27 14:19:33 2023 -0400
asahi: Use txf_ms for MSAA background programs
Fixes regression in assorted dEQP tests including:
dEQP-EGL.functional.color_clears.multi_context.gles3.rgba8888_window
Fixes: d4424950ace ("asahi: Use txf for background program")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=02ac7305a01a25b43ca06c8a47beb947ddbb0f11
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 20:12:25 2023 -0400
agx: Don't leak ssa_to_reg_out
calloc'd in the RA, should be freed in the RA. Identified with valgrind.
Fixes: 6b13616cba2 ("agx: Implement vector live range splitting")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a334a9f4d90d38208488a99716352de39fc72f5
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 20:06:14 2023 -0400
asahi: Take ownership of compute shader NIR
Fixes massive leak of compute shader NIR. Identified with valgrind.
Yes, this requires casting away const *.
Yes, Gallium is dumb.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a004d968742ea8788f2bdf6984c1f74b4305e399
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 20:05:39 2023 -0400
asahi: Use ralloc harder
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=56461bc0a2e0f8535b7219badd007d09801172d5
Author: Alyssa Rosenzweig <[email protected]>
Date: Wed Jun 28 12:38:48 2023 -0400
asahi: Fix scissor_culls_everything check
Account for the possibility that the scissor is outside the render area.
Fixes
the usual assertion fail:
glcts: ../src/gallium/drivers/asahi/agx_state.c:1015:
agx_upload_viewport_scissor: Assertion `maxx > minx && maxy > miny'
failed.
on the following dEQP tests with my conformance build:
dEQP-GLES3.functional.fragment_ops.scissor.outside_render_line
dEQP-GLES3.functional.fragment_ops.scissor.outside_render_point
dEQP-GLES3.functional.fragment_ops.scissor.outside_render_tri
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=98de1b1b9586b1d2f6cb37b620a14316b160f95c
Author: Alyssa Rosenzweig <[email protected]>
Date: Mon Jun 26 16:23:01 2023 -0400
asahi: Assert we don't transition shared resources
This is an invariant maintained by all current callers and subtly required
for
the BO swapping to work. Assert it to make it obvious.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1140bdb783b7a99d3380dcabcaa2c9ac525bc252
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 19:15:28 2023 +0900
asahi: Arrange VS varyings in the correct order
The GPU ABI requires varyings to be grouped as follows:
- Position
- Smooth shaded fp32
- Flat shaded fp32
- Linear shaded fp32
- Smooth shaded fp16
- Flat shaded fp16
- Linear shaded fp16
- Point size
Use the flat shaded mask info we now have in the vertex shader key to
sort things properly, and pass the counts to the hardware.
FP16 is still TODO.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2055e0324342b4e2a98f71937c77299d5507df66
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 19:12:51 2023 +0900
asahi: Add flat/linear shaded varyings mask to the VS shader key
We need this information in order to arrange varyings properly, which
means we need shader variants. Add this to the shader key, taking the
value from the FS input info.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a65b4bb1446201fab8ba2f99b5e5109896ca8bf
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 19:10:41 2023 +0900
asahi: Fix type confusion for fragment shader keys
We can't attempt to access the fs union member if this is not a FS.
That worked so far since there wasn't a VS shader key at all, but we're
about to introduce one.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=90834353a1041a03ce033974c1505fea4d3e06db
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 19:07:20 2023 +0900
asahi: Gather flat/linear shaded input info from uncompiled FS
We need to propagate shading model metadata from the FS to the VS in
order to correctly lay out the uniforms in the right order. This means
we need VS variants depending on this data.
We could use the existing shader info structure, but that applies to
compiled shaders which would introduce a dependency from the VS compile
to the FS compile. This information does not change with FS variants, so
we can introduce an agx_uncompiled_shader_info structure and gather it
early at precompilation time.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=49994dc8cb5555dfc35be67d2852acc2d7274331
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 17:09:19 2023 +0900
asahi: Identify the separate varying count fields
Flat/goraud/linear and 32/16 need to be specified separately. This
change identifies the new fields but should be a functional no-op.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9bf52e00f5909b81dd5dcfafaa9a5326ec6fa4b
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 8 09:35:30 2023 -0400
agx: Assert that barriers are not used in the preamble
It is nonsensical and confuses the hardware.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bf7d14b2cf5ae98dba7ed43846aec037712a8a0
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 8 12:05:21 2023 -0400
agx: Use nir_opt_shrink_vectors
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c81a14c7541f3c8c0a672d7f9b3d33014b0d0e1b
Author: Alyssa Rosenzweig <[email protected]>
Date: Sat May 27 22:23:11 2023 -0400
agx: Use nir_opt_shrink_stores
This especially helps with image stores, where we otherwise insert a bunch
of
pointless moves to collect a vector even when we know the format only has a
single channel.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=45cbe122821730609ec1ff12f1b2f6aeeea5896b
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 20:08:09 2023 -0400
asahi: Remove ; in perf_debug_ctx
Otherwise `if(x) perf_debug_ctx(); else if (y) ...` doesn't work.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b57faede7156c90f355f57ad0c4543ee1212c7b3
Author: Alyssa Rosenzweig <[email protected]>
Date: Thu Jun 15 14:19:36 2023 -0400
asahi: Identify PBE::sRGB flag
Needed to write out sRGB images correctly.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6dc6991930311ee55077e307d55a761592bc33f9
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri May 19 13:05:39 2023 -0400
asahi: Rename 'Render Target' to 'PBE'
It's used for all PBE operations, including regular image writes, so use the
more general name. Compare the powervr driver.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=75b5bf8dbccf26dd87aa0323b29fe6a7d98efa1e
Author: Alyssa Rosenzweig <[email protected]>
Date: Tue Jun 6 18:56:05 2023 -0400
asahi: Strip ? in GenXML
Sometimes it's nice to have boolean flags with ? in the name, allow this by
stripping ? when generating the sanitized C name.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=850380cbf5e6c24975195e05af6590cf45ae7ce8
Author: Asahi Lina <[email protected]>
Date: Wed Jun 28 20:46:27 2023 +0900
asahi: match_soa: Treat offsets as signed
An offset may be negative, indexing backwards from the array base.
When we right shift an offset by the format shift, we need to use a
signed shift to ensure that the resulting offset is still negative.
Fixes Nautilus faults/pink crashes.
Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a90b0743f3b085970f95121738950de76f7c78a8
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri Jun 16 08:31:40 2023 -0400
agx: Smarten discard_agx -> sample_mask lowering
In 97a1bbeaf26 ("agx: Fix discards"), we made our discard lowering very
simple,
since we had just discovered the underlying instruction behaviour and
needed a
hotfix for misrendering in the wild. Now that we understand the behaviour,
we
can do better. There are two potential performance issues with the lowering
in
that commit:
1. It generates extra sample_mask instructions. For a shader that has a
single
discard_if at root level, it would generate two instructions
sample_mask foo, 0
sample_mask ~0, ~0
rather than a single
sample_mask ~0, ~foo
2. It runs depth/stencil testing/updates at the end of the shader, even
when it
could be run immediately after the discard. This might cause pipeline
stalls.
The solution is to insert the "trigger testing" sample_mask instruction as
soon
after the "discard" instruction as possible, fusing them if they would be
next
to each other. There are two cases:
1. The last discard is executed unconditionally. In this case, we can test
immediately after, unconditionally, and fuse together.
2. The last discard is executed conditionally. In this case, we test in the
first unconditional block after the discard. Example shader:
...
loop {
if .. {
loop {
discard_if <-- discard here
...
}
..
}
...
}
<---- we test here
...
store_output
Together this covers all the usual patterns for single-sampled discard. We
could
still do better with multisampling, but whatever.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a4c9136cd851cb276a507752a189b13122a5be3
Author: Alyssa Rosenzweig <[email protected]>
Date: Fri Jun 16 08:55:58 2023 -0400
agx: Add algebraic opt to help with discard lowering
When lowering discards, it will be convenient to generate the pattern:
(cond ? 255 : 0) ^ 255
Add rules to optimize that to
(cond ? 0 : 255)
This is not part of the main algebraic optimizer since this lowering happens
late.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>