platform/upstream/mesa.git
3 years agozink: support nir_intrinsic_shader_clock
Mike Blumenkrantz [Mon, 5 Apr 2021 13:54:31 +0000 (09:54 -0400)]
zink: support nir_intrinsic_shader_clock

simple const unop

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: add spirv builder for unops with a const operand
Mike Blumenkrantz [Mon, 5 Apr 2021 13:54:05 +0000 (09:54 -0400)]
zink: add spirv builder for unops with a const operand

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: add conversion util for nir_scope -> SpvScope
Mike Blumenkrantz [Mon, 5 Apr 2021 13:53:44 +0000 (09:53 -0400)]
zink: add conversion util for nir_scope -> SpvScope

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: hook up VK_KHR_shader_clock
Mike Blumenkrantz [Mon, 5 Apr 2021 13:53:29 +0000 (09:53 -0400)]
zink: hook up VK_KHR_shader_clock

more extensions wooo

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agoci: Uprev piglit to b3a9fa345 ("framework/replay: Quote resource names before signing")
Ian Romanick [Tue, 27 Apr 2021 19:27:31 +0000 (12:27 -0700)]
ci: Uprev piglit to b3a9fa345 ("framework/replay: Quote resource names before signing")

The PIGLIT_BUILD_CL_TESTS related changes were shamelessly stolen from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6441/diffs?commit_id=5742be00e6b493b5289ed8120eb06f10d341ea3a.

v2: Remove glslang-tools from arm_build.sh.  Suggested by Michel.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10492>

3 years agovenus: enable external memory support
Chia-I Wu [Wed, 21 Apr 2021 20:14:21 +0000 (13:14 -0700)]
venus: enable external memory support

This enables VK_KHR_external_memory_fd and
VK_EXT_external_memory_dma_buf support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: rework external memory capability queries
Chia-I Wu [Wed, 21 Apr 2021 19:43:33 +0000 (12:43 -0700)]
venus: rework external memory capability queries

The idea is to allow the renderer to use a completely different external
memory handle type (e.g., OPAQUE_WIN32!?) than the driver (always
OPAQUE_FD and DMA_BUF).  It hides the mismatch by doing translations in
vkGetPhysicalDevice*.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: update venus-protocol for external memory
Chia-I Wu [Wed, 21 Apr 2021 00:27:46 +0000 (17:27 -0700)]
venus: update venus-protocol for external memory

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: make sure gem_handle and vn_renderer_bo are 1:1
Chia-I Wu [Fri, 23 Apr 2021 07:12:27 +0000 (00:12 -0700)]
venus: make sure gem_handle and vn_renderer_bo are 1:1

When two vn_renderer_bo's share the same gem_handle, destroying one of
them would invalidate the other.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: use sparse array to manage vn_renderer_bo
Chia-I Wu [Fri, 23 Apr 2021 04:07:27 +0000 (21:07 -0700)]
venus: use sparse array to manage vn_renderer_bo

It should be faster.  More importantly, we want to use it to keep track
of all BOs for correct dmabuf import.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: move some common members to vn_renderer_bo
Chia-I Wu [Fri, 23 Apr 2021 03:59:36 +0000 (20:59 -0700)]
venus: move some common members to vn_renderer_bo

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: merge bo create and init ops
Chia-I Wu [Fri, 23 Apr 2021 17:36:55 +0000 (10:36 -0700)]
venus: merge bo create and init ops

There is no good reason to seprate them.  I also plan to adopt
util_sparse_array, which requires the kernel BO to be created first (to
use its gem_handle/res_id as the key).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: move vn_renderer_bo_ops to vn_renderer
Chia-I Wu [Thu, 22 Apr 2021 22:30:38 +0000 (15:30 -0700)]
venus: move vn_renderer_bo_ops to vn_renderer

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: pass vn_renderer in vn_renderer_bo functions
Chia-I Wu [Thu, 22 Apr 2021 16:40:10 +0000 (09:40 -0700)]
venus: pass vn_renderer in vn_renderer_bo functions

We will move vn_renderer_bo_ops to vn_renderer in the following commit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: add dev->renderer pointer
Chia-I Wu [Fri, 23 Apr 2021 17:15:53 +0000 (10:15 -0700)]
venus: add dev->renderer pointer

dev->instance->renderer is slower to type and to follow.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: use vn_renderer_shmem
Chia-I Wu [Thu, 22 Apr 2021 20:33:59 +0000 (13:33 -0700)]
venus: use vn_renderer_shmem

vn_renderer_bo_create_cpu becomes unused and is removed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: add vn_renderer_shmem
Chia-I Wu [Thu, 22 Apr 2021 20:33:55 +0000 (13:33 -0700)]
venus: add vn_renderer_shmem

CPU BOs and GPU BOs are used different enough that it makes sense to
treat them as different objects.  This commit adds vn_renderer_shmem to
represent CPU BOs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: rename VN_CS_ENCODER_INITIALIZER
Chia-I Wu [Fri, 23 Apr 2021 06:21:31 +0000 (23:21 -0700)]
venus: rename VN_CS_ENCODER_INITIALIZER

Rename it to VN_CS_ENCODER_INITIALIZER_LOCAL to make it clear that it is
only for local variables.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: update venus-protocol headers to use accessors
Chia-I Wu [Thu, 22 Apr 2021 18:21:24 +0000 (11:21 -0700)]
venus: update venus-protocol headers to use accessors

Switch to the newly added vn_instance_submit_command accessors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: provide accessors for vn_instance_submit_command
Chia-I Wu [Thu, 22 Apr 2021 17:55:59 +0000 (10:55 -0700)]
venus: provide accessors for vn_instance_submit_command

This will allow us to change vn_instance_submit_command without
regenerating the headers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agodocs: update calendar for 21.1.0-rc3
Dylan Baker [Wed, 28 Apr 2021 16:34:33 +0000 (09:34 -0700)]
docs: update calendar for 21.1.0-rc3

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503>

3 years agodocs: update calendar for 21.1.0-rc2
Dylan Baker [Wed, 28 Apr 2021 16:34:32 +0000 (09:34 -0700)]
docs: update calendar for 21.1.0-rc2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503>

3 years agodocs: update calendar for 21.1.0-rc1
Dylan Baker [Wed, 28 Apr 2021 16:34:30 +0000 (09:34 -0700)]
docs: update calendar for 21.1.0-rc1

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503>

3 years agofreedreno/ci: Skip texsubmimage cube_map_array
Rob Clark [Wed, 28 Apr 2021 15:37:59 +0000 (08:37 -0700)]
freedreno/ci: Skip texsubmimage cube_map_array

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/ci: Disable counterstrike trace on a306 for now
Rob Clark [Wed, 28 Apr 2021 14:19:13 +0000 (07:19 -0700)]
freedreno/ci: Disable counterstrike trace on a306 for now

The combination of removing bottlenecks in userspace (userspace fences,
etc) and slow GPU results in hitting full ringbuffer on a306.  Haven't
figured out a reasonable way to work around that in userspace until a
kernel fix is in place, so disable this one for now.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Assume explicit fences if in_fence_fd
Rob Clark [Tue, 20 Apr 2021 15:57:54 +0000 (08:57 -0700)]
freedreno/drm: Assume explicit fences if in_fence_fd

If we ever see explicit fencing used, then we can disable implicit
fencing, even for internal or unfenced batches.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Async submit support
Rob Clark [Mon, 19 Apr 2021 22:20:15 +0000 (15:20 -0700)]
freedreno/drm: Async submit support

Move the submit ioctl to it's own thread to unblock the driver thread
and let it move on to the next frame.

Note that I did experiment with doing the append_bo() parts
synchronously on the theory that we should be more likely to hit the
fast path if we did that part of submit merging before the bo was
potentially re-used in the next batch/submit.  It helped some things
by a couple percent, but hurt more things.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: pipe should hold reference to device
Rob Clark [Thu, 22 Apr 2021 23:17:17 +0000 (16:17 -0700)]
freedreno/drm: pipe should hold reference to device

A more direct solution would be for bo's to have a reference to the
device.  But bo's are ref/unrefd more frequently.

This avoids async submits unrefing a bo after the device handle-
table is freed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: fd_submit should hold ref to fd_pipe
Rob Clark [Thu, 22 Apr 2021 15:02:49 +0000 (08:02 -0700)]
freedreno/drm: fd_submit should hold ref to fd_pipe

Also, move this into the base class, no reason for it to be in backend.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Avoid flushing deferred submits for u_trace
Rob Clark [Sat, 17 Apr 2021 19:56:58 +0000 (12:56 -0700)]
freedreno: Avoid flushing deferred submits for u_trace

This is a bit ugly, but with userspace fences and deferred submits it is
better to poll until the timestamp buffer is ready.  Otherwise we could
be triggering deferred submits to flush sooner than they normally would,
changing the behavior of what we are trying to measure.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm/sp: Implement deferred submit merging
Rob Clark [Sat, 17 Apr 2021 19:51:02 +0000 (12:51 -0700)]
freedreno/drm/sp: Implement deferred submit merging

For submits flushed with (a) no required fence, and (b) no externally
visible effects (ie. imported/exported bo), we can defer flushing the
submit and merge it into a later submit.

This is a bit more work in userspace, but it cuts down the number of
submit ioctls.  And a common case is that later submits overlap in the
bo's used (for example, blit upload to a buffer, which is then used in
the following draw pass), so it reduces the net amount of work needed
to be done in the kernel to handle the submit ioctl.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/19
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm/sp: Split submit prep and finish
Rob Clark [Sat, 17 Apr 2021 19:09:42 +0000 (12:09 -0700)]
freedreno/drm/sp: Split submit prep and finish

For deferred submits, we still need to do the prep steps immediately,
but the ioctl construction can be deferred.. prepare for that by
splitting the prep out.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Add pipe tracking for deferred submits
Rob Clark [Sat, 17 Apr 2021 18:37:06 +0000 (11:37 -0700)]
freedreno/drm: Add pipe tracking for deferred submits

Now that we have some bo state tracking for userspace fences, we can
build on this to add a way for the pipe implementation to defer a submit
flush in order to merge submits into a single ioctl.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Re-work fd_submit fence interface
Rob Clark [Mon, 19 Apr 2021 20:03:21 +0000 (13:03 -0700)]
freedreno: Re-work fd_submit fence interface

Move everything into a struct assocated with the pipe_fence_handle, so
that the drm layer can fill in the seqn/fd fences directly.

This will give us a comvenient place to insert a util_queue_fence in the
next commit.

While we're at it, extract the uint32_t fence (previously called
'timestamp' in place, a kgsl legacy) into a struct that encapsulates
both the kernel fence and the userspace fence.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Reference count submits
Rob Clark [Sat, 17 Apr 2021 18:23:27 +0000 (11:23 -0700)]
freedreno/drm: Reference count submits

To merge submits, we'll need drm to internally hold an extra reference
to the submit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Drop unused create_fence() arg
Rob Clark [Wed, 21 Apr 2021 20:45:57 +0000 (13:45 -0700)]
freedreno: Drop unused create_fence() arg

It was always zero.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Move fence struct to header
Rob Clark [Mon, 19 Apr 2021 18:43:02 +0000 (11:43 -0700)]
freedreno: Move fence struct to header

Just a bit of code-motion to prep for later patches.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: last_fence optimization for TC async flushes
Rob Clark [Sun, 18 Apr 2021 22:29:32 +0000 (15:29 -0700)]
freedreno: last_fence optimization for TC async flushes

Without deferred flushes, we would track the last_fence any time when
there had be no rendering/etc since the last flush, to avoid creating
empty batches simply for the purpose of getting a fence.  We can do the
same thing with deferred flushes, where the fence is created from the
frontend thread before we know what will be flushed, by repopulating
the pre-created fence.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/batch: Don't create fences for every batch
Rob Clark [Sat, 17 Apr 2021 18:15:50 +0000 (11:15 -0700)]
freedreno/batch: Don't create fences for every batch

We only need fences for batches flushed via pctx->flush().  This will
serve as a useful signal about submits that can be merged.

v2. disable this optimization pre-a6xx until I can debug issues that
    submit merging exposes

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Inline the fence-table
Rob Clark [Mon, 26 Apr 2021 20:39:04 +0000 (13:39 -0700)]
freedreno/drm: Inline the fence-table

In the common case, a bo will have no more than a single fence attached.
We can inline the storage to avoid a separate allocation in this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Userspace fences
Rob Clark [Wed, 21 Apr 2021 16:37:05 +0000 (09:37 -0700)]
freedreno/drm: Userspace fences

Add a per-fd_pipe fence "timeline" so we can detect cases where we don't
need to call into the kernel to determine if a fd_bo is still busy.

This reuses table_lock, rather than introducing a per-bo lock to protect
fence state updates because (a) the common / hotpath pattern is to
update fences on a lot of objects, but checking the fence state of a
single object is less common, and (b) because we already hold the table
lock in common spots where we need to check the bo's fence state (ie.
allocations from the bo-cache).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Add locked version fd_{bo,pipe}_del()
Rob Clark [Thu, 22 Apr 2021 20:30:35 +0000 (13:30 -0700)]
freedreno/drm: Add locked version fd_{bo,pipe}_del()

This will be needed in the next patch, so we can reuse the bo table_lock
for fence related locking.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Move the growable array helper
Rob Clark [Thu, 22 Apr 2021 18:25:11 +0000 (11:25 -0700)]
freedreno/drm: Move the growable array helper

We'll need this to track userspace fences attached to a fd_bo.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Add FD_BO_PREP_FLUSH
Rob Clark [Thu, 22 Apr 2021 22:17:37 +0000 (15:17 -0700)]
freedreno/drm: Add FD_BO_PREP_FLUSH

There are a couple cases where we want to use _NOSYNC, but at the same
time we want to ensure that rendering related to a bo is actually
flushed.

This doesn't do anything yet, but when we start deferring/merging
submits we'll need a way to trigger anything deferred to flush.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Cleanup bo cpu_prep flags
Rob Clark [Thu, 22 Apr 2021 22:11:46 +0000 (15:11 -0700)]
freedreno/drm: Cleanup bo cpu_prep flags

Also add some STATIC_ASSERT()

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Cleanup bo allocation flags
Rob Clark [Thu, 22 Apr 2021 18:09:56 +0000 (11:09 -0700)]
freedreno/drm: Cleanup bo allocation flags

Most of them were actually unused.  The memory type (KMEM vs SMI) only
applied to very old a2xx era devices that had a small/fast stacked
memory (SMI) vs normal memory (KMEM).  And the cache flags are ignored
(ie. everything is writecombine), but we can add new cache flags later
when they actually do something.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno/drm: Move submit->primary to base class
Rob Clark [Wed, 21 Apr 2021 16:22:14 +0000 (09:22 -0700)]
freedreno/drm: Move submit->primary to base class

Gets rid of a bit of duplication between the two current
implementations, and will be needed in next patch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Allow resource shadowing for TC
Rob Clark [Mon, 19 Apr 2021 18:07:15 +0000 (11:07 -0700)]
freedreno: Allow resource shadowing for TC

TC_TRANSFER_MAP_NO_INVALIDATE just means we can't invalidate.  It
doesn't preclude the resource shadow path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Add a couple debug traces
Rob Clark [Mon, 19 Apr 2021 18:05:57 +0000 (11:05 -0700)]
freedreno: Add a couple debug traces

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Make sure we actually flush if we need a fence
Rob Clark [Thu, 22 Apr 2021 02:28:31 +0000 (19:28 -0700)]
freedreno: Make sure we actually flush if we need a fence

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Avoid staging blits with stencil on older gens
Rob Clark [Fri, 23 Apr 2021 23:47:47 +0000 (16:47 -0700)]
freedreno: Avoid staging blits with stencil on older gens

This avoids infinite recursion with fallback to
util_resource_copy_region()

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agofreedreno: Small indent fix
Rob Clark [Sat, 24 Apr 2021 20:11:48 +0000 (13:11 -0700)]
freedreno: Small indent fix

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>

3 years agoci/broadcom: update expected results
Juan A. Suarez Romero [Wed, 28 Apr 2021 14:19:33 +0000 (16:19 +0200)]
ci/broadcom: 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/10501>

3 years agodocs: mark external memory and semaphore extensions done for i965
Rohan Garg [Mon, 22 Jun 2020 15:24:36 +0000 (17:24 +0200)]
docs: mark external memory and semaphore extensions done for i965

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: Enable EXT_memory_object_* for Gen 7 and above
Rohan Garg [Tue, 26 Jan 2021 15:58:59 +0000 (16:58 +0100)]
i965: Enable EXT_memory_object_* for Gen 7 and above

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: fix in fences backend for ext_external_objects edge case
Rohan Garg [Sun, 18 Apr 2021 21:17:44 +0000 (23:17 +0200)]
i965: fix in fences backend for ext_external_objects edge case

This ports adc575dbf667f3f60ed1790bb4b6e4c21c1385db to i965

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: Implement BufferDataMem
Rohan Garg [Tue, 28 Jul 2020 16:43:57 +0000 (18:43 +0200)]
i965: Implement BufferDataMem

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: Implement semaphore support for EXT_external_objects
Rohan Garg [Tue, 9 Jun 2020 17:13:19 +0000 (19:13 +0200)]
i965: Implement semaphore support for EXT_external_objects

Implement importing, signalling and waiting for EXT_external_objects

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: Initial implementation for EXT_memory_object_*
Rohan Garg [Mon, 8 Jun 2020 20:34:26 +0000 (22:34 +0200)]
i965: Initial implementation for EXT_memory_object_*

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agoi965: plumb device/driver UUID generators
Rohan Garg [Mon, 8 Jun 2020 09:57:12 +0000 (11:57 +0200)]
i965: plumb device/driver UUID generators

Use the same generators as used in anv driver so both Vulkan and OpenGL
drivers can share the same external memory objects.

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>

3 years agozink: remove leftover references to flatshading in shader keys
Mike Blumenkrantz [Wed, 28 Apr 2021 00:40:36 +0000 (20:40 -0400)]
zink: remove leftover references to flatshading in shader keys

this is handled by st already

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10495>

3 years agou_format: Add missing BE swizzles for R8SG8SB8UX8U_NORM
Eric Anholt [Tue, 27 Apr 2021 20:14:57 +0000 (13:14 -0700)]
u_format: Add missing BE swizzles for R8SG8SB8UX8U_NORM

Compare to the swizzles for PIPE_FORMAT_R10G10B10A2_UNORM and
R5SG5SB6U_NORM.  This should fix our last BE pack/unpack failure.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7776>

3 years agou_format: Fix z32_s8x24 s8 unpacking on big-endian.
Eric Anholt [Tue, 27 Apr 2021 20:10:41 +0000 (13:10 -0700)]
u_format: Fix z32_s8x24 s8 unpacking on big-endian.

The s8x24 is a packed group in the format, and for packing we properly
write our s8 in the low bits of the 32, but for unpacking we tried
treating it as a byte array.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7776>

3 years agoutil/format: fix value declarations for big endian
Karol Herbst [Wed, 25 Nov 2020 17:52:30 +0000 (18:52 +0100)]
util/format: fix value declarations for big endian

Before we can fix big endian, we kind of have to agree on how pixel data
should be laid out in memory.

For this we have to use packed data for !is_array declared formats and per
element values for is_array ones.

Also we need proper PACKED_1xn definitions for BE.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7776>

3 years agoglx: revert "Downgrade sRGB-ful fbconfigs"
Tapani Pälli [Wed, 28 Apr 2021 05:42:35 +0000 (08:42 +0300)]
glx: revert "Downgrade sRGB-ful fbconfigs"

This reverts f0861c80 which causes regression on multiple apps that
require a sRGB capable visual.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4690
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10498>

3 years agov3dv: move extensions table to v3dv_device
Alejandro Piñeiro [Tue, 27 Apr 2021 12:01:48 +0000 (14:01 +0200)]
v3dv: move extensions table to v3dv_device

So one less python generator. Based on anv (MR#8792) and radv
(MR#8900).

With this change v3dv doesn't have any more a custom python code
generator.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10484>

3 years agov3dv: remove custom icd json generation
Alejandro Piñeiro [Tue, 27 Apr 2021 11:09:46 +0000 (13:09 +0200)]
v3dv: remove custom icd json generation

Most of the stuff needed was moved to vk util. So one less python
generator to maintain.

anv and radv already migrated.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10484>

3 years agotu: do not corrupt unwritten render targets
Danylo Piliaiev [Tue, 27 Apr 2021 17:12:28 +0000 (20:12 +0300)]
tu: do not corrupt unwritten render targets

There is no point in having a write to an attachment enabled when there
is no corresponding output in the shader. Per VK spec it is an UB,
however a few apps depend on attachment not being changed if FS doesn't
have corresponding output.

Fixes water in Genshin Impact.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10489>

3 years agodocs: document r600 envvars
Erik Faye-Lund [Mon, 26 Apr 2021 11:52:59 +0000 (13:52 +0200)]
docs: document r600 envvars

We document other AMD GPU envvars, so let's add docs for the r600
envvars as well.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2022
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10453>

3 years agodocs: fixup indentation of radeonsi envvar values
Erik Faye-Lund [Mon, 26 Apr 2021 11:42:44 +0000 (13:42 +0200)]
docs: fixup indentation of radeonsi envvar values

Otherwise, these will end up in the same definition-list, which isn't
very clear, and different to what we do elsewhere in this file.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10453>

3 years agoradv: enable TC-compat CMASK on GFX8-9
Samuel Pitoiset [Tue, 27 Apr 2021 12:19:54 +0000 (14:19 +0200)]
radv: enable TC-compat CMASK on GFX8-9

It's already implemented and it works quite fine on GFX10+, so it
should be safe to enable it on GFX8-9.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10488>

3 years agoci/baremetal: propagate ASAN_OPTIONS to devices
Juan A. Suarez Romero [Tue, 27 Apr 2021 11:13:19 +0000 (13:13 +0200)]
ci/baremetal: propagate ASAN_OPTIONS to devices

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10479>

3 years agoci/v3dv: update flakes
Juan A. Suarez Romero [Tue, 27 Apr 2021 11:12:27 +0000 (13:12 +0200)]
ci/v3dv: update flakes

Add
dEQP-VK.synchronization.op.single_queue.binary_semaphore.write_copy_buffer_read_ssbo_compute.buffer_16384
to the flake list.

v2:
 - Add a new flake (jasuarez)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10479>

3 years agoci/v3d: fix typo in job name
Juan A. Suarez Romero [Tue, 27 Apr 2021 10:04:41 +0000 (12:04 +0200)]
ci/v3d: fix typo in job name

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10479>

3 years agoi965/bufmgr: fix invalid assertion
Lionel Landwerlin [Wed, 21 Apr 2021 19:46:52 +0000 (22:46 +0300)]
i965/bufmgr: fix invalid assertion

The idea behind this assert is that if a buffer is in
bufmgr->handle_table it's because it has been shared from i965 to the
outside. This is when we add the drm FD associated to this BO to
bo->exports.

But we also import buffer from the outside into i965 and those buffers
don't have an associated drm FD added to bo->exports.

If you import the same buffer more than once, you'll run into this
assert.

v2: Also drop assert from brw_bo_gem_create_from_name() (Ian)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 57e4d0aa1c16d3 ("i965: fix export of GEM handles")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10386>

3 years agolavapipe: mark event_storage as volatile
Dave Airlie [Tue, 27 Apr 2021 23:03:34 +0000 (09:03 +1000)]
lavapipe: mark event_storage as volatile

This is spun on in cmd execution so make sure it doesn't get
optimised or cached out.

Fixes some timeouts in dEQP-VK.api.command_buffers.record_simul_use_primary

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10494>

3 years agomicrosoft/compiler: Handle unbounded arrays
Jesse Natalie [Sat, 17 Apr 2021 03:55:45 +0000 (20:55 -0700)]
microsoft/compiler: Handle unbounded arrays

Note that it's no longer sufficient to check for >=1 sampler/image
in a potential array, because unbounded arrays have 0 of them.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10298>

3 years agomicrosoft/compiler: Map descriptor set -> binding space
Jesse Natalie [Sat, 17 Apr 2021 03:09:34 +0000 (20:09 -0700)]
microsoft/compiler: Map descriptor set -> binding space

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10298>

3 years agomicrosoft/compiler: Fix function signature for bufferStore to support overloads
Jesse Natalie [Sat, 17 Apr 2021 03:00:45 +0000 (20:00 -0700)]
microsoft/compiler: Fix function signature for bufferStore to support overloads

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10298>

3 years agomicrosoft/compiler: Rewrite sampler splitting pass to be smarter and handle derefs
Jesse Natalie [Fri, 16 Apr 2021 18:41:01 +0000 (11:41 -0700)]
microsoft/compiler: Rewrite sampler splitting pass to be smarter and handle derefs

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10298>

3 years agod3d12, microsoft/compiler: Use SRV/sampler variable binding data
Jesse Natalie [Fri, 16 Apr 2021 18:40:35 +0000 (11:40 -0700)]
d3d12, microsoft/compiler: Use SRV/sampler variable binding data

For GL, we've previously mostly ignored the binding property for sampler variables
during the shader compilation step. For CL, our image bindings were always 0-based as well.

Now, for Vulkan, we are going to be getting explicit bindings and need to emit DXIL that
respects those bindings. Since Vulkan can also have both split and combined images and samplers,
we now need to be smarter about recognizing when NIR is trying to use a "sampler" as *both* an
image and sampler (in deref mode, the same variable will be deref'd as both image and sampler).

That "being smarter" bit comes next, but first, let's prep GL for building correct root
signatures and binding the resources correctly.

Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10298>

3 years agoci: Add timeout for traces jobs
Rob Clark [Sat, 24 Apr 2021 15:37:13 +0000 (08:37 -0700)]
ci: Add timeout for traces jobs

Otherwise it is next to impossible to figure out *which* trace is
hanging (because you don't get artifact upload if the CI job hits the
overall 60min timeout).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10490>

3 years agoci: Update kernel with a few freedreno related fixes
Rob Clark [Tue, 27 Apr 2021 16:51:02 +0000 (09:51 -0700)]
ci: Update kernel with a few freedreno related fixes

40abe2528d16 HACK: iommu/arm-smmu/qcom: Set SCTLR.HUPCF for everything
7c165f82b28b drm/msm: Fix a5xx/a6xx timestamps
0d6e0765f2de drm/msm: Fix legacy relocs path

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10490>

3 years agovulkan/wsi/display: don't report support if there is no drm fd
Lionel Landwerlin [Fri, 23 Apr 2021 10:26:46 +0000 (13:26 +0300)]
vulkan/wsi/display: don't report support if there is no drm fd

This partially deals with
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4688

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10430>

3 years agoci: Add missing vulkan dep for freedreno (turnip) and v3dv test jobs.
Eric Anholt [Fri, 23 Apr 2021 20:34:29 +0000 (13:34 -0700)]
ci: Add missing vulkan dep for freedreno (turnip) and v3dv test jobs.

We might miss testing core vk changes without this.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10472>

3 years agovulkan/wsi/x11: lower resize events to VK_SUBOPTIMAL_KHR
Niklas Haas [Sun, 22 Dec 2019 02:28:15 +0000 (03:28 +0100)]
vulkan/wsi/x11: lower resize events to VK_SUBOPTIMAL_KHR

Currently, a resized window results in an VK_ERROR_OUT_OF_DATE_KHR. But,
this seems to go against the spec, which suggests returning
VK_SUBOPTIMAL_KHR if the surface extent no longer matches the window
extent. (It does not *require* the WSI actually scale the contents, only
encourages doing so "if possible")

More to the point, VK_SUBOPTIMAL_KHR is the correct status to return if
the client *can* continue presenting to this swapchain, even if the
result will look wrong / "suboptimal". It's the client's decision on
when exactly to recreate the swapchain in this case, and the client may
very well end up wanting to continue presenting for a frame or two, to
prevent flooding the driver with swapchain recreations (which can result
in the window appearing visually "frozen" while resizing).

This change makes live resizing *significantly* smoother in e.g. mpv.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3196>

3 years agovulkan/wsi/x11: return VK_SUBOPTIMAL_KHR on mismatched swapchain
Niklas Haas [Sun, 22 Dec 2019 01:58:39 +0000 (02:58 +0100)]
vulkan/wsi/x11: return VK_SUBOPTIMAL_KHR on mismatched swapchain

If the swapchain already does not match the current geometry at the time
of creation, set the initial status to VK_SUBOPTIMAL_KHR as a way to
inform clients to please resize the swapchain.

This solves a race condition where users have no way of knowing if the
surface extent changed in between the user querying the current extent
and creating the swapchain, and might end up missing a resize event
because of it, since XCB_PRESENT_CONFIGURE_NOTIFY is not yet being
handled.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3196>

3 years agogallium: Add a transcode_astc driconf option
Jason Ekstrand [Mon, 26 Apr 2021 23:01:16 +0000 (18:01 -0500)]
gallium: Add a transcode_astc driconf option

This is similar to the transcode_etc flag in that it changes the ASTC
fallback (when present) to use DXT5 instead of RGBA8888.  This reduces
the memory footprint of the app at the expense of a bit of correctness.
Because it's not quite correct, it's hidden behind a driconf option.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10476>

3 years agoturnip: Only write the tu_RegisterDeviceEXT() out fence on success.
Eric Anholt [Mon, 26 Apr 2021 21:10:42 +0000 (14:10 -0700)]
turnip: Only write the tu_RegisterDeviceEXT() out fence on success.

Fixes a double-free in dEQP-VK.wsi.display_control.register_device_event
where the fence that we destroyed got destroyed again.  Leaving it unset
in the error path leaves the test's NULL in place.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10473>

3 years agoradv,aco: use nir_address_format_vec2_index_32bit_offset
Rhys Perry [Wed, 10 Mar 2021 15:47:40 +0000 (15:47 +0000)]
radv,aco: use nir_address_format_vec2_index_32bit_offset

The vec2 index helps the compiler make use of SMEM's SOFFSET field when
loading descriptors.

fossil-db (GFX10.3):
Totals from 126326 (86.37% of 146267) affected shaders:
VGPRs: 4898704 -> 4899088 (+0.01%); split: -0.02%, +0.03%
SpillSGPRs: 13490 -> 14404 (+6.78%); split: -1.10%, +7.87%
CodeSize: 306442996 -> 302277700 (-1.36%); split: -1.36%, +0.01%
MaxWaves: 3277108 -> 3276624 (-0.01%); split: +0.01%, -0.02%
Instrs: 58301101 -> 57469370 (-1.43%); split: -1.43%, +0.01%
VClause: 1208270 -> 1199264 (-0.75%); split: -1.02%, +0.28%
SClause: 2517691 -> 2432744 (-3.37%); split: -3.75%, +0.38%
Copies: 3518643 -> 3161097 (-10.16%); split: -10.45%, +0.29%
Branches: 1228383 -> 1228254 (-0.01%); split: -0.12%, +0.11%
PreSGPRs: 3973880 -> 4031099 (+1.44%); split: -0.19%, +1.63%
PreVGPRs: 3831599 -> 3831707 (+0.00%)
Cycles: 1785250712 -> 1778222316 (-0.39%); split: -0.42%, +0.03%
VMEM: 52873776 -> 50663317 (-4.18%); split: +0.18%, -4.36%
SMEM: 8534270 -> 8361666 (-2.02%); split: +1.79%, -3.82%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9523>

3 years agonir/lower_non_uniform: allow lowering with vec2 handles
Rhys Perry [Mon, 22 Mar 2021 11:23:29 +0000 (11:23 +0000)]
nir/lower_non_uniform: allow lowering with vec2 handles

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9523>

3 years agoradv: implement vulkan_resource_reindex
Rhys Perry [Wed, 10 Mar 2021 16:47:15 +0000 (16:47 +0000)]
radv: implement vulkan_resource_reindex

Fixes dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.dynamic_offset.select_descriptor_array

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9523>

3 years agoradv: cleanup LLVM implementation of vulkan_descriptor_index
Rhys Perry [Wed, 10 Mar 2021 14:44:52 +0000 (14:44 +0000)]
radv: cleanup LLVM implementation of vulkan_descriptor_index

Make it create a vec2 instead of a pointer, like what the NIR expects.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9523>

3 years agozink: correct an extension-link
Erik Faye-Lund [Tue, 27 Apr 2021 08:07:12 +0000 (10:07 +0200)]
zink: correct an extension-link

Fixing the fix, I guess I was a bit too quick last time ;)

Fixes: 0747fb546c7 ("docs: fixup link to extension")

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10478>

3 years agozink: fix shader-image requirements
Erik Faye-Lund [Mon, 26 Apr 2021 15:35:21 +0000 (17:35 +0200)]
zink: fix shader-image requirements

I mixed up the EXT and ARB version of the extensions; we actually do
require shaderStorageImageWriteWithoutFormat as well here.

Thanks to Ilia Mirkin for pointing this out.

It also seems I got really confused about what was required when writing
the docs, so let's fix that as well.

Fixes: 341332b23af ("zink: correct image cap checks")
Fixes: ecac7f3da1a ("docs: add missing zink-requirement")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10463>

3 years agodocs: remove out-of-date versions doc
Erik Faye-Lund [Mon, 26 Apr 2021 11:00:51 +0000 (13:00 +0200)]
docs: remove out-of-date versions doc

It seems nobody is interested in maintaining this info, and nobody seems
to complain. We already have more or less the same information in our
release-notes, so let's just redirect users there instead.

Users interested in archeology can look through the git history for the
information that's missing.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4222
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10451>

3 years agoglsl: ignore interface precision qualifier on desktop GL
Tapani Pälli [Wed, 21 Apr 2021 06:54:38 +0000 (09:54 +0300)]
glsl: ignore interface precision qualifier on desktop GL

This fixes linking failures with new GL45 linkage tests, no
regressions spotted on existing tests.

v2: add spec reference (Samuel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10373>

3 years agozink: fixup bad indentation
Erik Faye-Lund [Wed, 21 Apr 2021 14:08:41 +0000 (16:08 +0200)]
zink: fixup bad indentation

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10466>

3 years agozink: remove stray semicolons
Erik Faye-Lund [Wed, 21 Apr 2021 13:42:37 +0000 (15:42 +0200)]
zink: remove stray semicolons

Sometimes, there's a surplus of semicolons, and there's enough to go
around for everyone. So maybe you'll save a few away for later. But in
the big pictures, it seems better to get rid of these so we don't
overrun the semicolon quota.

Or whatever, I'm just cleaning up here.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10466>

3 years agozink: make zink_binding private
Erik Faye-Lund [Wed, 21 Apr 2021 13:43:49 +0000 (15:43 +0200)]
zink: make zink_binding private

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10466>