Vasily Khoruzhick [Mon, 23 May 2022 06:32:16 +0000 (23:32 -0700)]
lima: enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT
It looks like we don't need to do anything special to enable it.
Piglit spec@arb_buffer_storage@bufferstorage-persistent skip: 16 =>
skip: 12, pass: 4. The rest require GL_ARB_shader_image_load_store
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16660>
Vasily Khoruzhick [Sun, 22 May 2022 21:13:45 +0000 (14:13 -0700)]
lima: Implement texture_barrier
Improves x11perf -copywinwin100 from ~1520/sec to ~3700/sec
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16658>
Guilherme Gallo [Mon, 16 May 2022 00:44:48 +0000 (21:44 -0300)]
ci/lava: Fix Gitlab Section markers
LAVA is mangling the escape codes from ANSI during log fetching from the
target device, making the gitlab section markers from deqp, for example,
to not work, inputting noise into the log.
This commit makes the simplest fix which is to replace the mangled
characters to the fixed ones.
This approach is error-prone, since it may unwittingly replace a genuine
log that resembles the mangled escape code. But this solution should
suffice until we get a proper fix from LAVA team itself.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16520>
Guilherme Gallo [Mon, 16 May 2022 00:35:48 +0000 (21:35 -0300)]
ci/lava: Fix colored LAVA outputs
LAVA is mangling the escape codes from ANSI during log fetching from the
target device, making the colored lines from deqp, for example, to not
work, inputting noise into the log.
This commit makes the most straightforward fix which is to replace the
mangled characters to the fixed ones.
This approach is error-prone since it may unwittingly replace a genuine
log that resembles the mangled escape code. But this solution should
suffice until we get a proper fix from LAVA developers itself.
Fixes: #5503
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16520>
Yonggang Luo [Mon, 23 May 2022 14:16:34 +0000 (22:16 +0800)]
nir: Fixes MSVC compiling error about unused variable `_`
Fixes:
836470d4331 ("nir: allow NIR_PASS(_, )")
MSVC compiling error:
```
nir/nir_lower_shader_calls.c
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1188): error C2220: the following warning is treated as an error
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1188): warning C4101: '_': unreferenced local variable
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1190): warning C4101: '_': unreferenced local variable
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16666>
Jason Ekstrand [Wed, 18 May 2022 17:23:17 +0000 (12:23 -0500)]
nir/algebraic: Add two more pack/unpack rules
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16591>
Erik Faye-Lund [Fri, 20 May 2022 12:38:46 +0000 (14:38 +0200)]
d3d12: add missing cmath includes
If we want to use the std:: version of the math functions, we need to
include <cmath>.
Fixes:
b171a6baa21 ("d3d12: Add video encode implementation of pipe_video_codec")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16636>
Rhys Perry [Wed, 11 May 2022 18:33:32 +0000 (19:33 +0100)]
aco: only add/subtract low bits of program addresses
fossil-db (Sienna Cichlid):
Totals from 4007 (2.47% of 162293) affected shaders:
Instrs: 3733239 -> 3728018 (-0.14%)
CodeSize:
20770340 ->
20749456 (-0.10%)
Latency:
46883958 ->
46872764 (-0.02%); split: -0.02%, +0.00%
InvThroughput:
10550392 ->
10548698 (-0.02%); split: -0.02%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16460>
Rhys Perry [Wed, 11 May 2022 18:23:43 +0000 (19:23 +0100)]
aco/tests: add test for p_constaddr with a non-zero offset
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16460>
Rhys Perry [Wed, 11 May 2022 18:23:00 +0000 (19:23 +0100)]
aco: fix p_constaddr with a non-zero offset
Seems this broke a while ago and we never noticed.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
0af7ff49fde ("aco: lower p_constaddr into separate instructions earlier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16460>
Samuel Pitoiset [Fri, 20 May 2022 16:37:50 +0000 (18:37 +0200)]
radv: introduce radv_graphics_pipeline_info and split existing info structs
I should have introduced radv_graphics_pipeline_info earlier. More
states will be added later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16643>
Erico Nunes [Tue, 26 Apr 2022 09:09:47 +0000 (11:09 +0200)]
lima/ppir: merge branch nodes in simple cases
In some simple cases, we can merge the branch operation with an existing
instruction and avoid the creation of an empty new instruction just for
the branch node.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16163>
Erico Nunes [Tue, 26 Apr 2022 09:09:24 +0000 (11:09 +0200)]
lima/ppir: optimize branch comparison when possible
The branch operation supports comparisons, so it may be possible to
merge a previous comparison operation with the branch operation.
There are several restrictions to do it at this stage, but it may save
instructions in many cases.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16163>
Erico Nunes [Sun, 27 Mar 2022 12:07:46 +0000 (14:07 +0200)]
docs/ci: fix literalinclude of caching setup files
Fix the syntax to show the files in the generated sphinx, otherwise
they just don't show at all.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15599>
Jan Palus [Fri, 20 May 2022 09:20:33 +0000 (11:20 +0200)]
pvr: use UINT64_C for 64-bit constant
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6528
Signed-off-by: Jan Palus <jpalus@fastmail.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16630>
Boris Brezillon [Fri, 20 May 2022 11:53:30 +0000 (04:53 -0700)]
dzn: Use the correct ICD path on Win32
Similar to commit
c6cddd2e17e ("lavapipe: Use the correct ICD path on
Win32"), but applied to dozen.
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16634>
Boris Brezillon [Fri, 20 May 2022 11:17:33 +0000 (04:17 -0700)]
spirv: Fix windows build
Looks like MSVC doesn't like VLAs:
src/compiler/spirv/spirv_to_nir.c(3879): error C2057: expected constant expression
src/compiler/spirv/spirv_to_nir.c(3879): error C2466: cannot allocate an array of constant size 0
src/compiler/spirv/spirv_to_nir.c(3879): error C2133: 'srcs': unknown size
so let's use a static array size.
Fixes:
87d74311985 ("spirv: Use nir_vec_scalars() to simplify matrix transpose.")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16632>
Boris Brezillon [Fri, 20 May 2022 08:31:24 +0000 (10:31 +0200)]
dzn: Use the vk_sync_binary abstraction
D3D12 fences are capable of handling binary operations, but the
current dzn_sync implementation doesn't match vk_sync expectations
when sync objects are used to back semaphores. In that case, the wait
operation is supposed to set the sync object back to an unsignaled
state after the wait succeeded, but there's no way of knowing what
the sync object is used for, and this implicit-reset behavior is not
expected on fence objects, which also use the sync primitive.
That means we currently have a semaphore implementation that works
only once, and, as soon as the semaphore object has been signaled it
stays in a signaled state until it's destroyed.
We could extend the sync framework to pass an
implicit-reset-after-wait flag, but, given no one else seems to
need that, it's probably simpler to drop the binary sync
capability and rely on the binary-on-top-of-timeline emulation provided
by the core.
Fixes:
a012b219640e ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16629>
Samuel Pitoiset [Wed, 18 May 2022 09:26:53 +0000 (11:26 +0200)]
radv: split radv_pipeline into radv_{graphics,compute,library}pipeline
Instead of using a union in radv_pipeline, this introduces new
structures for graphics, compute and library pipelines which inherit
from radv_pipeline. This will ease graphics pipeline libary implem.
There is still no radv_raytracing_pipeline because RADV actually
uses a compute pipeline for everything but it could be introduced
later when necessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 12:59:42 +0000 (14:59 +0200)]
radv: cleanup using device/physical_device during pipeline creation
This removes a TON of pipeline->device occurences which were a mess.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 12:57:01 +0000 (14:57 +0200)]
radv: move gs_table_depth to the physical_device
This is not a logical device property.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 08:42:51 +0000 (10:42 +0200)]
radv: remove unused radv_get_conservative_raster_mode() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 08:41:15 +0000 (10:41 +0200)]
radv: remove couple of useless pCreateInfo pointers in the emit path
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 08:39:02 +0000 (10:39 +0200)]
radv: rename radv_pipeline_generate_XXX() to radv_pipeline_emit_XXX()
Shorter and clearer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Samuel Pitoiset [Wed, 18 May 2022 08:32:48 +0000 (10:32 +0200)]
radv: constify radv_pipeline in more radv_pipeline_generate_XXX() helpers
These functions should only emit registers and not change the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603>
Corentin Noël [Fri, 20 May 2022 08:24:08 +0000 (10:24 +0200)]
virgl/ci: Update virglrenderer
Update virglrenderer to the latest version on time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16627>
Alyssa Rosenzweig [Sun, 22 May 2022 21:57:34 +0000 (17:57 -0400)]
docs/asahi: Add initial driver docs
Emma asked for some docs on how to use wrap for when wrap gets landed.
This should do :-)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sat, 10 Jul 2021 16:30:40 +0000 (12:30 -0400)]
asahi: Add wrap library
Add a library that wraps the key IOKit entrypoints used in the macOS
UABI for AGX. Our wrapped routines print information about the kernel
calls made and dump work submitted to the GPU using agxdecode. This code
has two major use cases:
1. Debugging Mesa, particularly around the undocumented macOS
user-kernel interface. Logs from Mesa may compared to Metal to check
that the UABI is being used correcrly.
2. Reverse-engineering the hardware, using this as glue to get at the
"interesting" GPU memory.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 22 May 2022 20:51:44 +0000 (16:51 -0400)]
asahi: Guard against encoder overflows
We don't seem to hit this yet, but it's possible so add an assert to
rule it out for failing tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 22 May 2022 02:37:14 +0000 (22:37 -0400)]
asahi: Allocate a larger segment list
This ought to be dynamically allocated but because this is macOS kernel
UABI only gunk, let's just hack around it...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 22 May 2022 01:44:27 +0000 (21:44 -0400)]
asahi: Handle RECT textures as 2D
Rectangle textures are just 2D textures with unnormalized coordinates,
but we already handle unnormalized coordinates in the sampler state. So
we just need to alias RECT and 2D.
Fixes GALLIUM_HUD.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Mon, 9 May 2022 01:12:47 +0000 (21:12 -0400)]
asahi: Fix pipeline decoding
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Mon, 9 May 2022 01:02:20 +0000 (21:02 -0400)]
asahi: Improve render target dumping
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Mon, 9 May 2022 00:55:05 +0000 (20:55 -0400)]
asahi: Sync some more unknown fields
I don't understand these structs well. Good news, though-- Asahi Lina
confirmed this is all software-defined crap in the macOS UABI.
Unfortunately, they seem to correspond to physical registers.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 16:28:20 +0000 (12:28 -0400)]
asahi: Drop some unknowns
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 15:19:01 +0000 (11:19 -0400)]
asahi: Identify suballocated size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 15:13:01 +0000 (11:13 -0400)]
asahi: Identify suballocation mechanism
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 14:34:00 +0000 (10:34 -0400)]
asahi: Decode resource allocation requests
We already know much of this structure, let's pretty print to simplify
our traces.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 14:24:50 +0000 (10:24 -0400)]
asahi: Decode resource allocation responses
We already know much of this structure, let's pretty print to simplify
our traces.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 02:25:51 +0000 (22:25 -0400)]
asahi: Align segment list unknowns with Metal
No observable change.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 02:23:57 +0000 (22:23 -0400)]
asahi: Compute segment list length
Quiesces agxdecode error introduced in previous commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 02:21:15 +0000 (22:21 -0400)]
asahi: Validate segment list length
This is easy now!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 02:18:01 +0000 (22:18 -0400)]
asahi: Split unknown field in segment list header
Seen as 0x8000.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 02:14:11 +0000 (22:14 -0400)]
asahi: Add segment list pretty printer
Validate all the new expectations and print all the fields. This should
make differences between the drivers obvious, I hope.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 01:55:25 +0000 (21:55 -0400)]
asahi: Sync some names with Project Zero
This should clarify a few things I didn't get independently
investigating the interface. Of coruse, I got other pieces... the sum of
the parts is better :-)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Mon, 9 May 2022 01:03:31 +0000 (21:03 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:31:40 +0000 (15:31 -0400)]
asahi: Implement polygon offset
This is pretty simple now that the hardware is understood. The hardware
interfaces parallels that of scissors, so the scissor path is reused
with minor modifications to accommodate the new functionality.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sun, 3 Apr 2022 01:09:27 +0000 (21:09 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:19:01 +0000 (15:19 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:17:52 +0000 (15:17 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:12:51 +0000 (15:12 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:04:32 +0000 (15:04 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 19:04:05 +0000 (15:04 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 18:58:44 +0000 (14:58 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 18:45:47 +0000 (14:45 -0400)]
asahi: Dump "unknown 4a" structure
A few fields are known at least, let's decode them correctly instead of
falling back to a hex dump.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sat, 2 Apr 2022 17:22:04 +0000 (13:22 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 16:35:57 +0000 (12:35 -0400)]
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>
Alyssa Rosenzweig [Sat, 2 Apr 2022 16:14:32 +0000 (12:14 -0400)]
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>
Alyssa Rosenzweig [Tue, 22 Mar 2022 01:25:13 +0000 (21:25 -0400)]
asahi: Flush on partial clears
Not the fastest thing, but should be conformant. (Panfrost to this day
has this effective behaviour...)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Tue, 22 Mar 2022 01:21:48 +0000 (21:21 -0400)]
asahi: Pass depth/stencil clear values to firmware
These need to be format-packed, but as we only support Z32F_S8 right
now, that's trivial.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Tue, 22 Feb 2022 01:02:41 +0000 (20:02 -0500)]
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>
Alyssa Rosenzweig [Tue, 22 Mar 2022 01:11:47 +0000 (21:11 -0400)]
asahi: Don't store to unbound render targets
Otherwise we have a state leak with depth-only attachments, as in
glmark2 -bshadow.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Tue, 22 Mar 2022 00:56:59 +0000 (20:56 -0400)]
asahi: Validate depth/stencil formats
Don't go advertising formats we don't actually support.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Sat, 2 Apr 2022 15:58:04 +0000 (11:58 -0400)]
asahi: Use z24_in_z32f lowering
Thanks Dave!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Alyssa Rosenzweig [Tue, 22 Mar 2022 01:31:53 +0000 (21:31 -0400)]
asahi: Run lower_blend for all fragment shaders
Unify the paths so that colour masks are respected even when regular
blending is off (or when logic ops are used!) Fixes
dEQP-GLES2.functional.color_clear.masked_rgb
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
Mike Blumenkrantz [Wed, 18 May 2022 14:07:43 +0000 (10:07 -0400)]
turnip: fix assert for max xfb outputs
this is a counter, not an index, so use <=
cc: mesa-stable
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16620>
Chia-I Wu [Mon, 16 May 2022 18:07:03 +0000 (11:07 -0700)]
turnip: disable UBWC for SNORM formats
In copy_format, we treat snorm as unorm to avoid clamping. But snorm
and unorm are UBWC incompatible for special values such as all 0's or
all 1's. Disable UBWC for snorm.
For reference, I dumped the first byte of an UBWC blocks and it was
color UNORM SNORM
all black 0x01 0x31
all white 0x0d 0x11
@flto clarified that bit 4 is unset for fast clear encoded blocks. It
looks like fast clear is not used for SNORM.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6480
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16534>
Jeffrey Knockel [Mon, 2 May 2022 01:15:32 +0000 (21:15 -0400)]
egl: dereference XCB drawable pointers
eglCreatePlatformWindowSurface[EXT] and
eglCreatePlatformPixmapSurface[EXT] should be passed (xcb_window_t *)
and (xcb_pixmap_t *), so we must dereference these types before using
them as drawables. We already do something similar with X11 drawable
pointers.
Signed-off-by: Jeffrey Knockel <jeff@jeffreyknockel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16269>
Karol Herbst [Sat, 7 May 2022 10:20:17 +0000 (12:20 +0200)]
clc: disable opaque pointers until they are supported
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
Karol Herbst [Thu, 12 May 2022 17:26:31 +0000 (19:26 +0200)]
clc: fix compiler features_macro CTS Test
Even with that alone we can't pass the test, as LLVM enables some
extensions based on the SPIR target we choose.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
Karol Herbst [Fri, 15 Apr 2022 17:21:44 +0000 (19:21 +0200)]
clc: speed up compilation by not relying on opencl-c.h
This depends on LLVM change: https://reviews.llvm.org/D125401
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
Karol Herbst [Sat, 23 Apr 2022 08:48:51 +0000 (10:48 +0200)]
clc: drop parsingComplete check
This relies too much on the properties of the SPIRV-LLVM-Translator and is
required to load SPIR-Vs found in the OpenCL CTS.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
Karol Herbst [Sun, 24 Apr 2022 11:21:13 +0000 (13:21 +0200)]
clc: parse localSize and localSizeHint
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
Chia-I Wu [Tue, 17 May 2022 23:30:34 +0000 (16:30 -0700)]
turnip: fix tu6_pack_border_color for z24
The value should be at the bottom 24 bits, not at the top.
dEQP-VK.pipeline.sampler.* still passes. This fixes most of
dEQP-GLES31.functional.texture_border_clamp.formats.*depth* on angle.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16570>
Icecream95 [Thu, 5 May 2022 01:06:28 +0000 (13:06 +1200)]
panfrost: Move patched_s out of the pan_blitter_views struct
The struct is returned from a function, so in debug builds the address
may change after returning, and pointers to patched_s will be broken.
Pass the pointer to the patched stencil view as a parameter to
pan_preload_get_views to avoid this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
Icecream95 [Thu, 5 May 2022 01:04:37 +0000 (13:04 +1200)]
panfrost: Increase the limit for blend shader variants
Qt uses blend constants to set text colour, this will allow more
colours onscreen before thrashing happens.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
Icecream95 [Thu, 5 May 2022 00:57:40 +0000 (12:57 +1200)]
panfrost: Copy blend constant into variant even when reusing it
Otherwise future lookups will match searches for the old constant.
Fixes:
bbff09b9521 ("panfrost: Move the blend shader cache at the device level")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6355
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
Mike Blumenkrantz [Tue, 10 May 2022 16:38:01 +0000 (12:38 -0400)]
zink: use dynamic rendering (most of the time)
this is a simplified version of the renderpass infrastructure which
tracks rendering info on the context and updates it incrementally to
try and reduce cpu overhead
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Wed, 11 May 2022 14:54:33 +0000 (10:54 -0400)]
zink: split out scissor flagging from framebuffer updating
this is kinda similar but not actually the same thing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:28:34 +0000 (12:28 -0400)]
zink: lift some renderpass mechanics up a level in the api
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:25:43 +0000 (12:25 -0400)]
zink: track whether there's any transient attachments bound
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:24:15 +0000 (12:24 -0400)]
zink: break out zs rt attrib analysis into util function
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:24:15 +0000 (12:24 -0400)]
zink: break out color rt attrib analysis into util function
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:22:40 +0000 (12:22 -0400)]
zink: fix indentation
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:22:25 +0000 (12:22 -0400)]
zink: pass rt attrib to zink_render_pass_attachment_get_barrier_info()
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:20:33 +0000 (12:20 -0400)]
zink: remove renderpass state flag for swapchain
this is redundant and can be merged onto the rt attrib
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:18:19 +0000 (12:18 -0400)]
zink: break up swapchain renderpass update to util function
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 16:17:37 +0000 (12:17 -0400)]
zink: break out sample location updating to separate function
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Tue, 10 May 2022 15:42:14 +0000 (11:42 -0400)]
zink: use local variable for getting rt barrier info
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Mon, 9 May 2022 16:24:04 +0000 (12:24 -0400)]
zink: remove fb rebind check during renderpass begin
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Mon, 9 May 2022 16:23:26 +0000 (12:23 -0400)]
zink: use global image rebind counter for dmabuf export
this is a bit less flimsy and handles more than just framebuffer rebinds
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Mon, 9 May 2022 15:32:32 +0000 (11:32 -0400)]
zink: move renderpass handling to zink_render_pass.c
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Mon, 9 May 2022 15:21:55 +0000 (11:21 -0400)]
zink: use zink_batch_no_rp to end renderpasses
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Mon, 9 May 2022 15:20:13 +0000 (11:20 -0400)]
zink: always use zink_batch_rp to init renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Mike Blumenkrantz [Thu, 7 Apr 2022 19:23:58 +0000 (15:23 -0400)]
zink: rename a fb surface variables
no functional changes, just being more consistent
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
Samuel Pitoiset [Tue, 10 May 2022 17:48:32 +0000 (19:48 +0200)]
radv: export implicit primitive ID in NIR for legacy VS or TES
It's implicit for VS or TES, while it's required for GS or MS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16404>
Samuel Pitoiset [Fri, 13 May 2022 15:40:42 +0000 (17:40 +0200)]
radv: determine if shaders use NGG before linking
This would be needed by some NIR pass during linking. Given that NGG
settings are currently dispatched in many places, I don't think this
should hurt but it should be refactored at some point.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16404>
Iago Toral Quiroga [Fri, 20 May 2022 07:44:45 +0000 (09:44 +0200)]
broadcom/compiler: don't promote early fragment tests when writing sample mask
If the sample mask is being written it means we want to discard some of the
samples generated so we should not be promoting the fragment shader to
do early tests, since that would not take into account the sample mask
written from the shader.
Fixes:
dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16626>
Iago Toral Quiroga [Fri, 20 May 2022 06:46:51 +0000 (08:46 +0200)]
v3dv: fix format usage checks when extended usage flag is set
Fixes:
dEQP-VK.image.extended_usage_bit_compatibility.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16625>
Iago Toral Quiroga [Wed, 18 May 2022 11:59:24 +0000 (13:59 +0200)]
v3dv: expose VK_KHR_vulkan_memory_model
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16602>