platform/upstream/mesa.git
2 years agozink: avoid generating nonsensical code
Erik Faye-Lund [Wed, 25 Aug 2021 19:51:44 +0000 (21:51 +0200)]
zink: avoid generating nonsensical code

With this code, we end up generating code such as:

if (!strcmp(extensions[i].extensionName, "VK_KHR_maintenance1")) {
   if (VK_MAKE_VERSION(1,2,0) >= screen->vk_version) {
      info->have_KHR_maintenance1 = true;
   } else {
      info->have_KHR_maintenance1 = true;
   }
}

That's clearly nonsense, as it does the same thing in the true and false
case. So let's instead try to walk the Vulkan versions up to the one
we're using in a separate pass, and add all extensions that were made core
in that version.

CID: 1473289

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593>

2 years agozink: reduce scope of version-struct hack
Erik Faye-Lund [Wed, 25 Aug 2021 21:46:18 +0000 (23:46 +0200)]
zink: reduce scope of version-struct hack

Without this, we'll end up checking against the wrong version when
enabling core features in the next commit.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593>

2 years agozink: clean up const-value handling for get_ssbo_size
Erik Faye-Lund [Thu, 26 Aug 2021 09:12:23 +0000 (11:12 +0200)]
zink: clean up const-value handling for get_ssbo_size

nir_src_as_const_value can return null pointers, and in other places we
at least assert for this. So let's do that here as well, which makes
Coverity a bit less paranoid.

While we're at it, avoid duplicating the nir_src_as_const_value call to
the same source.

CID: 1444291

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

2 years agozink: remove incorrect ASSERTED macro
Erik Faye-Lund [Thu, 26 Aug 2021 09:07:38 +0000 (11:07 +0200)]
zink: remove incorrect ASSERTED macro

The documentation for ASSERTED in macros.h says:

> Use ASSERTED to indicate that an identifier is unused outside of an `assert()`,
> so that assert-free builds don't get "unused variable" warnings.

We're using this variable outside of assert, so this shouldn't apply
here.

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

2 years agozink: remove needless scope
Erik Faye-Lund [Thu, 26 Aug 2021 09:03:25 +0000 (11:03 +0200)]
zink: remove needless scope

There's no variables declared in here, so there's no point in having
this slightly awkward scope here.

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

2 years agozink: give each major intrinsic it's own emit function
Erik Faye-Lund [Thu, 26 Aug 2021 08:24:30 +0000 (10:24 +0200)]
zink: give each major intrinsic it's own emit function

It's so much easier to follow this code if there's not any big blocks of
emitting in the middle of the code that figures out exactly what to do.

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

2 years agozink: avoid checking if src is const twice
Erik Faye-Lund [Wed, 25 Aug 2021 21:55:46 +0000 (23:55 +0200)]
zink: avoid checking if src is const twice

nir_src_as_const_value also checks if the src is const, and not
checking that it returned null makes Coverity go paranoid thinking we
could dereference a null-pointer. But because it's slightly better to
check once than to check twice, let's rewrite this to avoid the
double-check, making it obvious what's going on here.

CID: 1485624

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

2 years agozink: avoid memcmping null pointers
Erik Faye-Lund [Thu, 26 Aug 2021 09:36:21 +0000 (11:36 +0200)]
zink: avoid memcmping null pointers

memcmping NULL pointers is not allowed, and would lead to a crash here.
So let's check that the first isn't NULL; we've already checked that
they're not *both* NULL, so checking one is enough.

CID: 1484801, 1484810

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

2 years agozink: remove needless NULL-check
Erik Faye-Lund [Thu, 26 Aug 2021 09:27:33 +0000 (11:27 +0200)]
zink: remove needless NULL-check

This NULL-check makes Coverity paranoid because we just dereferenced the
pointer a few lines above.

But we never call this function with a NULL-pointer here, so the NULL
check isn't needed. Let's just remove it, to calm Coverity down a bit.

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

2 years agozink: return false on failure
Erik Faye-Lund [Thu, 26 Aug 2021 09:24:37 +0000 (11:24 +0200)]
zink: return false on failure

We do this in the other pipe_buffer_map_range failure case, so it makes
sense that we need to do it here as well. If we don't, we'll end up
taking a crash in the check_query_results function, which will
dereference that pointer.

We also need to unmap the buffer if we fail, otherwise we'll leak.

CID: 1475925

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

2 years agozink: pctx can't be null here
Erik Faye-Lund [Thu, 26 Aug 2021 09:17:21 +0000 (11:17 +0200)]
zink: pctx can't be null here

We're checking if pctx is null here, but that can't be true. If it
could, then the code that follows would have immediately crashed.

A quick peek at other drivers seems to indicate that this is a safe
assumption.

CID: 1474410, 1474554

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

2 years agozink: do not dereference null-pointer
Erik Faye-Lund [Wed, 25 Aug 2021 22:09:44 +0000 (00:09 +0200)]
zink: do not dereference null-pointer

The "locations" pointer can be null here, and memcpying from a null
pointer is not okay.

CID: 1485978

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

2 years agozink: do not try to dereference null-key
Erik Faye-Lund [Wed, 25 Aug 2021 22:02:11 +0000 (00:02 +0200)]
zink: do not try to dereference null-key

We can't do any of this logic if key is NULL, because that means we'll
dereference memory close to a NULL-pointer.

While we're at it, add some asserts to the zink_fs_key and zink_vs_key
functions who would otherwise be responsible for giving us invalid
non-null pointers out of null-pointers.

CID: 1475973, 1475983

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

2 years agozink: avoid overflow when calculating size
Erik Faye-Lund [Wed, 25 Aug 2021 19:44:46 +0000 (21:44 +0200)]
zink: avoid overflow when calculating size

If we multiply before we (implicitly) cast the result to the target
type, we needlessly risk overflowing the result.

CID: 1490790, 1475922

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

2 years agozink: initialize pQueueFamilyIndices
Erik Faye-Lund [Wed, 25 Aug 2021 19:38:17 +0000 (21:38 +0200)]
zink: initialize pQueueFamilyIndices

This silences a Coverity warning about an uninitialized variable.

CID: 1490800

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

2 years agozink: do not warn about rare features until used
Erik Faye-Lund [Fri, 27 Aug 2021 08:05:52 +0000 (10:05 +0200)]
zink: do not warn about rare features until used

We currently cause the following scary warning to be printed on
start-up for *every* application regardless if that feature is being
used or not when run on top of ANV:

> WARNING: Some incorrect rendering might occur because the selected
> Vulkan device (Intel(R) UHD Graphics 620 (KBL GT2)) doesn't support
> base Zink requirements: line_rast_feats.stippledRectangularLines
> line_rast_feats.stippledSmoothLines

There's no need to scare the users about this, as most applications
don't care about these combinational features. So let's instead emit a
warning when these features are attempted (but failed) to be used
instead.

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

2 years agoRevert "zink: always init bordercolor value for sampler"
Erik Faye-Lund [Fri, 27 Aug 2021 08:32:41 +0000 (10:32 +0200)]
Revert "zink: always init bordercolor value for sampler"

This reverts commit 336dea90f09c5cefc46de5240da28950fdca0723.

This change was incorrect for two reasons:

1. We already initialize this field on line 334
2. Unconditionally setting this to
   VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK breaks rendering with e.g
   opaque white borders, because we've already matched those to a
   non-custom enum value first.

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

2 years agoi965: Enable RGBX8888_SRGB format.
Lepton Wu [Sat, 14 Aug 2021 22:52:47 +0000 (15:52 -0700)]
i965: Enable RGBX8888_SRGB format.

This is required by Android. Some Android games like nier reincarnation
show a black screen without this.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12393>

2 years agoaco: Consider maximum number of workgroups per CU/WGP on Navi.
Timur Kristóf [Tue, 24 Aug 2021 06:57:39 +0000 (08:57 +0200)]
aco: Consider maximum number of workgroups per CU/WGP on Navi.

No Fossil DB changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12517>

2 years agoaco: Consider LDS usage by PS inputs in MaxWaves calculation.
Timur Kristóf [Tue, 24 Aug 2021 06:44:54 +0000 (08:44 +0200)]
aco: Consider LDS usage by PS inputs in MaxWaves calculation.

Before PS waves are launched, PS inputs are moved from PC to LDS
and the corresponding part of the PC is deallocated.
Each PS input occupies 3 * vec4 (3 * 16 = 48 bytes) of LDS space.
See Figure 10.3 in the GCN3 ISA manual.

These limit occupancy the same way as other stages' LDS usage does.
Note that PS can request additional LDS space via EXTRA_LDS_SIZE,
so that also must be taken into account here.

No Fossil DB changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12517>

2 years agozink: remove extra program ref from cached descriptor updates
Mike Blumenkrantz [Fri, 6 Aug 2021 14:54:05 +0000 (10:54 -0400)]
zink: remove extra program ref from cached descriptor updates

this happens in draw/compute now

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

2 years agozink: avoid pulling in unused push descriptors for cached ubo0
Mike Blumenkrantz [Fri, 6 Aug 2021 14:52:25 +0000 (10:52 -0400)]
zink: avoid pulling in unused push descriptors for cached ubo0

instead of just reading the template bufferinfo data, ensure that only
buffers which will be read are added to the set to avoid stale cache entries

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

2 years agoiris/ci: Correctly set freq governors to max
Tomeu Vizoso [Fri, 27 Aug 2021 14:55:22 +0000 (16:55 +0200)]
iris/ci: Correctly set freq governors to max

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12598>

2 years agofreedreno/ci: Correctly set freq governors to max
Tomeu Vizoso [Fri, 27 Aug 2021 14:55:07 +0000 (16:55 +0200)]
freedreno/ci: Correctly set freq governors to max

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12598>

2 years agopanvk: Fix panvk_copy_fb_desc()
Boris Brezillon [Fri, 27 Aug 2021 11:00:20 +0000 (13:00 +0200)]
panvk: Fix panvk_copy_fb_desc()

We should not skip the copy when the batch is attached a framebuffer
descriptor, quite the opposite. Let's drop the check instead of reversing
it since we are guaranteed to have an FB attached when
panvk_copy_fb_desc() is called.

Fixes: 792a0ab0b146 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590>

2 years agopanvk: Make the per-arch static lib depend on panvk_entrypoints.h
Boris Brezillon [Fri, 27 Aug 2021 08:30:38 +0000 (10:30 +0200)]
panvk: Make the per-arch static lib depend on panvk_entrypoints.h

The panvk_entrypoints.h header is included by all panvk_vX_xxx.c
source files, without this dependency the build can fail.

Fixes: 792a0ab0b146 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590>

2 years agozink: more effectively utilize batch_usage for query destruction
Mike Blumenkrantz [Mon, 2 Aug 2021 17:44:30 +0000 (13:44 -0400)]
zink: more effectively utilize batch_usage for query destruction

there's no need to track the number of batches that a query is referenced on,
as all the tracking is already done by the batch_usage mechanism, so this
can be simplified to manage destruction based on whether batch_usage exists

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

2 years agozink: don't try to sync previous timestamp query qbo values
Mike Blumenkrantz [Mon, 2 Aug 2021 14:52:20 +0000 (10:52 -0400)]
zink: don't try to sync previous timestamp query qbo values

this makes no sense, so don't explode the qbo by trying

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

2 years agozink: move time query ending out to zink_end_query
Mike Blumenkrantz [Mon, 2 Aug 2021 14:51:15 +0000 (10:51 -0400)]
zink: move time query ending out to zink_end_query

time queries only need to be ended when the api ends them, not per-cmdbuf

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

2 years agozink: improve threadsafe qbo access
Mike Blumenkrantz [Mon, 2 Aug 2021 16:01:54 +0000 (12:01 -0400)]
zink: improve threadsafe qbo access

these should be staging resources since they're being read from often,
and this allows dropping the UNSYNCHRONIZED flag from map since it should
be inferred

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

2 years agozink: make zink_gfx_pipeline_state::vertices_per_patch a bitfield
Mike Blumenkrantz [Tue, 15 Jun 2021 15:52:20 +0000 (11:52 -0400)]
zink: make zink_gfx_pipeline_state::vertices_per_patch a bitfield

this is clamped to MAX_PATCH_VERTICES

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

2 years agozink: repack zink_gfx_pipeline_state
Mike Blumenkrantz [Tue, 15 Jun 2021 15:52:08 +0000 (11:52 -0400)]
zink: repack zink_gfx_pipeline_state

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

2 years agozink: convert rasterizer pipeline components to bitfield
Mike Blumenkrantz [Tue, 15 Jun 2021 15:35:02 +0000 (11:35 -0400)]
zink: convert rasterizer pipeline components to bitfield

this reduces the hashed pipeline key size by 53 bits

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

2 years agozink: steal a bit from rast_samples in pipeline state
Mike Blumenkrantz [Thu, 15 Jul 2021 13:20:27 +0000 (09:20 -0400)]
zink: steal a bit from rast_samples in pipeline state

zink only handles values up to 64, so this still has an extra bit

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

2 years agozink: add clip_halfz to rasterizer hw state
Mike Blumenkrantz [Fri, 18 Jun 2021 16:47:29 +0000 (12:47 -0400)]
zink: add clip_halfz to rasterizer hw state

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

2 years agozink: repack zink_rasterizer_hw_state
Mike Blumenkrantz [Tue, 15 Jun 2021 14:23:38 +0000 (10:23 -0400)]
zink: repack zink_rasterizer_hw_state

this is now 11 bits

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

2 years agozink: zero viewport and scissor count in pipeline with dynamic state1
Mike Blumenkrantz [Tue, 15 Jun 2021 13:51:13 +0000 (09:51 -0400)]
zink: zero viewport and scissor count in pipeline with dynamic state1

this is illegal

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

2 years agozink: move viewport count into dynamic state1 part of pipeline hash
Mike Blumenkrantz [Tue, 15 Jun 2021 13:50:26 +0000 (09:50 -0400)]
zink: move viewport count into dynamic state1 part of pipeline hash

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

2 years agozink: move dynamic state1 pipeline members into substruct
Mike Blumenkrantz [Tue, 15 Jun 2021 13:47:50 +0000 (09:47 -0400)]
zink: move dynamic state1 pipeline members into substruct

this is a bit easier to manage

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

2 years agopanfrost: v7 does not support RGB32_UNORM textures
Boris Brezillon [Tue, 18 May 2021 14:03:29 +0000 (16:03 +0200)]
panfrost: v7 does not support RGB32_UNORM textures

Cc: mesa-stable
Fixes: c6bdd976e611 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12588>

2 years agoiris: fix layer calculation for TEXTURE_3D ReadPixels() on mip-level>0
Yevhenii Kharchenko [Mon, 22 Feb 2021 22:15:15 +0000 (00:15 +0200)]
iris: fix layer calculation for TEXTURE_3D ReadPixels() on mip-level>0

Fixes assert when ReadPixels() called to read from FBO to
GL_PIXEL_PACK_BUFFER, on mip-level > 0, since num_layers
wasn't properly calculated with mip-level.

v2: patched 'iris_create_sampler_view' function instead of
'resolve_sampler_views'. Just like it was suggested in this
function's comment.
The logic of fix is similar to one in 'update_image_surface' function
of i965 driver, which is introduced in commit
f9fd0cf4790cb2a530e75d1a2206dbb9d8af7cb2.
With a slight change: setting array_len=1, like it was done in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5808 ,
since minifying depth fails KHR-GLES2.texture_3d.filtering tests.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4145
Fixes: 3c979b0e ('iris: add some draw resolve hooks')

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9253>

2 years agoradv: remove unecessary radv_finishme() for invalid color formats
Samuel Pitoiset [Thu, 26 Aug 2021 09:00:33 +0000 (11:00 +0200)]
radv: remove unecessary radv_finishme() for invalid color formats

Something really bad happen (likely driver bug) if this is triggered.
Replace with some assertions to catch an eventual issue in debug build.

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/12556>

2 years agoradv: remove useless check about number of samples in the HW resolve path
Samuel Pitoiset [Thu, 26 Aug 2021 08:56:04 +0000 (10:56 +0200)]
radv: remove useless check about number of samples in the HW resolve path

Although this can likely hang, this is invalid and should be caught
by the validation layers. There is many ways to hang the GPU with VK,
this check alone is useless.

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/12556>

2 years agoradv: remove outdated radv_finishme() in the HW resolve path
Samuel Pitoiset [Thu, 26 Aug 2021 08:54:53 +0000 (10:54 +0200)]
radv: remove outdated radv_finishme() in the HW resolve path

Resolving layered MSAA images is actually implemented by the HW
resolve path but never used because the driver uses the compute 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/12556>

2 years agozink: set primitive restart with extended dynamic state2
Mike Blumenkrantz [Fri, 11 Jun 2021 15:20:30 +0000 (11:20 -0400)]
zink: set primitive restart with extended dynamic state2

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

2 years agozink: bump dynamic pipeline state count
Mike Blumenkrantz [Fri, 11 Jun 2021 14:04:24 +0000 (10:04 -0400)]
zink: bump dynamic pipeline state count

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

2 years agozink: template for VK_EXT_extended_dynamic_state2
Mike Blumenkrantz [Fri, 11 Jun 2021 14:04:17 +0000 (10:04 -0400)]
zink: template for VK_EXT_extended_dynamic_state2

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

2 years agozink: hook up VK_EXT_extended_dynamic_state2
Mike Blumenkrantz [Fri, 11 Jun 2021 14:03:59 +0000 (10:03 -0400)]
zink: hook up VK_EXT_extended_dynamic_state2

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

2 years agozink: no-op prim changes for pipeline recalc
Mike Blumenkrantz [Mon, 14 Jun 2021 18:24:32 +0000 (14:24 -0400)]
zink: no-op prim changes for pipeline recalc

this is no longer part of pipeline hash since we're using dynamic state

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

2 years agozink: consolidate pipeline hash tables
Mike Blumenkrantz [Mon, 14 Jun 2021 18:23:05 +0000 (14:23 -0400)]
zink: consolidate pipeline hash tables

with dynamic prim type, pipelines can now be grouped by base prim type
instead of requiring a different pipeline for overall prim type

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

2 years agozink: use dynamic prim type
Mike Blumenkrantz [Mon, 14 Jun 2021 18:21:39 +0000 (14:21 -0400)]
zink: use dynamic prim type

this is part of dynamic state but wasn't used since it required
actual work to effectively make use of it

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

2 years agozink: batch mem barrier hooks
Mike Blumenkrantz [Fri, 16 Jul 2021 13:44:51 +0000 (09:44 -0400)]
zink: batch mem barrier hooks

memory barriers are redundant, so batch them and apply based on actual
usage to be slightly more efficient

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

2 years agozink: slim down streamout component of mem barrier hook
Mike Blumenkrantz [Thu, 15 Jul 2021 18:26:04 +0000 (14:26 -0400)]
zink: slim down streamout component of mem barrier hook

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

2 years agozink: remove query flush from memory barrier hook
Mike Blumenkrantz [Thu, 15 Jul 2021 14:42:39 +0000 (10:42 -0400)]
zink: remove query flush from memory barrier hook

qbos are separate buffers with their own barriers, so this just stalls
pointlessly

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

2 years agozink: use ctx gfx prim mode for draw comparisons
Mike Blumenkrantz [Fri, 11 Jun 2021 13:50:09 +0000 (09:50 -0400)]
zink: use ctx gfx prim mode for draw comparisons

just being consistent

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

2 years agozink: init ctx->gfx_prim_mode to nonzero value to trigger pipeline changes
Mike Blumenkrantz [Fri, 25 Jun 2021 13:32:44 +0000 (09:32 -0400)]
zink: init ctx->gfx_prim_mode to nonzero value to trigger pipeline changes

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

2 years agozink: reorder gfx program/pipeline/descriptor binds if dynamic state is present
Mike Blumenkrantz [Fri, 11 Jun 2021 13:32:35 +0000 (09:32 -0400)]
zink: reorder gfx program/pipeline/descriptor binds if dynamic state is present

this enables deferring the heavy lifting until the rest of the state updates are
done

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

2 years agozink: remove extra unsetting of ctx->vertex_state_changed
Mike Blumenkrantz [Wed, 28 Jul 2021 19:09:11 +0000 (15:09 -0400)]
zink: remove extra unsetting of ctx->vertex_state_changed

this is already managed in zink_get_gfx_pipeline

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

2 years agozink: pass current program's shader array, not ctx array
Mike Blumenkrantz [Thu, 10 Jun 2021 12:17:33 +0000 (08:17 -0400)]
zink: pass current program's shader array, not ctx array

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

2 years agozink: remove attachment count from pipeline hash
Mike Blumenkrantz [Thu, 10 Jun 2021 12:17:09 +0000 (08:17 -0400)]
zink: remove attachment count from pipeline hash

this is redundant

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

2 years agozink: declare ctx var during blend state bind
Mike Blumenkrantz [Thu, 10 Jun 2021 10:43:34 +0000 (06:43 -0400)]
zink: declare ctx var during blend state bind

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

2 years agozink: assert precise queries are occlusion queries
Mike Blumenkrantz [Tue, 10 Aug 2021 14:17:39 +0000 (10:17 -0400)]
zink: assert precise queries are occlusion queries

this should always be the case

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

2 years agozink: require occlusionQueryPrecise for occlusion queries
Mike Blumenkrantz [Tue, 10 Aug 2021 14:16:15 +0000 (10:16 -0400)]
zink: require occlusionQueryPrecise for occlusion queries

ensure this is present to avoid driver explosions

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

2 years agozink: always init bordercolor value for sampler
Mike Blumenkrantz [Mon, 21 Jun 2021 13:53:35 +0000 (09:53 -0400)]
zink: always init bordercolor value for sampler

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

2 years agozink: implement PIPE_QUERY_GPU_FINISHED
Mike Blumenkrantz [Thu, 15 Jul 2021 12:33:23 +0000 (08:33 -0400)]
zink: implement PIPE_QUERY_GPU_FINISHED

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

2 years agov3dv: Implement VK_EXT_pipeline_creation_feedback
Ella-0 [Mon, 2 Aug 2021 22:13:25 +0000 (22:13 +0000)]
v3dv: Implement VK_EXT_pipeline_creation_feedback

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12371>

2 years agomicrosoft/compiler: trivial fixes to error-handling
Erik Faye-Lund [Wed, 25 Aug 2021 12:16:52 +0000 (14:16 +0200)]
microsoft/compiler: trivial fixes to error-handling

We're really bad at making sure we report errors when we fail to
allocate memory. This makes us a bit better...

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>

2 years agomicrosoft/compiler: return errors from get_n_src
Erik Faye-Lund [Wed, 25 Aug 2021 12:22:04 +0000 (14:22 +0200)]
microsoft/compiler: return errors from get_n_src

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>

2 years agomicrosoft/compiler: remove needless error-returns
Erik Faye-Lund [Wed, 25 Aug 2021 09:45:13 +0000 (11:45 +0200)]
microsoft/compiler: remove needless error-returns

There's no root error-conditions in this code, just code that assumes
they exist and tries to handle them.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>

2 years agonir: fix ifind_msb_rev by using appropriate type
Filip Gawin [Wed, 25 Aug 2021 21:19:36 +0000 (23:19 +0200)]
nir: fix ifind_msb_rev by using appropriate type

As you can see comparion "x < 0" doesn't make
sense if x is unsigned.

Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")

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

2 years agonir: fix shadowed variable in nir_lower_bit_size.c
Filip Gawin [Tue, 24 Aug 2021 19:28:19 +0000 (21:28 +0200)]
nir: fix shadowed variable in nir_lower_bit_size.c

Fixes: 6d792989924 ("nir/lower_bit_size: fix lowering of {imul,umul}_high")

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12527>

2 years agovenus: conditionally enable async descriptor set allocation
Yiwei Zhang [Sun, 22 Aug 2021 22:26:54 +0000 (22:26 +0000)]
venus: conditionally enable async descriptor set allocation

When VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not used to
create the pool, set allocation is guaranteed to not return
VK_ERROR_FRAGMENTED_POOL, and we can safely move set allocation to async
after doing resource tracking in the driver.

Enable after fully tested with assert(false) in the failure case.

Tested with:
- dEQP-VK.api.descriptor*
- dEQP-VK.api.object_management.*
- dEQP-VK.binding_model.descriptor*
- dEQP-VK.descriptor_indexing.*

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

2 years agovenus: check descriptor allocations against pool resource
Yiwei Zhang [Fri, 20 Aug 2021 21:50:14 +0000 (21:50 +0000)]
venus: check descriptor allocations against pool resource

Only kick in when async_set_allocation is enabled.

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

2 years agovenus: descriptor set to track descriptor count of last binding
Yiwei Zhang [Wed, 25 Aug 2021 01:17:58 +0000 (01:17 +0000)]
venus: descriptor set to track descriptor count of last binding

Track the descriptor count to be used instead of the variable descriptor
count to avoid duplicate checks in later accounting.

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

2 years agovenus: descriptor pool to track pool state
Yiwei Zhang [Fri, 20 Aug 2021 18:53:04 +0000 (18:53 +0000)]
venus: descriptor pool to track pool state

It also tracks whether async set allocation is enabled.

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

2 years agovenus: layout to track variable descriptor count binding info
Yiwei Zhang [Tue, 24 Aug 2021 20:57:23 +0000 (20:57 +0000)]
venus: layout to track variable descriptor count binding info

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

2 years agovenus: descriptor layout to track more binding infos
Yiwei Zhang [Fri, 20 Aug 2021 18:57:43 +0000 (18:57 +0000)]
venus: descriptor layout to track more binding infos

Rename existing max_binding to last_binding to be consistent.

1. layout to track last binding index
2. binding to track descriptor type
3. binding to track descriptor count

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

2 years agovenus: add vn_descriptor_set_layout_init
Yiwei Zhang [Sat, 21 Aug 2021 00:27:04 +0000 (00:27 +0000)]
venus: add vn_descriptor_set_layout_init

Just a refactoring without functional changes.

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

2 years agovenus: refactor failure path for sets allocation
Yiwei Zhang [Fri, 20 Aug 2021 21:06:25 +0000 (21:06 +0000)]
venus: refactor failure path for sets allocation

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

2 years agodri2: Fix Null pointer dereferences
Sergii Melikhov [Wed, 25 Aug 2021 12:13:21 +0000 (15:13 +0300)]
dri2: Fix Null pointer dereferences

Fix defect reported by Coverity Scan CID-1490794

Fixes: 0d42033b26 ("glx/dri2: Require the driver to support v4 of __DRI_DRI2")
Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12563>

2 years agoetnaviv: remove primconvert
Christian Gmeiner [Wed, 23 Jun 2021 05:58:01 +0000 (07:58 +0200)]
etnaviv: remove primconvert

This is no longer used.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516>

2 years agoetnaviv: export supported prim types
Christian Gmeiner [Wed, 23 Jun 2021 05:56:43 +0000 (07:56 +0200)]
etnaviv: export supported prim types

This is now handled by gallium, so the related codepaths can be dropped.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12516>

2 years agobroadcom/qpu: remove duplicated opcode variable
Juan A. Suarez Romero [Thu, 26 Aug 2021 08:36:48 +0000 (10:36 +0200)]
broadcom/qpu: remove duplicated opcode variable

`opcode` is wrote twice.

Fixes CID 1490798:  Incorrect expression  (EVALUATION_ORDER).

Fixes: 8a5f2228dbb ("broadcom/qpu: add new lookup opcode description helper")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12554>

2 years agoaco: Use workgroup size from input shader info.
Timur Kristóf [Wed, 11 Aug 2021 08:09:04 +0000 (10:09 +0200)]
aco: Use workgroup size from input shader info.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321>

2 years agoradv: Remove superfluous workgroup size calculations.
Timur Kristóf [Wed, 11 Aug 2021 06:53:55 +0000 (08:53 +0200)]
radv: Remove superfluous workgroup size calculations.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321>

2 years agoradv: Calculate workgroup sizes in radv_pipeline.
Timur Kristóf [Wed, 11 Aug 2021 06:54:28 +0000 (08:54 +0200)]
radv: Calculate workgroup sizes in radv_pipeline.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321>

2 years agoac: Calculate workgroup sizes of HW stages that operate in workgroups.
Timur Kristóf [Wed, 11 Aug 2021 06:57:04 +0000 (08:57 +0200)]
ac: Calculate workgroup sizes of HW stages that operate in workgroups.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12321>

2 years agoci: update the list of skipped tests for Fiji/RADV
Samuel Pitoiset [Wed, 25 Aug 2021 12:36:30 +0000 (14:36 +0200)]
ci: update the list of skipped tests for Fiji/RADV

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

2 years agopanvk: Initialize timestamp for disk cache
Tomeu Vizoso [Mon, 5 Jul 2021 08:00:54 +0000 (10:00 +0200)]
panvk: Initialize timestamp for disk cache

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552>

2 years agopanfrost: Make pan_blit() return the tiler job pointer
Boris Brezillon [Fri, 7 May 2021 10:33:14 +0000 (12:33 +0200)]
panfrost: Make pan_blit() return the tiler job pointer

The Vulkan driver needs to patch job headers when re-issueing a command
buffer. Return the tiler job pointer to allow that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552>

2 years agopanfrost: Fix pan_blit_ctx_init() when start > end
Boris Brezillon [Tue, 1 Jun 2021 08:18:00 +0000 (10:18 +0200)]
panfrost: Fix pan_blit_ctx_init() when start > end

This can happen when one wants to obtain a mirrored view. We need
to make sure the min <= max before emitting the viewport.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12552>

2 years agopanfrost: Prepare indirect draw helpers to per-gen XML
Boris Brezillon [Fri, 6 Aug 2021 09:21:14 +0000 (11:21 +0200)]
panfrost: Prepare indirect draw helpers to per-gen XML

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Prepare indirect dispatch helpers to per-gen XML
Boris Brezillon [Fri, 6 Aug 2021 09:05:13 +0000 (11:05 +0200)]
panfrost: Prepare indirect dispatch helpers to per-gen XML

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanvk: Prepare per-gen split
Boris Brezillon [Wed, 7 Jul 2021 14:19:16 +0000 (16:19 +0200)]
panvk: Prepare per-gen split

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Only emit special attribute buffer entries on pre-v6 hardware
Boris Brezillon [Mon, 23 Aug 2021 13:37:37 +0000 (15:37 +0200)]
panfrost: Only emit special attribute buffer entries on pre-v6 hardware

There's no special attributes on Bifrost.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Move panfrost_modifier_to_layout() to pan_texture.c
Boris Brezillon [Fri, 6 Aug 2021 12:16:18 +0000 (14:16 +0200)]
panfrost: Move panfrost_modifier_to_layout() to pan_texture.c

This function is not used outside pan_texture.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Get rid of all _packed structs in pan_context.h
Boris Brezillon [Wed, 4 Aug 2021 10:28:48 +0000 (12:28 +0200)]
panfrost: Get rid of all _packed structs in pan_context.h

Such that pan_context.h remains generic even after the per-gen XML
switch.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopan/gen_pack: Add parens around packed1/2 vars in pan_merge()
Boris Brezillon [Wed, 4 Aug 2021 10:23:02 +0000 (12:23 +0200)]
pan/gen_pack: Add parens around packed1/2 vars in pan_merge()

This way we can pass *desc instead of (*desc).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Add generic mappings for the gen-specific tiler descriptor macros
Boris Brezillon [Wed, 4 Aug 2021 09:25:26 +0000 (11:25 +0200)]
panfrost: Add generic mappings for the gen-specific tiler descriptor macros

This way the transition to per-gen XML files gets simpler.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>

2 years agopanfrost: Get rid of the mali_xxx enum redefinitions
Boris Brezillon [Fri, 6 Aug 2021 10:30:04 +0000 (12:30 +0200)]
panfrost: Get rid of the mali_xxx enum redefinitions

The gen_macros.h header should include the common header file when
PAN_ARCH is undefined, thus making those redefinitions useless.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12551>