Commit Graph

140383 Commits

Author SHA1 Message Date
Iago Toral Quiroga 1f7d2b4994 v3dv: implement external semaphore/fence extensions
This provides most of the implementation, but there are some
things we cannot enable until we improve of kernel submit
interface, namely:

We don't expose capacity to export SYNC_FD, although we do
have the implementation in place. This requires that we
improve our kernel interface and event wait implementation
first so we can cover the corner case where the application
submits a command buffer that includes a VkCmdWaitForEvents
and tries to export a SYNC_FD from its signal semaphores or
fence before it the event is signaled and the command buffer
is sent to the kernel for execution in full.

Likewise, we can't currently import semaphores. This is because
our current kernel submit interface can only take one syncobj.
We have been working around this so far by waiting on the last
syncobj produced from the device whenever we had to wait on any
semaphores (which is obviously suboptimal already), but this
won't work as soon as we allow importing external semaphores,
as those could (and would typically) be produced from a
different device.

Once we address the kernel bits, we should come back and enable
SYNC_FD exports as well as semaphore imports.

Relevant CTS tests:
dEQP-VK.api.external.fence.*
dEQP-VK.api.external.semaphore.*
dEQP-VK.synchronization.cross_instance.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11105>
2021-06-02 09:58:47 +00:00
Iago Toral Quiroga cfb4d109a7 v3dv: don't keep an open file descriptor for imported fences/semaphores
We can (and should) close the descriptor immediately after the import.

Gets the following CTS test to pass without requiring to increase limits
for open file descriptors:
dEQP-VK.synchronization.basic.binary_semaphore.chain

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11105>
2021-06-02 09:58:47 +00:00
Mauro Rossi 1f7ab837b8 android: i965: remove brw_ff_gs_emit.c from Makefile.sources
Fixes the following building error:

clang: error: no such file or directory: 'external/mesa/src/mesa/drivers/dri/i965/brw_ff_gs_emit.c'
clang: error: no input files

Fixes: 897bcc1e6b ("i965: drop old brw ff gs code.")
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10718>
2021-06-02 09:28:04 +00:00
Mauro Rossi 076736222e android: intel/compiler: add brw_compile_ff_gs.c to Makefile.sources
Fixes the following building error:

FAILED: out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/i965_dri_intermediates/LINKED/i965_dri.so
...
ld.lld: error: undefined symbol: brw_compile_ff_gs_prog
>>> referenced by brw_ff_gs.c:56 (external/mesa/src/mesa/drivers/dri/i965/brw_ff_gs.c:56)

Fixes: 52e426fd8b ("intel/compiler: add support for compiling fixed function gs")
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10718>
2021-06-02 09:28:04 +00:00
Daniel Stone d58c76035b CI: Fix path confusion in OpenCL Piglit execution
When we remove the contents of the results directory, we `cd` into it.
The script expects that $PWD is /piglit, and $OLDPWD is the Mesa build
directory, however the cd into the results directory will make $OLDPWD
be $BUILDDIR/results.

This means that Piglit emits into results/results/ which looks weird,
but more importantly also fails OpenCL Piglit execution, because we
can't find our baseline result expectations.

Fix it by using an explicit variable rather than relying on history.

Fixes: 683ddf19dc ("ci: remove results directory content only with piglit runners")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10856
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11126>
2021-06-02 09:04:14 +00:00
Daniel Stone fce726451b Revert "CI: Disable rk3399-gru-kevin jobs for now"
We've got 7/10 devices back now, that'll do.

This reverts commit 79a7f33710.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11127>
2021-06-02 08:20:39 +00:00
Matt Turner c460f3806d sparc: Avoid some redefinition warnings
These definitions are provided by m_vector_asm.h now.

Fixes: 67ffb853f0 ("sparc: Reuse m_vector_asm.h.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11119>
2021-06-02 07:56:32 +00:00
Tomeu Vizoso 67af3b6bba ci/lava: Switch LAVA jobs to x86 runners
So we don't need to provision aarch64 servers, which are these days
rarer than x8_64.

In the switch to the new runner tags, switch to one which contains the
device type, so we can dimension the runner jobs taking into account the
number of DUTs available.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11108>
2021-06-02 08:14:51 +02:00
Matt Turner 09935c0dde freedreno/afuc: Print uintptr_t with PRIxPTR
Fixes a compilation error on 32-bit.

Fixes: bba61cef38 ("freedreno/afuc: Add emulator mode to afuc-disasm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11118>
2021-06-02 03:57:20 +00:00
Eric Anholt 148723ce64 ci/android: Update to building for SDK 29 by default.
This will get us build coverage of a bunch of Vulkan features, plus the
ELF TLS support.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10389>
2021-06-02 03:10:49 +00:00
Eric Anholt 0d8e431871 android: Fix ELF TLS support.
Android 29 introduced general-dynamic TLS variable support ("quick
function call to look up the location of the dynamically allocated
storage"), while Mesa on normal Linux has used initial-exec ("use some of
the startup-time fixed slots, hope for the best!").  Both would be better
options than falling all the way back to pthread_getspecific(), which is
the alternative we have pre-29.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10389>
2021-06-02 03:10:49 +00:00
Emma Anholt 75a9cb1033 util: Add a helper macro for defining initial-exec variables.
I'm going to add another case for Android shortly, and then we can keep
the logic all in one spot.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10389>
2021-06-02 03:10:49 +00:00
Mike Blumenkrantz 4a68b16a52 aux/draw: if pipe_draw_info::index_bias_varies is not set, ignore index_bias for N>1
this enables some optimizations in lavapipe

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10995>
2021-06-02 01:56:58 +00:00
Mike Blumenkrantz 2ee0912273 aux/trace: dump resource for samplerview and surface
this is the most important member

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10974>
2021-06-02 00:11:28 +00:00
Alyssa Rosenzweig d058ce7e88 docs/gallium: Document the index buffer format convention
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig a86deb1e72 si: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig 0790bc41ed lima: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig 3058545d94 freedreno: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig b92a6edf82 etnaviv: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig 1560f24da5 v3d: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Alyssa Rosenzweig a0b74bad62 vc4: Use Rn_UINT instead of In_UINT for index buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10990>
2021-06-01 23:40:47 +00:00
Mike Blumenkrantz 24b03aeecc zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
2021-06-01 23:29:19 +00:00
Mike Blumenkrantz e3192367ac zink: optimize buffer rebinds
by using the bind counts, the common cases of rebinds can be immediately
handled without unnecessary iteration, and following this each rebind can
be evaluated to ensure that every necessary descriptor was rebound in order
to catch any remaining corner cases that may not be handled in the optimized
rebind path

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
2021-06-01 23:29:19 +00:00
Mike Blumenkrantz 3108344403 zink: unify more resource bind count tracking code
we want to avoid updating these values when possible in order to reduce
overhead, which means that if a descriptor is being replaced, it should
be updated only if the replacement is not the same resource

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
2021-06-01 23:29:19 +00:00
Mike Blumenkrantz 91d2fc191f zink: unify code for updating res->bind_count values
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
2021-06-01 23:29:19 +00:00
Mike Blumenkrantz bfdd1d8d89 zink: add a second descriptor manager
this is the "lazy" descriptor manager, which aims to perform the least
amount of work calculating updates while ignoring the overhead that an
update may incur: effectively the inverse of the caching manager

in this initial implementation, divergence exists between the descriptor
layouts of the cached manager and the lazy manager in order to avoid
incurring regressions in the existing descriptor architecture; this will
be reconciled in a followup MR that refactors and unifies descriptor layouts

during this interim period and until such reconciliation occurs,
the default descriptor manager is now the lazy manager for testing purposes as
there are no changes here which can affect the existing infrastructure

the caching descriptor manager can be selected with the ZINK_CACHE_DESCRIPTORS
env var and will be automatically used for vulkan drivers which don't support
the features required for lazy mode (templates)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
2021-06-01 23:29:19 +00:00
Alyssa Rosenzweig 80bf7bdcef panfrost/ci: Report flakes on IRC
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11022>
2021-06-01 22:26:21 +00:00
Emma Anholt 9283875f93 ci: Move the flakes channels to OFTC
Following the rest of our channels, move CI reporting over.  Seems to
still work fine.  This affects freedreno and iris.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11020>
2021-06-01 20:31:00 +00:00
Emma Anholt e414718aef ci: Add known-flake handling for the IRC flake reports
Now, flakes that aren't in the *-flakes.txt get a "NEW" in their report so
I can watch for them.

The bash was unwieldy and made debugging hard, so I switched to python.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11020>
2021-06-01 20:31:00 +00:00
Mike Blumenkrantz 5515d3aec5 anv: fix availability for copying timestamp query results
idx here is the index of the value being written, so if it isn't used/incremented
when the query result is written, the availability result will clobber it and
be written to the same buffer offset

Cc: mesa-stable@lists.freedesktop.org

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11116>
2021-06-01 19:52:24 +00:00
Alyssa Rosenzweig 478ae974a1 panfrost: Eliminate reserve_* functions
We always want to reserve _something_, so reserve what we need at batch
creation time and stop trying to re-reserve in a zillion places after.
This has a neglible (<128 bytes per batch) increase in memory usage for
compute-only workloads, but given the amount of simplication, that's a
fair tradeoff.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig ae93796cc0 panfrost: Elucidate thread group split field
Last unknown field in the XML :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 71f069bd7a panfrost: Bubble up errors
Instead of punting to PAN_MESA_DEBUG=msgs, which we can now remove.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig ff3e54b432 panfrost: Minor changes to draw_vbo
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 8b305ce32a panfrost: Write translate_index_size better
Encodings line up with Gallium except for uint32.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 8f13eb812d panfrost: Dirty track stack sizes
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig e95abff4de panfrost: Don't allocate empty varying buffer
If the FS doesn't actually read any varyings, there's no point.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig c34b760b9f panfrost: Dirty track constant buffers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 6e61c54d30 panfrost: Analyze sysval dirty flags
We want dirty tracking for constant buffer uploads, but which dirty
flags are needed depend on what the sysvals are. So for each sysval,
record a corresponding dirty flag at compile time, so at draw-time the
check is easy.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 8e9c043d5e panfrost: Add draw parameters dirty flags
Needed to track some new sysvals.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 344db85bd5 panfrost: Shrink pan_draw_mode return type
Let gcc emit ldrb instead of ldr for the table. Found by perf, but total
waste of time >_>

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Alyssa Rosenzweig 3a443daed0 panfrost: Update comment
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
2021-06-01 19:10:28 +00:00
Juan A. Suarez Romero 1341e2a547 ci/v3dv: update expected results
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11103>
2021-06-01 18:21:21 +00:00
Antonio Caggiano bb1cd03fcc panfrost: Fix pan_pool_ref construction
Fix designator order for `pan_pool_ref` fields by matching declaration
order and avoid an error by the C++ compiler.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11064>
2021-06-01 17:34:59 +00:00
Chia-I Wu 978d465986 docs: add basic documentation for venus
It probably lacks some details but is a start at least.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10988>
2021-06-01 09:02:07 -07:00
Tapani Pälli 2114f9e51d gitlab-ci: enable building of Vulkan tests in Piglit
This is part of tackling a Piglit issue:
https://gitlab.freedesktop.org/mesa/piglit/-/issues/53

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10971>
2021-06-01 13:51:36 +00:00
Icecream95 956d961339 panfrost: Use first_tiler to check if tiling is needed
If there is a preload job needing tiling, but no other jobs, then
first_tiler will be set but not tiler_dep.

Fixes faults when two depth-only (stencil is reloaded) clears are done
in a row.

panfrost ffa30000.gpu: Unhandled Page fault in AS1 at VA 0x0000000044870000
               Reason: TODO
               raw fault status: 0x49002C1
               decoded fault status: SLAVE FAULT
               exception type 0xC1: TRANSLATION_FAULT_LEVEL1
               access type 0x2: READ
               source id 0x490
panfrost ffa30000.gpu: gpu sched timeout, js=0, config=0x3301, status=0x8, head=0x608a300, tail=0x608a300, sched_job=f5b0862d

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11104>
2021-06-01 13:27:54 +00:00
Icecream95 08a6608467 panfrost: Call abort() when aborting on fault
The existing exit(EIO) wasn't getting trapped by debuggers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11104>
2021-06-01 13:27:54 +00:00
Icecream95 5109f4e507 pan/decode: Flush the dump stream after decoding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11104>
2021-06-01 13:27:54 +00:00
Gustavo Padovan 08dba3a76b gitlab-ci: add python script to submit lava jobs
Covert the job submission process to a python script for more
robustness and control. allowing easier manipulation of job data.

As a result, it adds retry logic to deal with Infrastructure Errors in LAVA.

_call_proxy() is equipped with a robust retry logic, which I have been
using already in the past few weeks in stress testing to run hundreds
of jobs.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11079>
2021-06-01 09:31:46 -03:00