platform/upstream/mesa.git
3 years agobroadcom/compiler: consider RT component size when lowering logic ops in Vulkan
Iago Toral Quiroga [Fri, 14 May 2021 10:03:35 +0000 (12:03 +0200)]
broadcom/compiler: consider RT component size when lowering logic ops in Vulkan

In Vulkan we configure our integer RTs to clamp automatically, so with logic
operations we need to be careful and avoid overflows by discarding any bits
that won't fit in the RT component size.

Fixes remaining CTS test failures in:
dEQP-VK.pipeline.logic_op.*

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

3 years agobroadcom/compiler: don't emit TLB loads for components that don't exist
Iago Toral Quiroga [Tue, 18 May 2021 06:19:32 +0000 (08:19 +0200)]
broadcom/compiler: don't emit TLB loads for components that don't exist

This avoids debug builds to assert crash. Components that don't exist
won't be used and will be eventually DCEd, so simply lower them to 0.

Fixes CTS tests like these in debug builds:
dEQP-VK.pipeline.logic_op.r8_uint.clear
dEQP-VK.pipeline.logic_op.r8_uint.and
dEQP-VK.pipeline.logic_op.r8_uint.and_reverse
dEQP-VK.pipeline.logic_op.r8_uint.copy
dEQP-VK.pipeline.logic_op.r8_uint.and_inverted
dEQP-VK.pipeline.logic_op.r8_uint.no_op
dEQP-VK.pipeline.logic_op.r8_uint.xor
dEQP-VK.pipeline.logic_op.r8_uint.or

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

3 years agoi965: export GEM handle with RDWR access rights
Maksim Sisov [Tue, 18 May 2021 05:23:56 +0000 (08:23 +0300)]
i965: export GEM handle with RDWR access rights

There is a regression that made it impossible to export gem
handles with write access.

That is, a client may export gem handles of each buffer plane, then
export dmabuf fds using these handles, and mmap these dmabuf in
a different process (this is what Chromium does).

After https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4861,
it became impossible as mmap resulted in EACCESS error as slightly
different approach was taken for exporting these gem handles.

This CL fixes exporting gem handles (which are exported from dmabuf
fds) by adding the DRM_RDWR flag.

Cc: mesa-stable
Fixes #3119

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850>

3 years agoradv: add missing entrypoints for VK_EXT_extended_dynamic_state2
Samuel Pitoiset [Mon, 17 May 2021 07:10:36 +0000 (09:10 +0200)]
radv: add missing entrypoints for VK_EXT_extended_dynamic_state2

Fixes warnings with dEQP-VK.api.version_check.entry_points.

Fixes: d96507b73f2 ("radv: advertise VK_EXT_extended_dynamic_state2")
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/10831>

3 years agoetnaviv: fix vertex sampler setup
Lucas Stach [Mon, 10 May 2021 10:15:46 +0000 (12:15 +0200)]
etnaviv: fix vertex sampler setup

The start offset of the vertex samplers isn't zero, but the indexing of
the passed in views array is still zero based. Use the correct indexing
variable to fix vertex sampler setup.

Cc: <mesa-stable@lists.freedesktop.org>
Fixes: 81ab9fe2d0c2 ("etnaviv: handle NULL views in set_sampler_views")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10724>

3 years agoiris: export GEM handle with RDWR access rights
Maksim Sisov [Tue, 18 May 2021 05:23:56 +0000 (08:23 +0300)]
iris: export GEM handle with RDWR access rights

There is a regression that made it impossible to export gem
handles with write access.

That is, a client may export gem handles of each buffer plane, then
export dmabuf fds using these handles, and mmap these dmabuf in
a different process (this is what Chromium does).

After https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4861,
it became impossible as mmap resulted in EACCESS error as slightly
different approach was taken for exporting these gem handles.

This CL fixes exporting gem handles (which are exported from dmabuf
fds) by adding the DRM_RDWR flag.

Cc: mesa-stable
Fixes #3119

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10851>

3 years agonir/opt_access: fix getting variables in presence of similar bindings/desc
Samuel Pitoiset [Fri, 7 May 2021 13:50:24 +0000 (15:50 +0200)]
nir/opt_access: fix getting variables in presence of similar bindings/desc

It's perfectly legal to declare multiple SSBOs that point to the same
binding/descriptor_set with different access mask. Currently, it will
always get the first one in the list that matches binding/desc_set
regardless of the access mask, but other variables might have different
access mask.

Fix this by being conservative if another variable uses the same
binding/desc_set because we can't get it reliably without adding
a new field to vulkan_resource_index.

This fixes rendering issues in Resident Evil Village with vkd3d-proton.
This bug has been uncovered by ("spirv: Don't remove variables used by
resource indexing intrinsics") because variables are no longer removed

No fossils-db changes.

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

3 years agoci/freedreno: Skip a test that's taking out the a530 boards.
Emma Anholt [Mon, 17 May 2021 21:12:00 +0000 (14:12 -0700)]
ci/freedreno: Skip a test that's taking out the a530 boards.

This one has shown up as faulting several times, with CP failures
afterward.

Fixes: e8640fef9089 ("ci: Uprev piglit to 3351e8952 ("max-texture-size: report merged results")")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10848>

3 years agodrisw: Don't bzero displaytarget pixels
Adam Jackson [Mon, 10 May 2021 19:46:42 +0000 (15:46 -0400)]
drisw: Don't bzero displaytarget pixels

Drivers generally don't clear new resources.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10758>

3 years agogallium/dri: Remove unused dri_drawable::drisw_surface
Adam Jackson [Tue, 11 May 2021 20:00:07 +0000 (16:00 -0400)]
gallium/dri: Remove unused dri_drawable::drisw_surface

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10758>

3 years agoturnip: make cmdstream bo's read-only to GPU
Danylo Piliaiev [Mon, 17 May 2021 09:40:05 +0000 (12:40 +0300)]
turnip: make cmdstream bo's read-only to GPU

Would allow earlier faults instead of having corrupted cmdstream.

This was already done to Freedreno long ago in:
    04aff7e4 "freedreno: make cmdstream bo's read-only to GPU"

Since private memory should be GPU writable it is now allocated
separately, instead of suballocation from now read-only cmdstream.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10807>

3 years agoturnip: make possible to create read-only bo with tu_bo_init_new
Danylo Piliaiev [Fri, 14 May 2021 15:05:02 +0000 (18:05 +0300)]
turnip: make possible to create read-only bo with tu_bo_init_new

GPU won't be able to write to such BOs, which would to useful for
cmdstream BOs.

Move "bool dump" to the new flags along the way.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10807>

3 years agopanfrost: Shorten iffy comment
Alyssa Rosenzweig [Thu, 13 May 2021 15:32:14 +0000 (11:32 -0400)]
panfrost: Shorten iffy comment

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10845>

3 years agopanfrost: Garbage collect comment
Alyssa Rosenzweig [Wed, 12 May 2021 21:08:13 +0000 (17:08 -0400)]
panfrost: Garbage collect comment

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10845>

3 years agopanfrost: Make clear which limits are arbitrary
Alyssa Rosenzweig [Mon, 10 May 2021 17:21:27 +0000 (13:21 -0400)]
panfrost: Make clear which limits are arbitrary

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10845>

3 years agopanfrost: Use natural shader limits
Alyssa Rosenzweig [Mon, 10 May 2021 17:08:16 +0000 (13:08 -0400)]
panfrost: Use natural shader limits

Mostly arbitrary. Use the Gallium limits which are all less than the
hardware limits, and static_assert that this is the case to future
proof.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10845>

3 years agopanfrost: Drop random #define
Alyssa Rosenzweig [Mon, 10 May 2021 17:07:38 +0000 (13:07 -0400)]
panfrost: Drop random #define

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10845>

3 years agomidgard: Fix type for vertex_builtin_arg() and compute_builtin_arg().
Emma Anholt [Mon, 17 May 2021 17:03:04 +0000 (10:03 -0700)]
midgard: Fix type for vertex_builtin_arg() and compute_builtin_arg().

It takes an intrinsic, not an ALU op.  Fixes a clang complaint about enum
conversion.

Fixes: 306800d747bc ("pan/midgard: Lower gl_VertexID/gl_InstanceID to attributes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10843>

3 years agopanfrost: Limit the number of active batch to 32
Boris Brezillon [Wed, 12 May 2021 14:17:57 +0000 (16:17 +0200)]
panfrost: Limit the number of active batch to 32

Should improve memory usage at the expense of more agressive batch
submission when the free batch pool is empty. The limit has been chosen
such that a batches bitmap fits nicely in a 32-bit integer.

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

3 years agopanfrost: Simplify the dependency tracking logic
Boris Brezillon [Wed, 12 May 2021 09:40:00 +0000 (11:40 +0200)]
panfrost: Simplify the dependency tracking logic

Flush batches when a new batch accessing the same set of BOs comes in
instead of delaying that operation. This greatly simplifies the
dependency tracking logic and shouldn't hurt the perfs (it might even
improve the latency since jobs are now flushed earlier).

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

3 years agopanfrost: Avoid duplicate entries in access->readers
Boris Brezillon [Wed, 12 May 2021 11:24:03 +0000 (13:24 +0200)]
panfrost: Avoid duplicate entries in access->readers

The PAN_BATCH_DEBUG section was too wide, potentially leading to
double insertion of the same batch in the readers array. Let's get rid
of this already_accessed parameter and make sure
panfrost_batch_update_bo_access() is only called if the RW flags have
changed.

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

3 years agopanfrost: Don't freeze blit batches
Boris Brezillon [Mon, 10 May 2021 11:00:10 +0000 (13:00 +0200)]
panfrost: Don't freeze blit batches

We don't want blit batches to interfere with subsequent draw calls, but
we want to keep them in the list of pending batches (so they gets flushed
when glFlush() is called), so calling panfrost_freeze_batch() is not an
option. Reset the ctx->batch pointer manually.

Note that there's no risk to have those batches re-used to queue
unrelated draws because we created a unique pipe_surface object per
blit call, and the batch logic use the surface pointers to calculate
the batch key hash.

Fixes: e1649e916d67 ("panfrost: Use pan_blit() when PAN_MESA_DEBUG=panblit")
Reported-by: Icecream95 <ixn@disroot.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10842>

3 years agoi915g: fix implicit fallthrough
Abel García Dorta [Fri, 14 May 2021 21:41:50 +0000 (22:41 +0100)]
i915g: fix implicit fallthrough

Closes: #4777
Fixes: 4e861ac4a1f ("i915g: Add more optimizations")
Fixes: f34fd58ec92 ("i915g: implement unfenced relocs for textures using tiling bits")
Fixes: beaf039f972 ("i915g: cleanup static state calculation, part 1")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10811>

3 years agoradv: dump the trap handler shader with RADV_DEBUG=metashaders
Samuel Pitoiset [Wed, 5 May 2021 19:23:07 +0000 (21:23 +0200)]
radv: dump the trap handler shader with RADV_DEBUG=metashaders

Help debugging it.

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

3 years agopanfrost: Fix major flaw in BO cache
Alyssa Rosenzweig [Thu, 13 May 2021 21:24:31 +0000 (17:24 -0400)]
panfrost: Fix major flaw in BO cache

BOs in the cache are chronological, so we try oldest BOs first. That
means if we find the oldest BO is busy, likely every BO is busy, and we
should bail early. This dramatically reduces the useless cycles spent in
bo_wait.

I studied the BO cache of the following drivers, all of which handle
this correctly: iris, lima, etnaviv, freedreno, vc4, v3d, v3dv.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10794>

3 years agoci: Build asahi in meson-gallium job
Alyssa Rosenzweig [Sun, 16 May 2021 18:02:54 +0000 (14:02 -0400)]
ci: Build asahi in meson-gallium job

Adding full CI for Asahi won't make sense for a while, but simply
build-testing should catch a lot of problems with whole tree refactors
in Gallium and NIR.

Closes: #4744
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10826>

3 years agoRevert "CI: Disable all Panfrost/AMD/Iris automatic jobs"
Tomeu Vizoso [Mon, 17 May 2021 11:05:53 +0000 (13:05 +0200)]
Revert "CI: Disable all Panfrost/AMD/Iris automatic jobs"

This reverts commit e1d74c9cfde45ecff1927c2ebf47fc0f42ab0b6a.

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

3 years agoaco/ra: use flags instead of booleans for update_renames()
Rhys Perry [Thu, 29 Apr 2021 09:41:38 +0000 (10:41 +0100)]
aco/ra: use flags instead of booleans for update_renames()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>

3 years agoaco/ra: fix get_reg_for_operand() with vector operands
Rhys Perry [Fri, 23 Apr 2021 14:09:01 +0000 (15:09 +0100)]
aco/ra: fix get_reg_for_operand() with vector operands

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>

3 years agoaco/ra: fix get_reg_for_operand() when the blocking var is a vector
Rhys Perry [Fri, 23 Apr 2021 13:31:04 +0000 (14:31 +0100)]
aco/ra: fix get_reg_for_operand() when the blocking var is a vector

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>

3 years agoaco/ra: fix get_reg_for_operand() with no free registers
Rhys Perry [Fri, 23 Apr 2021 13:29:22 +0000 (14:29 +0100)]
aco/ra: fix get_reg_for_operand() with no free registers

fossil-db (Sienna Cichlid):
Totals from 195 (0.13% of 149839) affected shaders:
CodeSize: 2352160 -> 2356720 (+0.19%); split: -0.00%, +0.20%
Instrs: 431976 -> 433124 (+0.27%); split: -0.00%, +0.27%
Latency: 10174434 -> 10174897 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 4044388 -> 4044425 (+0.00%); split: -0.00%, +0.00%
Copies: 67634 -> 68762 (+1.67%); split: -0.00%, +1.67%

fossil-db (Polaris):
Totals from 186 (0.12% of 151365) affected shaders:
CodeSize: 2272356 -> 2276848 (+0.20%); split: -0.00%, +0.20%
Instrs: 432390 -> 433513 (+0.26%); split: -0.00%, +0.26%
Latency: 13153394 -> 13160194 (+0.05%); split: -0.00%, +0.05%
InvThroughput: 10889509 -> 10889967 (+0.00%); split: -0.00%, +0.00%
SClause: 12745 -> 12747 (+0.02%)
Copies: 74832 -> 75945 (+1.49%); split: -0.01%, +1.50%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>

3 years agoaco/ra: initialize temp_in_scc earlier
Rhys Perry [Mon, 3 May 2021 13:21:59 +0000 (14:21 +0100)]
aco/ra: initialize temp_in_scc earlier

We need to know if there's a temporary in SCC before the instruction, not
after.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 93c8ebfa780 ("aco: Initial commit of independent AMD compiler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>

3 years agozink: add even more validation for linear images before creation
Mike Blumenkrantz [Thu, 4 Feb 2021 21:31:23 +0000 (16:31 -0500)]
zink: add even more validation for linear images before creation

nvidia claims format feature support for various flags but then doesn't
actually support them for a 3D image, only 2D, meaning that an extra step
is necessary before creating a linear image

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

3 years agozink: populate images with u_blitter if transfer_dst isn't available
Mike Blumenkrantz [Wed, 3 Feb 2021 20:35:49 +0000 (15:35 -0500)]
zink: populate images with u_blitter if transfer_dst isn't available

this seems incredibly unlikely, but now it's handled

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

3 years agozink: don't multiply cube array image layers
Mike Blumenkrantz [Fri, 19 Mar 2021 22:24:28 +0000 (18:24 -0400)]
zink: don't multiply cube array image layers

this whole thing seems broken, but this part in particular is super broken

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

3 years agoaco/ra: also prevent overflow register for p_create_vector operands
Daniel Schürmann [Mon, 17 May 2021 08:39:24 +0000 (10:39 +0200)]
aco/ra: also prevent overflow register for p_create_vector operands

Fixes: d659ce0d6c5781a1230b182ef5ed1a77de485565 ('aco/ra: prevent underflow register for p_create_vector operands')
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10832>

3 years agoci: remove expected robustness2 fails for Renoir
Rhys Perry [Mon, 17 May 2021 10:14:43 +0000 (11:14 +0100)]
ci: remove expected robustness2 fails for Renoir

These should be fixed now.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Fixes: 157c6b0f336 ("radv,aco: use per-attribute vertex descriptors for robustness")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10834>

3 years agoutil: add thread-safe version of idalloc
Marek Olšák [Thu, 6 May 2021 00:09:56 +0000 (20:09 -0400)]
util: add thread-safe version of idalloc

For buffer IDs in u_threaded_context.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: don't reference resource in pipe_transfer
Marek Olšák [Fri, 7 May 2021 12:40:35 +0000 (08:40 -0400)]
gallium/u_threaded: don't reference resource in pipe_transfer

The atomic can be costly, so skip it. This should be safe because
we never have pipe_transfer as the only live reference of a buffer.

Drivers can't do this yet because something needs to hold the resource
reference while a transfer object is being passed via u_threaded_context.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: always map idle buffers unsynchronized
Marek Olšák [Thu, 6 May 2021 00:32:45 +0000 (20:32 -0400)]
gallium/u_threaded: always map idle buffers unsynchronized

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: don't invalidate idle buffers
Marek Olšák [Thu, 6 May 2021 00:28:04 +0000 (20:28 -0400)]
gallium/u_threaded: don't invalidate idle buffers

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: add driver-internal flush tracking for buffer lists
Marek Olšák [Thu, 29 Apr 2021 20:32:45 +0000 (16:32 -0400)]
gallium/u_threaded: add driver-internal flush tracking for buffer lists

This is used to track which buffer lists are associated with commands that
the driver hasn't flushed yet, so that we can consider all those buffers
busy.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: add buffer lists - tracking of buffers referenced by tc
Marek Olšák [Thu, 22 Apr 2021 02:32:06 +0000 (22:32 -0400)]
gallium/u_threaded: add buffer lists - tracking of buffers referenced by tc

not used by anything yet

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: query shader resource limits
Marek Olšák [Thu, 22 Apr 2021 01:35:15 +0000 (21:35 -0400)]
gallium/u_threaded: query shader resource limits

for tracking buffer busyness later

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: track whether TCS, TES, or GS have ever been used
Marek Olšák [Thu, 22 Apr 2021 01:31:49 +0000 (21:31 -0400)]
gallium/u_threaded: track whether TCS, TES, or GS have ever been used

to optimize buffer busyness tracking later

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: add callbacks and documentation for resource busy checking
Marek Olšák [Thu, 22 Apr 2021 01:29:48 +0000 (21:29 -0400)]
gallium/u_threaded: add callbacks and documentation for resource busy checking

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: merge draws in tc_call_draw_single
Marek Olšák [Thu, 29 Apr 2021 04:25:54 +0000 (00:25 -0400)]
gallium/u_threaded: merge draws in tc_call_draw_single

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agogallium/u_threaded: pass last into and return call size from execute callbacks
Marek Olšák [Thu, 29 Apr 2021 03:55:15 +0000 (23:55 -0400)]
gallium/u_threaded: pass last into and return call size from execute callbacks

This will allow call merging inside execute callbacks because they can
iterate the batch and return how many slots they consumed.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>

3 years agoanv: require rendering support for blit destination feature
Tapani Pälli [Fri, 14 May 2021 06:41:10 +0000 (09:41 +0300)]
anv: require rendering support for blit destination feature

This fixes some new cts tests that exercise blitting
between compressed and uncompressed formats.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10830>

3 years agonir/lower_phis_to_scalar: Add "lower_all" option
Connor Abbott [Tue, 23 Feb 2021 10:31:41 +0000 (11:31 +0100)]
nir/lower_phis_to_scalar: Add "lower_all" option

We don't want to have to deal with vector phis in freedreno, because
vectors are always split/unsplit around vectorized instructions anyways,
and the stated reason for not scalarising them (it hurting coalescing)
won't apply to us because we won't be using nir_from_ssa. Add this
option so that we don't have to do the equivalent thing while
translating from NIR.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10809>

3 years agointel/isl: replace format_gen by verx10
Marcin Ślusarz [Fri, 14 May 2021 16:45:52 +0000 (18:45 +0200)]
intel/isl: replace format_gen by verx10

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10810>

3 years agoi965: simplify gfx version checks
Marcin Ślusarz [Fri, 14 May 2021 16:44:56 +0000 (18:44 +0200)]
i965: simplify gfx version checks

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10810>

3 years agointel: simplify is_haswell checks, part 2
Marcin Ślusarz [Fri, 14 May 2021 16:12:28 +0000 (18:12 +0200)]
intel: simplify is_haswell checks, part 2

Few cases that were not handled by sed.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10810>

3 years agointel: simplify is_haswell checks, part 1
Marcin Ślusarz [Fri, 14 May 2021 16:04:46 +0000 (18:04 +0200)]
intel: simplify is_haswell checks, part 1

Generated with:

files=`git grep is_haswell | cut -d: -f1 | sort | uniq`
for file in $files; do
        cat $file | \
                sed "s/devinfo->ver <= 7 && !devinfo->is_haswell/devinfo->verx10 <= 70/g" | \
                sed "s/devinfo->ver >= 8 || devinfo->is_haswell/devinfo->verx10 >= 75/g" | \
                sed "s/devinfo->is_haswell || devinfo->ver >= 8/devinfo->verx10 >= 75/g" | \
                sed "s/devinfo.is_haswell || devinfo.ver >= 8/devinfo.verx10 >= 75/g" | \
                sed "s/devinfo->ver > 7 || devinfo->is_haswell/devinfo->verx10 >= 75/g" | \
                sed "s/devinfo->ver == 7 && !devinfo->is_haswell/devinfo->verx10 == 70/g" | \
                sed "s/devinfo.ver == 7 && !devinfo.is_haswell/devinfo.verx10 == 70/g" | \
                sed "s/devinfo->ver < 8 && !devinfo->is_haswell/devinfo->verx10 <= 70/g" | \
                sed "s/device->info.ver == 7 && !device->info.is_haswell/device->info.verx10 == 70/g" \
                > tmpXXX
        mv tmpXXX $file
done

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10810>

3 years agoturnip: do not ignore early_fragment_tests
Danylo Piliaiev [Fri, 14 May 2021 12:35:17 +0000 (15:35 +0300)]
turnip: do not ignore early_fragment_tests

Specifying "early_fragment_tests" in fragment shader takes precedence
over our internal conditions.

Fixes test:
 dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil

Fixes: b2a60c157e4d6cc62c55d8fe8777f7cbd548a722 "turnip: add LRZ early-z support"

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

3 years agopanfrost: Try to align scanout resource stride on 64 bytes
Boris Brezillon [Mon, 3 May 2021 08:18:38 +0000 (10:18 +0200)]
panfrost: Try to align scanout resource stride on 64 bytes

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

3 years agopanfrost: Relax the stride check when importing resources
Boris Brezillon [Fri, 23 Apr 2021 07:24:50 +0000 (09:24 +0200)]
panfrost: Relax the stride check when importing resources

Imported resources will not necessarily have their line stride aligned
on 64 bytes, and things prove to work just fine even on Bifrost, so
let's relax the condition and drop the comment stating that Bifrost
needs pixel lines to be aligned on 64 bytes.

Reported-by: Icecream95 <ixn@disroot.org>
Suggested-by: Icecream95 <ixn@disroot.org>
Fixes: 051d62cf0410 ("panfrost: Add a pan_image_layout_init() helper")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10423>

3 years agovenus: stop advertising KHR_driver_properties for Android
Yiwei Zhang [Sat, 15 May 2021 22:07:27 +0000 (22:07 +0000)]
venus: stop advertising KHR_driver_properties for Android

This is to pass the Android cts requirement. We will re-advertise the
extension after venus has a valid driver id defined.

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

3 years agovenus: fix vkEnumeratePhysicalDeviceGroups
Yiwei Zhang [Sat, 15 May 2021 21:38:36 +0000 (21:38 +0000)]
venus: fix vkEnumeratePhysicalDeviceGroups

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

3 years agovulkan: Support 32-bit "weak" symbols on MSVC
James Park [Sun, 2 May 2021 09:24:09 +0000 (02:24 -0700)]
vulkan: Support 32-bit "weak" symbols on MSVC

MSVC uses different decorated names for 32-bit versus 64-bit. Declare
all argument sizes for 32-bit because computing the actual size would be
difficult.

Fixes: 9be7aa3fc83 ("vulkan: Add a common entrypoint table generator")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10573>

3 years agofreedreno/a6xx: Add a few registers
Rob Clark [Sun, 16 May 2021 18:22:32 +0000 (11:22 -0700)]
freedreno/a6xx: Add a few registers

Based-on: https://patchwork.freedesktop.org/patch/429745/?series=89269&rev=2
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10829>

3 years agofreedreno/regs: split DSI PHY registers to separate xml files.
Dmitry Baryshkov [Sat, 15 May 2021 17:36:23 +0000 (20:36 +0300)]
freedreno/regs: split DSI PHY registers to separate xml files.

In-kernel DSI PHY driver is being more and more split from the main DSI
driver. Split PHY registers from main dsi.xml file to ease further split
of the drivers.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10817>

3 years agonir/builder: add nir_pad_vector and nir_pad_vec4 util functions
Mike Blumenkrantz [Tue, 4 May 2021 18:26:46 +0000 (14:26 -0400)]
nir/builder: add nir_pad_vector and nir_pad_vec4 util functions

these pad a given value to vec4 or arbitrary number of components

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10630>

3 years agovenus: Fix zero-initialized fd causing apps to hang/crash
Joshua Ashton [Sat, 15 May 2021 09:53:17 +0000 (10:53 +0100)]
venus: Fix zero-initialized fd causing apps to hang/crash

Some apps such as Gamescope crash under the mere presence of the virtio Vulkan driver without using a device.

This is because virtgpu::fd is zero-initialized upon allocation, which causes fd 0 to be closed in virtgpu_destroy.

Cc: mesa-stable
Fixes: 247232d5 ("venus: add experimental renderers")
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10814>

3 years agoradv: Handle unnormalized samplers in YCbCr lowering
Joshua Ashton [Sat, 15 May 2021 13:43:14 +0000 (14:43 +0100)]
radv: Handle unnormalized samplers in YCbCr lowering

We need to divide these by their divisors and special-case COSITED_EVEN.

Fixes NV12 compositing in Gamescope.

Fixes: 91702374 ("radv: Add ycbcr lowering pass.")
Cc: mesa-stable
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10816>

3 years agoiris: fix assert to reflect correct limit for encoded size
Lionel Landwerlin [Fri, 14 May 2021 13:04:13 +0000 (16:04 +0300)]
iris: fix assert to reflect correct limit for encoded size

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10805>

3 years agor600/sfn: Ignore precision when linking
Gert Wollny [Mon, 10 May 2021 06:56:28 +0000 (08:56 +0200)]
r600/sfn: Ignore precision when linking

There doesn't seem to be any speciifc support for passing arount
mediump and lowp data, so when linking these specifiers can be ignored
theerby saving IO instructions.

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

3 years agonir/linker: add option to ignore the IO precisions for better varying packing
Gert Wollny [Mon, 10 May 2021 06:54:50 +0000 (08:54 +0200)]
nir/linker: add option to ignore the IO precisions for better varying packing

Backends that don't handle IO component precision can pack more varyings
into one slot if the linker ignores the precision. If the IO is vectorized
then this can save IO instructions.

Related: 165a69d2f74aefe80b070209e77950446a97c8b5
    nir: handle mediump varyings in varying compaction helpers

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10722>

3 years agoci: Update VK-GL-CTS to 1.2.6.1
Juan A. Suarez Romero [Fri, 14 May 2021 10:08:43 +0000 (12:08 +0200)]
ci: Update VK-GL-CTS to 1.2.6.1

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

3 years agollvmpipe: fix non-multisampled rendering to multisampled framebuffer
Dave Airlie [Wed, 12 May 2021 23:36:59 +0000 (09:36 +1000)]
llvmpipe: fix non-multisampled rendering to multisampled framebuffer

Don't depend moving between samples on key->multisample

Big CI wins
Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Fixes: 210d714f46e7 ("llvmpipe: handle multisample color stores.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10780>

3 years agoiris: Avoid sampling some MCS surfaces with clear
Nanley Chery [Tue, 26 Jan 2021 23:50:20 +0000 (15:50 -0800)]
iris: Avoid sampling some MCS surfaces with clear

Supposedly avoids GPU hangs in BF4. See HSD 1707282275 and 14013111325.

v2. Fix bug in WA implementation. (Sagar)

Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755>

3 years agoanv: Avoid sampling some MCS surfaces with clear
Nanley Chery [Tue, 26 Jan 2021 23:44:05 +0000 (15:44 -0800)]
anv: Avoid sampling some MCS surfaces with clear

Supposedly avoids GPU hangs in BF4. See HSD 1707282275 and 14013111325.

v2. Fix bug in WA implementation. (Sagar)

Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755>

3 years agoanv: Add clear_supported to anv_layout_to_aux_state
Nanley Chery [Tue, 26 Jan 2021 23:42:28 +0000 (15:42 -0800)]
anv: Add clear_supported to anv_layout_to_aux_state

This will be used for an MCS workaround.

Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755>

3 years agoradv: call nir_copy_prop() after load-store vectorization
Daniel Schürmann [Fri, 14 May 2021 13:33:02 +0000 (15:33 +0200)]
radv: call nir_copy_prop() after load-store vectorization

The load-store vectorizer can create a large amount
of unnecessary nir_op_vec and nir_op_mov instructions.
This prevents nir_opt_move from stalling to much and
potentially also helps other passes.

Closes: #4778
Fixes: 1958381c9ae15dc252bcab8612f39fdca45d4843 ('radv: Reorder some NIR optimizations in preparation for the I/O changes.')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10804>

3 years agoaco/ra: prevent underflow register for p_create_vector operands
Daniel Schürmann [Fri, 14 May 2021 09:29:33 +0000 (11:29 +0200)]
aco/ra: prevent underflow register for p_create_vector operands

It could happen that we tested negative out-of-range
registers for p_create_vector operands resulting in a crash.

Fixes: 8962510e38fbaff792f60bc17d46507bb77401ac ('aco/ra: Conservatively refactor get_reg_specified to use PhysRegInterval')
Closes: #4697
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10799>

3 years agoci/freedreno: Skip refract on a306 now that it hangchecks sometimes.
Emma Anholt [Thu, 13 May 2021 21:31:20 +0000 (14:31 -0700)]
ci/freedreno: Skip refract on a306 now that it hangchecks sometimes.

Not every MR, but several per day since I landed the apitrace switch which
increased trace replay resolution to 1080p.  Hopefully some day we can
tune the hangcheck to be less aggressive.

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

3 years agonir: Rename nir_is_per_vertex_io to nir_is_arrayed_io
Caio Marcelo de Oliveira Filho [Tue, 27 Apr 2021 21:49:40 +0000 (14:49 -0700)]
nir: Rename nir_is_per_vertex_io to nir_is_arrayed_io

VS outputs are "per vertex" but not the kind of I/O we want to match
with this helper.  Change to a name that covers the "arrayness"
required by the type.

Name inspired by the GLSL spec definition of arrayed I/O.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10493>

3 years agocompiler/nir: check whether var is an input in lower_fragcoord_wtrans
Gert Wollny [Sun, 2 May 2021 12:41:21 +0000 (14:41 +0200)]
compiler/nir: check whether var is an input in lower_fragcoord_wtrans

Otherwise the lowering pass might try to lower any other load from
a deref if its data.location value happens to be zero.

Fixes: 418c4c0d7d48a42f475df1ffb93b3a33763e7a4a
  compiler/nir: extend lower_fragcoord_wtrans to support VARYING_SLOT_POS

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

3 years agozink: emit some barriers out of renderpass where possible
Mike Blumenkrantz [Fri, 15 Jan 2021 18:21:09 +0000 (13:21 -0500)]
zink: emit some barriers out of renderpass where possible

when emitting barriers, we don't need to end the renderpass in some cases

this handles the case of emitting barriers for new resources which have
never before been accessed and thus do not require synchronization at a
specific point in the batch

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

3 years agozink: add flags for determining whether to update framebuffer and renderpass
Mike Blumenkrantz [Wed, 3 Mar 2021 20:56:14 +0000 (15:56 -0500)]
zink: add flags for determining whether to update framebuffer and renderpass

we can optimize restarting renderpasses here a little by only performing
lookups if states have actually changed

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

3 years agozink: add a flag for tracking/validating renderpass clears
Mike Blumenkrantz [Thu, 4 Mar 2021 14:26:13 +0000 (09:26 -0500)]
zink: add a flag for tracking/validating renderpass clears

we've been tracking which attachments are deferring clears but not
specifically the ones that are going to be cleared in a renderpass

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

3 years agozink: split out base renderpass begin into separate function
Mike Blumenkrantz [Wed, 3 Mar 2021 20:43:02 +0000 (15:43 -0500)]
zink: split out base renderpass begin into separate function

let fb setup and barriers and whatever be separate

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

3 years agoutil: tune signatures of generated enum operators
Tony Wasserka [Thu, 13 May 2021 10:04:11 +0000 (12:04 +0200)]
util: tune signatures of generated enum operators

This allows use of these operators in a constexpr context and silences
a clang -Wunused-function warning.

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

3 years agoutil: add support for defining bitwise operators on strongly typed enums
Tony Wasserka [Thu, 13 May 2021 09:21:16 +0000 (11:21 +0200)]
util: add support for defining bitwise operators on strongly typed enums

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

3 years agointel: Add 2 ADL-S pci-ids
Jordan Justen [Thu, 13 May 2021 00:01:52 +0000 (17:01 -0700)]
intel: Add 2 ADL-S pci-ids

Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10781>

3 years agodriconf: set vk_x11_strict_image_count for Metro: Exodus
Daniel Schürmann [Tue, 4 May 2021 13:30:50 +0000 (15:30 +0200)]
driconf: set vk_x11_strict_image_count for Metro: Exodus

Otherwise, the game crashes on startup under xwayland.

Closes: #4650
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10750>

3 years agoutil/queue: don't require a fence when adding a job
Mike Blumenkrantz [Sun, 9 May 2021 14:25:00 +0000 (10:25 -0400)]
util/queue: don't require a fence when adding a job

sometimes we just want to fire jobs off into the void and don't care
if or when they finish

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

3 years agopanfrost: Skip blit shader labelling if the buffer has no space
Icecream95 [Thu, 13 May 2021 21:11:00 +0000 (09:11 +1200)]
panfrost: Skip blit shader labelling if the buffer has no space

Fixes stack corruption in dEQP-GLES31.functional.draw_buffers_indexed.
random.max_implementation_draw_buffers.10

Fixes: 8ba2f9f6985 ("panfrost: Create a blitter library to replace the existing preload helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10792>

3 years agoanv: handle spirv parsing failure
Lionel Landwerlin [Thu, 13 May 2021 19:48:15 +0000 (22:48 +0300)]
anv: handle spirv parsing failure

v2: don't leak spec_entries

v3: Also switch to VK_ERROR_UNKNOWN when parsing fails

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10790>

3 years agointel/dev: Add device info for ADL GT2
Jordan Justen [Thu, 9 Jul 2020 09:51:07 +0000 (02:51 -0700)]
intel/dev: Add device info for ADL GT2

Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9465>

3 years agointel/isl: Add Wa_22011186057 to disable CCS on ADL GT2 A0
Jordan Justen [Thu, 10 Dec 2020 09:42:12 +0000 (01:42 -0800)]
intel/isl: Add Wa_22011186057 to disable CCS on ADL GT2 A0

Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9465>

3 years agoCI: Disable all Panfrost/AMD/Iris automatic jobs
Daniel Stone [Thu, 13 May 2021 22:19:35 +0000 (23:19 +0100)]
CI: Disable all Panfrost/AMD/Iris automatic jobs

The power in Cambridge is unstable; disable these jobs until it's back
clear.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10797>

3 years agozink: immediately return false when getting query result if it's not gonna happen
Mike Blumenkrantz [Thu, 13 May 2021 22:16:47 +0000 (18:16 -0400)]
zink: immediately return false when getting query result if it's not gonna happen

this is a small optimization for the no-wait case when unflushed usage
exists since it's impossible for a qbo update to happen instantly

no functionality will be fixed by this, it's just a very minor optimization

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

3 years agolavapipe: fix fencing when submitting multiple cmdbufs
Mike Blumenkrantz [Thu, 13 May 2021 22:14:51 +0000 (18:14 -0400)]
lavapipe: fix fencing when submitting multiple cmdbufs

a fence applies to all the submitted cmdbufs, so it's necessary to do
the flush which creates the user fence after all the cmdbufs have been
processed in order to avoid creating a fence that only applies to the
first cmdbuf

Fixes: b38879f8c5f ("vallium: initial import of the vulkan frontend")

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

3 years agozink: fix DrawParameters shader cap usage
Mike Blumenkrantz [Thu, 13 May 2021 18:36:19 +0000 (14:36 -0400)]
zink: fix DrawParameters shader cap usage

this is for vertex shaders and covers more than just baseinstance

Fixes: dcb9e4ddb4b ("zink: emit cap early")

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

3 years agozink: stop overwriting buffer map pointers for stream uploader
Mike Blumenkrantz [Thu, 13 May 2021 16:38:46 +0000 (12:38 -0400)]
zink: stop overwriting buffer map pointers for stream uploader

this breaks the driver!

the uploader always maps its own pointer, so modifying that at any
point just explodes things later

Fixes: d179c5d28e6 ("zink: implement threaded context")

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

3 years agointel/compiler: Clarify why VUE is recomputed by FS
Caio Marcelo de Oliveira Filho [Fri, 30 Apr 2021 08:00:51 +0000 (01:00 -0700)]
intel/compiler: Clarify why VUE is recomputed by FS

FS will get the last geometry VUE, but it still needs to recompute in
case the number of position slots assigned by geometry is larger than
one -- this happens when Primitive Replication is used.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10653>

3 years agoci/turnip: drop fail annotation for image.extend_operands_spirv1p4.*
Danylo Piliaiev [Thu, 13 May 2021 09:15:56 +0000 (12:15 +0300)]
ci/turnip: drop fail annotation for image.extend_operands_spirv1p4.*

They were fixed in
ed20e69b "vtn: Handle ZeroExtend/SignExtend image operands"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10783>

3 years agoci/turnip: drop fail annotation for float_control tests
Danylo Piliaiev [Thu, 13 May 2021 09:00:57 +0000 (12:00 +0300)]
ci/turnip: drop fail annotation for float_control tests

These tests are NotSupported and therefore cannot fail.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10783>

3 years agoanv: fix perf query pass with command buffer batching
Lionel Landwerlin [Sat, 17 Apr 2021 16:59:22 +0000 (19:59 +0300)]
anv: fix perf query pass with command buffer batching

We've only considered the perf query pool change previously. But we
also need to pay attention to the pass index.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0a7224f3ff7542 ("anv: group as many command buffers into a single execbuf")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10301>