Guilherme Gallo
ee2278de65
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 >
2022-05-23 16:51:47 +00:00
Guilherme Gallo
e00281f6da
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 >
2022-05-23 16:51:47 +00:00
Yonggang Luo
cc10c53333
nir: Fixes MSVC compiling error about unused variable _
...
Fixes: 836470d433
("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 >
2022-05-23 14:45:48 +00:00
Jason Ekstrand
836ff4b586
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 >
2022-05-23 14:10:54 +00:00
Erik Faye-Lund
849ebe3057
d3d12: add missing cmath includes
...
If we want to use the std:: version of the math functions, we need to
include <cmath>.
Fixes: b171a6baa2
("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 >
2022-05-23 14:02:28 +00:00
Rhys Perry
4513cb8d41
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 >
2022-05-23 11:52:54 +00:00
Rhys Perry
69d1f4186a
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 >
2022-05-23 11:52:54 +00:00
Rhys Perry
bd8f8dda8c
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: 0af7ff49fd
("aco: lower p_constaddr into separate instructions earlier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16460 >
2022-05-23 11:52:54 +00:00
Samuel Pitoiset
da49fee80f
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 >
2022-05-23 10:33:08 +00:00
Erico Nunes
106dc60fc0
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 >
2022-05-23 09:07:03 +00:00
Erico Nunes
c3f13ee551
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 >
2022-05-23 09:07:03 +00:00
Erico Nunes
5718629a70
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 >
2022-05-23 09:00:45 +00:00
Jan Palus
9fb97c75f2
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 >
2022-05-23 08:52:56 +00:00
Boris Brezillon
47c6f7ccf3
dzn: Use the correct ICD path on Win32
...
Similar to commit c6cddd2e17
("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 >
2022-05-23 08:45:24 +00:00
Boris Brezillon
c79451e23c
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: 87d7431198
("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 >
2022-05-23 08:17:02 +00:00
Boris Brezillon
1eaba553e2
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: a012b21964
("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 >
2022-05-23 08:09:15 +00:00
Samuel Pitoiset
23be0aad9c
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
fc3717df0c
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
7fb4849314
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
6c44e25078
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
a1d3b80c5d
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
f75b80fd80
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 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
3825c7202b
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 >
2022-05-23 07:32:56 +00:00
Corentin Noël
583a4210e5
virgl/ci: Update virglrenderer
...
Update virglrenderer to the latest version on time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16627 >
2022-05-23 06:16:07 +00:00
Alyssa Rosenzweig
d12b97122e
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 >
2022-05-22 18:22:41 -04:00
Alyssa Rosenzweig
1b7304f44b
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 >
2022-05-22 17:58:07 -04:00
Alyssa Rosenzweig
d814711155
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
1d0d27aac7
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
ac09dcd358
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
689be69681
asahi: Fix pipeline decoding
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
8a1ee708a4
asahi: Improve render target dumping
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
6eb62c5f50
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
d8227f09d0
asahi: Drop some unknowns
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
03a3a7843e
asahi: Identify suballocated size
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
14d966734f
asahi: Identify suballocation mechanism
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
ca9b1d48fe
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
0c120cf141
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
a5e774ef9e
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
8da2fdc889
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
1e42e4a390
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
343f4f886f
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
6b12292754
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 >
2022-05-22 17:11:08 -04:00
Alyssa Rosenzweig
db32b4a064
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 >
2022-05-22 17:10:57 -04:00
Alyssa Rosenzweig
6e59474ced
asahi: Identify partial render pipeline
...
Needed if a partial render is incurred from overflowing the parameter
buffer (too much geometry).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
65500b19df
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 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
666f307d41
asahi: Add a depth bias structure
...
This is simple and corresponds directly to the Metal inputs. However,
the alignment is a bit tricky, so let's add formal XML for it.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
cb760a00c2
asahi: Identify depth bias enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
7a0c220401
asahi: Identify "set depth bias index" field
...
Grouped together with the "set scissor index" field, which is natural.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
ff84c07b21
asahi: Identify depth bias array
...
"Inspired" by PowerVR code, by comparison.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00
Alyssa Rosenzweig
a39fb009d2
asahi: Note unknown field
...
...used internally with visibility tests, together with a weird
vertex/compute-like shader used to zero the visibility buffer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512 >
2022-05-22 17:09:04 -04:00