platform/upstream/mesa.git
3 years agogallium/st: lower rectangle textures if not supported
Christian Gmeiner [Mon, 1 Feb 2021 10:48:02 +0000 (11:48 +0100)]
gallium/st: lower rectangle textures if not supported

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agogallium: add PIPE_CAP_TEXRECT
Christian Gmeiner [Mon, 1 Feb 2021 10:44:45 +0000 (11:44 +0100)]
gallium: add PIPE_CAP_TEXRECT

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agonir/lower_tex: wider usage of nir_tex_instr_src_index(..)
Christian Gmeiner [Thu, 11 Feb 2021 12:13:42 +0000 (13:13 +0100)]
nir/lower_tex: wider usage of nir_tex_instr_src_index(..)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Suggested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agonir/lower_tex: 'txs free' tex_rect lowering
Christian Gmeiner [Mon, 1 Feb 2021 10:13:19 +0000 (11:13 +0100)]
nir/lower_tex: 'txs free' tex_rect lowering

GPUs without native txs support (and without an emulation in sw)
can use this new lowering. Also it saves us from doing int/float
conversions.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agonir: add has_txs flag
Christian Gmeiner [Mon, 1 Feb 2021 10:05:48 +0000 (11:05 +0100)]
nir: add has_txs flag

Some nir lowerings might need to know if txs is supported by
the backend.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agonir: add load_texture_rect_scaling
Christian Gmeiner [Fri, 13 Nov 2020 09:35:38 +0000 (10:35 +0100)]
nir: add load_texture_rect_scaling

Will be used in a different form of lower_rect tex lowering.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>

3 years agoradv: add support for instruction timing with RGP
Samuel Pitoiset [Thu, 18 Feb 2021 10:23:19 +0000 (11:23 +0100)]
radv: add support for instruction timing with RGP

This is probably the most useful feature with SQTT/RGP.

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

3 years agoradv: add support for exporting pipelines with RGP
Samuel Pitoiset [Tue, 16 Feb 2021 13:09:20 +0000 (14:09 +0100)]
radv: add support for exporting pipelines with RGP

This is still experimental and only enabled with
RADV_THREAD_TRACE_PIPELINE to avoid breaking existing support.

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

3 years agoradv: store a pointer to the code in radv_shader_variant
Samuel Pitoiset [Tue, 16 Feb 2021 13:08:34 +0000 (14:08 +0100)]
radv: store a pointer to the code in radv_shader_variant

This will be used by SQTT to dump the disassembly.

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

3 years agoradv: Enable displayable DCC.
Bas Nieuwenhuizen [Mon, 26 Oct 2020 22:48:44 +0000 (23:48 +0100)]
radv: Enable displayable DCC.

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

3 years agoradv: Use ac_surface DCC settings for shareable images.
Bas Nieuwenhuizen [Mon, 26 Oct 2020 22:39:36 +0000 (23:39 +0100)]
radv: Use ac_surface DCC settings for shareable images.

On GFX10 the settings for displayable DCC are different than those
for normal texturing.

This is technically a slight pessimization as ac_surface does not
know about textures that don't have to be sampled. However, for color
surfaces this is a very unlikely situation as presumably even MSAA
images have to be resolved (potentially using texture HW).

So in practice this should be equal for everything except displayable DCC.

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

3 years agoradv: Add DCC info to the metadata.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 09:57:06 +0000 (11:57 +0200)]
radv: Add DCC info to the metadata.

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

3 years agoradv: Implement displayable DCC retiling.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 09:54:36 +0000 (11:54 +0200)]
radv: Implement displayable DCC retiling.

Straightforward implementation using the retile map from radeonsi.

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

3 years agoradv: Implement initialization of displayable DCC.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 01:32:19 +0000 (03:32 +0200)]
radv: Implement initialization of displayable DCC.

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

3 years agoamd/common: Add retile map size helper.
Bas Nieuwenhuizen [Fri, 19 Feb 2021 02:58:28 +0000 (03:58 +0100)]
amd/common: Add retile map size helper.

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

3 years agoradv: Use shared code for setting opaque metadata.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 01:18:25 +0000 (03:18 +0200)]
radv: Use shared code for setting opaque metadata.

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

3 years agoradv: Handle UMD metadata on import.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 00:20:41 +0000 (02:20 +0200)]
radv: Handle UMD metadata on import.

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

3 years agoamd/common: constify ac_surface_set_umd_metata.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 00:20:18 +0000 (02:20 +0200)]
amd/common: constify ac_surface_set_umd_metata.

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

3 years agoaco/lower_phis: fix all_preds_uniform with continue_or_break
Rhys Perry [Mon, 22 Feb 2021 15:05:32 +0000 (15:05 +0000)]
aco/lower_phis: fix all_preds_uniform with continue_or_break

Found in a Death Stranding shader with loop unrolling disabled.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 9a089baff1a ("aco: optimize boolean phis with uniform selections")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9193>

3 years agobroadcom/compiler: skip unnecessary unifa writes
Iago Toral Quiroga [Thu, 18 Feb 2021 07:32:13 +0000 (08:32 +0100)]
broadcom/compiler: skip unnecessary unifa writes

If a new UBO load happens to read exactly at the offset right after the
previous UBO load (something that is fairly common, for example when
reading a matrix), we can skip the unifa write (with its 3 delay slots)
and just continue to call ldunifa to continue reading consecutive addresses.

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

3 years agobroadcom/compiler: add a constant alu optimization pass
Iago Toral Quiroga [Wed, 17 Feb 2021 10:17:25 +0000 (11:17 +0100)]
broadcom/compiler: add a constant alu optimization pass

Currently this is useful to clean up after DCEing leading ldunifa
instructions, but it can be expanded to handle more cases which
may allow to simplify the compiler code in places where we have
been trying to optimize manually for similar cases.

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

3 years agobroadcom/compiler: remove unused leading ldunifa
Iago Toral Quiroga [Tue, 16 Feb 2021 11:08:05 +0000 (12:08 +0100)]
broadcom/compiler: remove unused leading ldunifa

This requires that we go back to the unifa write and update the address
to jump over the unused leading component.

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

3 years agobroadcom/compiler: allow dead code elimination of unused trailing ldunifa
Iago Toral Quiroga [Tue, 16 Feb 2021 10:04:44 +0000 (11:04 +0100)]
broadcom/compiler: allow dead code elimination of unused trailing ldunifa

If a ldunifa is the last in a sequence and is not used, we can safely
eliminate it.

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

3 years agobroadcom/compiler: fix ldunif optimization
Iago Toral Quiroga [Fri, 19 Feb 2021 10:08:36 +0000 (11:08 +0100)]
broadcom/compiler: fix ldunif optimization

When we look back for a previous uniform definition we want to
start looking from the current position of the cursor, not the
end of the current block. The latter only works when translating
from NIR, since in that case both always match, but any optimization
pass may rewrite code and emit uniforms at any place in the middle of
the program.

Also, ntq_store_dest expects result to be written by the last instruction
to handle the case where it is stored to a NIR register. That won't be
the case if the result comes from an optimized uniform, so in that case
we need to insert a MOV, like we do in non-uniform control flow.

v2: fix ntq_store_dest for optimized uniforms.

Fixes: 14af7b3085 ('broadcom/compiler: don't emit redundant ldunif')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128>

3 years agovulkan: Use typed outarray API
James Park [Wed, 3 Feb 2021 18:29:26 +0000 (10:29 -0800)]
vulkan: Use typed outarray API

MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208>

3 years agomeson/llvm: add native for gallium swrast
Dave Airlie [Mon, 22 Feb 2021 01:08:45 +0000 (11:08 +1000)]
meson/llvm: add native for gallium swrast

If we are building llvmpipe and lavapipe we want native in this
list.

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

3 years agolavapipe: fix icd generation for windows
Dave Airlie [Mon, 22 Feb 2021 02:01:59 +0000 (18:01 -0800)]
lavapipe: fix icd generation for windows

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

3 years agolavapipe: add dll definition file instead of using PUBLIC
Dave Airlie [Mon, 22 Feb 2021 01:27:20 +0000 (17:27 -0800)]
lavapipe: add dll definition file instead of using PUBLIC

This avoids conflicts with the definitions in vk_icd.h

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

3 years agolavapipe: fix msvc initialiser
Dave Airlie [Mon, 22 Feb 2021 01:14:05 +0000 (11:14 +1000)]
lavapipe: fix msvc initialiser

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

3 years agolavapipe: use the common icd generator
Dave Airlie [Tue, 16 Feb 2021 03:56:54 +0000 (13:56 +1000)]
lavapipe: use the common icd generator

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

3 years agozink: update ci results
Mike Blumenkrantz [Tue, 23 Feb 2021 03:50:52 +0000 (22:50 -0500)]
zink: update ci results

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

3 years agozink: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in transfer_map for buffers
Mike Blumenkrantz [Sun, 6 Sep 2020 15:57:06 +0000 (11:57 -0400)]
zink: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in transfer_map for buffers

when discarding the whole resource on an unused resource, we can deinit the buffer
range here

in the future, ideally we should be doing something like creating a new vk buffer/image
entirely here and demoting the existing one to a queue that destroys/caches it when
the batch finishes in order to avoid fencing

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

3 years agozink: change some transfer_map cases of waiting on cs batch to flushing cs
Mike Blumenkrantz [Sun, 6 Sep 2020 15:08:33 +0000 (11:08 -0400)]
zink: change some transfer_map cases of waiting on cs batch to flushing cs

we don't actually have to stall here, we just have to make sure the cs batch
is submitted before the subsequent buffer copy command goes into a gfx
batch in order to preserve the ordering

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

3 years agozink: only wait on last write-batch for resources during transfer_map
Mike Blumenkrantz [Fri, 4 Sep 2020 16:08:18 +0000 (12:08 -0400)]
zink: only wait on last write-batch for resources during transfer_map

if we need to sync a resource for read-only mapping, we only need to wait on
the fence that was last flagged as having writes to the resource, not batches
that may have reads, as reads don't affect memory coherency

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

3 years agozink: beef up zink_transfer_flush_region
Mike Blumenkrantz [Fri, 4 Sep 2020 13:41:30 +0000 (09:41 -0400)]
zink: beef up zink_transfer_flush_region

this now takes over from previous call sites in zink_transfer_unmap

we add a flush here if we had pending usage to ensure that the resource
gets properly synced

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

3 years agozink: simplify barrier usage
Mike Blumenkrantz [Tue, 15 Sep 2020 22:26:39 +0000 (18:26 -0400)]
zink: simplify barrier usage

this simplifies the barrier helper callsites as we no longer need
to check whether a barrier is needed beforehand in order to avoid potentially
ending a renderpass too early

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

3 years agozink: only reset pipeline hash conditionally when updating fb state
Mike Blumenkrantz [Fri, 18 Sep 2020 15:46:55 +0000 (11:46 -0400)]
zink: only reset pipeline hash conditionally when updating fb state

if we aren't changing anything here then we don't need to update the pipeline

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

3 years agozink: move gfx pipeline creation closer to the bind point
Mike Blumenkrantz [Wed, 16 Sep 2020 18:49:12 +0000 (14:49 -0400)]
zink: move gfx pipeline creation closer to the bind point

ensure that the renderpass has already been started by this point so
we have a valid object

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

3 years agozink/ci: disable arb_timer_query tests
Dave Airlie [Tue, 23 Feb 2021 00:33:24 +0000 (10:33 +1000)]
zink/ci: disable arb_timer_query tests

These are going to be flaky in CI so don't bother

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

3 years agozink: rename 'has_draw' flag on batches and set it when the batch is used
Mike Blumenkrantz [Tue, 29 Sep 2020 19:05:28 +0000 (15:05 -0400)]
zink: rename 'has_draw' flag on batches and set it when the batch is used

this lets us add some tracking later for handling no-op fencing

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

3 years agozink: destroy renderpass objects on context destroy
Mike Blumenkrantz [Sun, 21 Feb 2021 17:07:56 +0000 (12:07 -0500)]
zink: destroy renderpass objects on context destroy

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

3 years agozink/ci: update results for GL 3.3 testing enables
Dave Airlie [Mon, 22 Feb 2021 23:38:55 +0000 (09:38 +1000)]
zink/ci: update results for GL 3.3 testing enables

There are some new crashes/fails but I don't think the lavapipe
change is at fault for those.

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

3 years agolavapipe: add calibrated timestamp support
Dave Airlie [Mon, 8 Feb 2021 00:58:39 +0000 (10:58 +1000)]
lavapipe: add calibrated timestamp support

This is a bit of a lie, but it's enough to get zink support
for timer queries to work.

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

3 years agoci: Move the piglit expectations lists to the per-driver CI dirs.
Eric Anholt [Fri, 19 Feb 2021 17:45:29 +0000 (09:45 -0800)]
ci: Move the piglit expectations lists to the per-driver CI dirs.

Now changing piglit expectations won't retest everyone else's drivers.

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

3 years agoci: Move the dEQP and traces expectations to the per-driver CI dirs.
Eric Anholt [Fri, 19 Feb 2021 17:31:38 +0000 (09:31 -0800)]
ci: Move the dEQP and traces expectations to the per-driver CI dirs.

This means less custom test-source-dep stuff for these drivers, though it
means that touching the CI expects files will cause a bit more retesting:

- broadcom drivers retest as a group (but Igalia requested that
  organization of CI files)
- radv+radeonsi retest as a group
- lvp+llvmpipe retest as a group

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

3 years agonir/range_analysis: Handle vectors better in ssa_def_bits_used
Ian Romanick [Thu, 18 Feb 2021 03:40:07 +0000 (19:40 -0800)]
nir/range_analysis: Handle vectors better in ssa_def_bits_used

If a query is made of a vector ssa_def (possibly from an intermediate
result), return all_bits.  If a constant source is a vector, swizzle
the correct component.

Unit tests were added for the constant vector cases.  I don't see a
great way to make unit tests for the other cases.

v2: Add a FINIHSME comment about u16vec2 hardware.

Fixes: 96303a59eae ("nir: Add some range analysis for used bits")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9123>

3 years agonir/range-analysis: C++ linkage
Ian Romanick [Thu, 13 Feb 2020 03:07:35 +0000 (19:07 -0800)]
nir/range-analysis: C++ linkage

Fixes: 96303a59eae ("nir: Add some range analysis for used bits")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9123>

3 years agozink/ci: update results now that we are testing zink/lavapipe
Dave Airlie [Mon, 22 Feb 2021 06:24:07 +0000 (16:24 +1000)]
zink/ci: update results now that we are testing zink/lavapipe

Once the extension fix is merged the CI results change appreciably.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9185>

3 years agozink: use extensioned draw indirect functions.
Dave Airlie [Mon, 22 Feb 2021 05:50:06 +0000 (15:50 +1000)]
zink: use extensioned draw indirect functions.

The code was using the core versions, but for vulkan 1.0 at
least the extension versions are what is required to be asked for.

This fixes zink loading on lavapipe, and blows up the CI.

v2: Use LOCAL device extension variant (zmike)

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9185>

3 years agoanv: don't wait for completion of work on vkQueuePresent()
Lionel Landwerlin [Mon, 22 Feb 2021 16:41:24 +0000 (18:41 +0200)]
anv: don't wait for completion of work on vkQueuePresent()

Another mistake which is that we don't use the right wait API.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 829699ba632b2b ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9188>

3 years agoanv: reset binary syncobj to be signaled before submission
Lionel Landwerlin [Mon, 22 Feb 2021 11:57:37 +0000 (13:57 +0200)]
anv: reset binary syncobj to be signaled before submission

Before we introduced the submission thread in 829699ba632b2b, once we
returned from vkQueueSubmit, all signaled syncobj would have a
i915_request/dma-fence waiting to be signaled by some work that would
submitted to HW by i915.

After this submission thread that is no longer the case. We added a
few checks in places like vkQueuePresentKHR() to wait for the binary
semaphores to materialize before we would hand things over to the WSI
code.

Unfortunately 829699ba632b2b forgot to reset the signaled binary
semaphore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 829699ba632b2b ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9188>

3 years agoAdjust dylib compatibility versions to match what was set by mesa-18.3's autotools...
Jeremy Huddleston Sequoia [Sat, 30 Jan 2021 21:10:12 +0000 (13:10 -0800)]
Adjust dylib compatibility versions to match what was set by mesa-18.3's autotools-based builds

Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4113
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8796>

3 years agoglx: proposed fix for setSwapInterval
Dave Airlie [Mon, 22 Feb 2021 05:57:01 +0000 (15:57 +1000)]
glx: proposed fix for setSwapInterval

When mesa gets a DRI2 1.1 connection (as experienced with
vmwware DDX) we don't get a pointer for this.

Don't explode just keep going.

Fixes: 60ebeb4608a8 ("glx: Implement GLX_EXT_swap_control for DRI2 and DRI3")
Reviewed-by: Adam Jackson <ajaX@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9184>

3 years agor600/sfn: Base instr lowering class on nir_lower_instruction code
Gert Wollny [Sat, 20 Feb 2021 09:58:36 +0000 (10:58 +0100)]
r600/sfn: Base instr lowering class on nir_lower_instruction code

Now that the lowering pass has been update there is no need to
duplicate the code to scan the shader.

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

3 years agor600/sfn: remove duplicate barriers
Gert Wollny [Mon, 8 Feb 2021 16:32:00 +0000 (17:32 +0100)]
r600/sfn: remove duplicate barriers

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

3 years agor600/sfn: Fix indirect_file flag for IMAGES
Gert Wollny [Mon, 8 Feb 2021 08:37:28 +0000 (09:37 +0100)]
r600/sfn: Fix indirect_file flag for IMAGES

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

3 years agor600/sfn: Handle memory_barrier_atomic_counters
Gert Wollny [Fri, 5 Feb 2021 16:11:52 +0000 (17:11 +0100)]
r600/sfn: Handle memory_barrier_atomic_counters

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

3 years agoandroid: util/fossilize_db: add missing sources to Makefile.sources
Mauro Rossi [Sun, 21 Feb 2021 21:16:13 +0000 (22:16 +0100)]
android: util/fossilize_db: add missing sources to Makefile.sources

Fixes the following building errors:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/i915_dri_intermediates/LINKED/i915_dri.so
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.anv_intermediates/LINKED/vulkan.anv.so
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so
ld.lld: error: undefined symbol: foz_destroy
>>> referenced by disk_cache.c:237 (external/mesa/src/util/disk_cache.c:237)
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)

Fixes: eca6bb9540d8 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marijn Suijten <marijns95@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9178>

3 years agoci/a5xx: Increase our dEQP GLES3 fraction by 4x.
Eric Anholt [Thu, 18 Feb 2021 20:28:27 +0000 (12:28 -0800)]
ci/a5xx: Increase our dEQP GLES3 fraction by 4x.

Now that we've got SMP, we can get a lot more of this test suite covered
in our 10-minute job window.

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

3 years agoci/a5xx: Update the piglit expectations.
Eric Anholt [Thu, 18 Feb 2021 20:25:27 +0000 (12:25 -0800)]
ci/a5xx: Update the piglit expectations.

Now with -j4 in place, we can actually complete a manual piglit job in
less than an hour! (barely)

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

3 years agoci/bare-metal: Use an upstream kernel for db820c.
Eric Anholt [Fri, 5 Feb 2021 00:42:51 +0000 (16:42 -0800)]
ci/bare-metal: Use an upstream kernel for db820c.

On top of the last kernel tree I added a couple of DT changes for db820c
from the qcom landing tree necessary for bringing up the GPU, and a fix to
my OOB cleanups fro cheza.  I also enabled the CPU clock driver for db820c
so we can turn on SMP and not leave jobs stranded on a 19Mhz CPU or whatever.

This causes us to need a bit of updating of our TF expectations since the
order of jobs changes a bit.

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

3 years agoci/freedreno: Remove stray BM_DTB definition.
Eric Anholt [Fri, 5 Feb 2021 00:41:43 +0000 (16:41 -0800)]
ci/freedreno: Remove stray BM_DTB definition.

It's unused -- cheza uses an image with kernel+dtb glued together, and
this var does nothing (which is good, given that it was pointing to
db820c.

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

3 years agoci/freedreno: Fix a5xx piglit runs.
Eric Anholt [Fri, 5 Feb 2021 00:06:44 +0000 (16:06 -0800)]
ci/freedreno: Fix a5xx piglit runs.

I missed this regression in the "start using Xorg" branch since the piglit
runs are manual.  I made the piglit runs accidentally require a core
context, which a5xx can't do (it's only GL 3.1).

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

3 years agopan/bi: Do copyprop in linear-time
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:21:43 +0000 (16:21 -0500)]
pan/bi: Do copyprop in linear-time

Per discussion with Daniel Schürmann on IRC about the joys of SSA form
and why you don't actually need use-def chains. Indeed, I didn't. No
shader-db changes, time difference in shader-db is neglible since the
win from this is particularly for large shaders.

Total runtime of
dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.std430_instance_array
reduced from 1.04s to 0.77s (25%)

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

3 years agopan/bi: Remove unused definitions
Alyssa Rosenzweig [Fri, 19 Feb 2021 15:45:57 +0000 (10:45 -0500)]
pan/bi: Remove unused definitions

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

3 years agopan/bi: Adapt builder to dest count
Alyssa Rosenzweig [Thu, 18 Feb 2021 19:58:50 +0000 (14:58 -0500)]
pan/bi: Adapt builder to dest count

If there are no destinations, don't produce a _to version, and let the
bare version return the bi_instr.

If there are multiple destinations, take each in the _to version and
don't produce a bare version.

Both cares are probably what you wanted anyway.

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

3 years agopan/bi: Annotate instructions by destination count
Alyssa Rosenzweig [Thu, 18 Feb 2021 19:15:02 +0000 (14:15 -0500)]
pan/bi: Annotate instructions by destination count

Allows for better builders.

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

3 years agopan/bi: Allow spilling with multiple destinations
Alyssa Rosenzweig [Fri, 19 Feb 2021 13:56:17 +0000 (08:56 -0500)]
pan/bi: Allow spilling with multiple destinations

Now that we fixed this.

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

3 years agopan/bi: Make bi_writemask take a destination
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:56:16 +0000 (16:56 -0500)]
pan/bi: Make bi_writemask take a destination

Assuming it's only the first destination breaks assumptions across the
compiler. Add a destination source and fix up the many corresponding
issues. Nothing to backport as far as I understand since multidest
instruction are new.

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

3 years agopan/bi: Mark DISCARD as having side effects
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:28:52 +0000 (09:28 -0500)]
pan/bi: Mark DISCARD as having side effects

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

3 years agopan/bi: Mark branches as having side effects
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:17:48 +0000 (09:17 -0500)]
pan/bi: Mark branches as having side effects

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

3 years agopan/bi: Inline `bytemask of read components`
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:26:02 +0000 (16:26 -0500)]
pan/bi: Inline `bytemask of read components`

Only used in one place (and should never be used elsewhere -- even this
use is questionable). By inlining we avoid O(N^2) behaviour on the
number of sources in liveness updates.

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

3 years agopan/bi: Reduce liveness calculations in DCE
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:11:38 +0000 (16:11 -0500)]
pan/bi: Reduce liveness calculations in DCE

Forward port of fc06b8b7 ("pan/mdg: Optimize liveness computation in
DCE")

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

3 years agopan/bi: Use nir_opt_sink/move for constants
Alyssa Rosenzweig [Thu, 18 Feb 2021 20:56:43 +0000 (15:56 -0500)]
pan/bi: Use nir_opt_sink/move for constants

Fixes excessive (and failing) spilling in dEQP-GLES31.functional.ssbo.layout.*

shader-db results are a toss up (I suspect we'd see better results if we
tracked register pressure directly):

total instructions in shared programs: 161377 -> 161377 (0.00%)

total nops in shared programs: 121159 -> 121203 (0.04%)
nops in affected programs: 1839 -> 1883 (2.39%)
Nops are HURT.

total clauses in shared programs: 31604 -> 31606 (<.01%)
clauses in affected programs: 38 -> 40 (5.26%)
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 130847 -> 130845 (<.01%)
quadwords in affected programs: 1246 -> 1244 (-0.16%)
Inconclusive result (value mean confidence interval includes 0).

total loops in shared programs: 18 -> 18 (0.00%)
total spills in shared programs: 705 -> 705 (0.00%)
total fills in shared programs: 1645 -> 1645 (0.00%)

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

3 years agopanfrost: Don't advertise OES_copy_image
Alyssa Rosenzweig [Fri, 19 Feb 2021 20:58:16 +0000 (15:58 -0500)]
panfrost: Don't advertise OES_copy_image

We don't support it yet.

Fixes: 61d3ae6e0bd ("panfrost: Initial stub for Panfrost driver")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>

3 years agopanfrost: Fix typo in midgard.xml
Alyssa Rosenzweig [Fri, 19 Feb 2021 19:45:39 +0000 (14:45 -0500)]
panfrost: Fix typo in midgard.xml

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

3 years agopanfrost: Reinterpret format for reload blits
Alyssa Rosenzweig [Fri, 19 Feb 2021 19:08:42 +0000 (14:08 -0500)]
panfrost: Reinterpret format for reload blits

Fixes dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32ui_rgb10_a2.texture2d_to_texture2d

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

3 years agopanfrost: Fix UNORM 16 rendering
Alyssa Rosenzweig [Fri, 19 Feb 2021 18:38:57 +0000 (13:38 -0500)]
panfrost: Fix UNORM 16 rendering

fp16 loses precision.

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

3 years agopanfrost: Hide MSAA 8x/16x support
Alyssa Rosenzweig [Fri, 19 Feb 2021 17:44:50 +0000 (12:44 -0500)]
panfrost: Hide MSAA 8x/16x support

dEQP-GLES31.functional.texture.multisample.samples_16.sample_position is
failing on Bifrost, and we already weren't advertising on Midgard. Until
someone gets spare cycles to debug all the problems, keep it hidden
behind a debug flag to avoid introducing bugs.

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

3 years agopanfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT
Alyssa Rosenzweig [Fri, 19 Feb 2021 16:51:16 +0000 (11:51 -0500)]
panfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT

The blob advertises 64 for this, so let's use the same value. Small
alignments are observed to raise an IMPRECISE_FAULT at least on Bifrost.
As a bonus this forces cache line alignment which will help perf. Fixes

dEQP-GLES31.functional.texture.texture_buffer.render.as_vertex_texture.offset_1_alignments

Fixes: 5f7bafa316f ("panfrost: Enable ARB_texture_buffer_object")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>

3 years agopanfrost: Fix NULL deref in pan_sfbd
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:58:33 +0000 (09:58 -0500)]
panfrost: Fix NULL deref in pan_sfbd

The last of the nr_cbufs audit changes.

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

3 years agopanfrost: Fix NULL derefs in pan_cmdstream.c
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:57:26 +0000 (09:57 -0500)]
panfrost: Fix NULL derefs in pan_cmdstream.c

Auditing nr_cbufs. Note we have to augment the blending logic a bit to
use the same 'no blend' case for missing RTs as we do for depth-only
passes.

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

3 years agopanfrost: Fix NULL deref in pan_mfbd.c
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:45:30 +0000 (09:45 -0500)]
panfrost: Fix NULL deref in pan_mfbd.c

Auditing all uses of nr_cbufs

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

3 years agopanfrost: Remove redundant NULL check
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:41:15 +0000 (09:41 -0500)]
panfrost: Remove redundant NULL check

Already checked in the callee, no need to check in the caller.

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

3 years agopanfrost: Fix NULL dereference adding cbuf to batch
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:39:07 +0000 (09:39 -0500)]
panfrost: Fix NULL dereference adding cbuf to batch

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

3 years agopanfrost: Fix infinite loop spilling
Alyssa Rosenzweig [Fri, 19 Feb 2021 13:58:02 +0000 (08:58 -0500)]
panfrost: Fix infinite loop spilling

At least this way failed RA will crash (by having no spill node to pick)
instead? Seen in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.21 on
Bifrost.

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

3 years agopan/bi: Fix elimination of repeated branches
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:54:30 +0000 (13:54 -0500)]
pan/bi: Fix elimination of repeated branches

How many times can I break such a small pass?

Fixes: a805d999c0e ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137>

3 years agopan/bi: Optimize out redundant jumps to #0x0
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:53:33 +0000 (13:53 -0500)]
pan/bi: Optimize out redundant jumps to #0x0

If it's the last instruction, that's silly.

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

3 years agopan/bi: Fix more jumps to terminal blocks
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:46:41 +0000 (13:46 -0500)]
pan/bi: Fix more jumps to terminal blocks

Here's another edge case: there could be instructions in the last block
after NIR->BIR but they could be optimized out by backend DCE, causing
the block to become a terminal block.

Noticed while toying with geometry shaders.

Fixes: a805d999c0e ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137>

3 years agoac/rgp: fill CPU info by parsing /proc/cpuinfo
Samuel Pitoiset [Thu, 18 Feb 2021 16:06:11 +0000 (17:06 +0100)]
ac/rgp: fill CPU info by parsing /proc/cpuinfo

The current CPU clock speed can't be retrieved from CPUID, so I think
parsing /proc/cpuinfo for all information is fine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9133>

3 years agozink: set conformant ubo/ssbo size limits
Mike Blumenkrantz [Sun, 21 Feb 2021 17:04:20 +0000 (12:04 -0500)]
zink: set conformant ubo/ssbo size limits

these caps correspond to descriptor binding limits provided by vulkan drivers

fixes KHR-GL46.shader_storage_buffer_object.basic-max

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

3 years agozink: add available|visible masks to all barriers in ntv
Mike Blumenkrantz [Mon, 15 Feb 2021 18:19:51 +0000 (13:19 -0500)]
zink: add available|visible masks to all barriers in ntv

we shouldn't need to consider whether these get added since we always want them

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9055>

3 years agomesa: update oudated members for debug and check
chenli [Thu, 3 Dec 2020 11:49:56 +0000 (19:49 +0800)]
mesa: update oudated members for debug and check

Signed-off-by: Chen Li <chenli@uniontech.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7896>

3 years agozink: always set VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT for non-staging resources
Mike Blumenkrantz [Tue, 15 Sep 2020 18:57:45 +0000 (14:57 -0400)]
zink: always set VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT for non-staging resources

this is weird but sometimes gallium makes resources with bind==0, which will
crash later if we don't add this

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

3 years agozink: remove 'scissors' member of viewport state
Mike Blumenkrantz [Wed, 16 Sep 2020 18:19:35 +0000 (14:19 -0400)]
zink: remove 'scissors' member of viewport state

this is the vulkan-transformed value, but we can just apply it at draw
time and save ourselves some memory

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

3 years agozink: handle scissor+viewport states dynamically if extension is available
Mike Blumenkrantz [Wed, 16 Sep 2020 18:10:00 +0000 (14:10 -0400)]
zink: handle scissor+viewport states dynamically if extension is available

this is a huge perf win since it means we don't have to create a new pipeline
every time this state changes

also we can now move the viewport state back to zink_context since that's the
real value we're using and the pipeline state value is just for the hash

ref mesa/mesa#3359

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

3 years agozink: always use 64bit flag for query results
Mike Blumenkrantz [Thu, 10 Sep 2020 15:30:49 +0000 (11:30 -0400)]
zink: always use 64bit flag for query results

this is just much, much easier to handle, and it also lets us fix some
lingering bugs with query handling that led to inconsistent results

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

3 years agozink: improve batch flushing for queries when compute batches are involved
Mike Blumenkrantz [Wed, 9 Sep 2020 21:11:00 +0000 (17:11 -0400)]
zink: improve batch flushing for queries when compute batches are involved

we can reduce some flushing here by only doing a flush if we're about to
copy a compute batch resource that has gfx batch access pending

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

3 years agozink: better handling for availability queries on qbos when query/resource is busy
Mike Blumenkrantz [Wed, 9 Sep 2020 18:39:47 +0000 (14:39 -0400)]
zink: better handling for availability queries on qbos when query/resource is busy

in this case, we can queue a result copy onto a staging buffer and then queue
a copy from staging onto our real buffer to avoid stalling

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

3 years agozink: simplify some of the qbo direct buffer write code
Mike Blumenkrantz [Wed, 9 Sep 2020 18:38:12 +0000 (14:38 -0400)]
zink: simplify some of the qbo direct buffer write code

no functional changes

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