platform/upstream/mesa.git
3 years agofreedreno/a5xx: Remove ppgtt hack
Erik Faye-Lund [Wed, 5 May 2021 09:30:27 +0000 (11:30 +0200)]
freedreno/a5xx: Remove ppgtt hack

This should no longer be needed after !7773, which fixes the issue that
lead to the crash. Sorry for not fixing the issue earlier ;)

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

3 years agoaux/cso_cache: add handling for save/restore of compute states
Mike Blumenkrantz [Sat, 24 Apr 2021 17:18:02 +0000 (13:18 -0400)]
aux/cso_cache: add handling for save/restore of compute states

just shader and samplers for now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10616>

3 years agopanfrost: Fix format definitions to match gallium expectations
Boris Brezillon [Tue, 4 May 2021 06:44:35 +0000 (08:44 +0200)]
panfrost: Fix format definitions to match gallium expectations

Gallium wants the depth or stencil component replicated on all .XYZW.
That's easily done on pre-v7 since we can forge all the swizzles we
want, but Bifrost v7 only supports a few combinations, so we have to
combine the user swizzle with our own 'replicate' swizzle to make it
work. Note that v7 has a trick to make border color work when the GRBA
order is chosen: they apply the red border color to the green component.

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

3 years agoandroid: pan/bi: add bi_opt_constant_fold.c to Makefile.sources
Mauro Rossi [Mon, 3 May 2021 20:50:26 +0000 (22:50 +0200)]
android: pan/bi: add bi_opt_constant_fold.c to Makefile.sources

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: bi_opt_constant_fold
>>> referenced by bifrost_compile.c:3105 (external/mesa/src/panfrost/bifrost/bifrost_compile.c:3105)

Fixes: 1cb11969bec0 ("pan/bi: Add simple constant folding pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10603>

3 years agoanv: Allow storage on all formats that support typed writes
Jason Ekstrand [Tue, 4 May 2021 15:40:55 +0000 (10:40 -0500)]
anv: Allow storage on all formats that support typed writes

In particular, this gives us B8G8R8A8_UNORM storage support which is
useful for writing WSI images from compute shaders.  These formats can
only be accessed in a spec-compliant way by decorating the variable
NonReadable in the SPIR-V (writeonly in GLSL).  If the client doesn't so
decorate the variable, it'll get the null surface state where reads
return 0 and writes are ignored.

Tested-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10624>

3 years agoisl: document format fields
Lionel Landwerlin [Tue, 4 May 2021 18:43:50 +0000 (21:43 +0300)]
isl: document format fields

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

3 years agoanv: Check offset instead of alloc_size for freeing surface states
Jason Ekstrand [Tue, 4 May 2021 18:30:35 +0000 (13:30 -0500)]
anv: Check offset instead of alloc_size for freeing surface states

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

3 years agogallium/u_vbuf: avoid dereferencing NULL pointer
Erik Faye-Lund [Tue, 4 May 2021 11:04:48 +0000 (13:04 +0200)]
gallium/u_vbuf: avoid dereferencing NULL pointer

When I last time fixed this, I missed that continuing here would make us
leak pointers in the translate state, which is what made this avoid a
crash in the first place.

That's not great, we need to set *some* pointer in this case. The
obvious option would be NULL, but that means that the translate-code
also needs to support NULL-pointers here.

Instead, let's point to a small, static buffer that contains enough
zero-data for the largest possible vertex attribute. This avoids having
to add more NULL-checks.

Fixes: a8e8204b186 ("gallium/u_vbuf: support NULL-resources")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7773>

3 years agoradeon/vcn: Use the correct pitch for chroma surface.
Bas Nieuwenhuizen [Tue, 4 May 2021 23:34:42 +0000 (23:34 +0000)]
radeon/vcn: Use the correct pitch for chroma surface.

The pitch of the chroma plane isn't necessarily half that of the
luma plane, as tiling (and presumably even linear) swizzle modes
apply some alignment.

Fixes: 35e25ea1d07 ("ac/surface: allow non-DCC modifiers for YUV on GFX9+")
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10638>

3 years agoturnip: implement VK_KHR_vulkan_memory_model
Danylo Piliaiev [Mon, 15 Feb 2021 11:51:54 +0000 (13:51 +0200)]
turnip: implement VK_KHR_vulkan_memory_model

No handling of Acquire/Release because at the moment scheduler
works as if any barrier is Acq+Rel.

Instead of removing scoped_barrier with scope/mode that for TCS
corresponds to a control_barrier or a memory_barrier_tcs_patch in
ir3_nir_lower_tess_ctrl - remove them in emit_intrinsic_barrier.
And do the same for memory_barrier_tcs_patch and control_barrier.
While in any case hw fence/barrier shouldn't be emitted for them,
they still affect ordering of stores, and in feature ir3 backend
may want to have that information.

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

3 years agoir3: update bar/fence bits in accordance to blob
Danylo Piliaiev [Fri, 30 Apr 2021 11:12:03 +0000 (14:12 +0300)]
ir3: update bar/fence bits in accordance to blob

On a6xx blob uses .l rather differently from a5xx.

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

3 years agoir3: memory_barrier also controls shared memory access order
Danylo Piliaiev [Mon, 15 Feb 2021 13:53:46 +0000 (15:53 +0200)]
ir3: memory_barrier also controls shared memory access order

nir_intrinsic_memory_barrier has the same semantic as memoryBarrier()
in GLSL, which is:

GLSL 4.60, 4.10. "Memory Qualifiers":
 "The built-in function memoryBarrier() can be used if needed to
 guarantee the completion and relative ordering of memory accesses
 performed by a single shader invocation."

GLSL 4.60, 8.17. "Shader Memory Control Functions":
 "The built-in functions memoryBarrier() and groupMemoryBarrier() wait
 for the completion of accesses to all of the above variable types."

Fixes tests:
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.image.guard_nonlocal.workgroup.comp
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_nonlocal.workgroup.guard_local.image.comp

Fixes: 819a613a ("freedreno/ir3: moar better scheduler")

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

3 years agodocs: do not generate redirects on error
Erik Faye-Lund [Thu, 22 Apr 2021 11:46:41 +0000 (13:46 +0200)]
docs: do not generate redirects on error

The build-finished event is also triggered when there's an error. I
somehow got the second argument wrong, and ended up ignoring the case.
This can lead to new exceptions being thrown due to missing files, that
ends up hiding the real problem.

Fixes: 64a4ba9e1ce ("docs: add an extension to generate redirects")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10407>

3 years agozink: only emit ImageBuffer cap if needed
Erik Faye-Lund [Wed, 21 Apr 2021 10:55:12 +0000 (12:55 +0200)]
zink: only emit ImageBuffer cap if needed

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

3 years agozink: emit cap early
Erik Faye-Lund [Wed, 21 Apr 2021 10:50:24 +0000 (12:50 +0200)]
zink: emit cap early

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

3 years agozink: emit sample-shading cap early
Erik Faye-Lund [Wed, 21 Apr 2021 10:36:28 +0000 (12:36 +0200)]
zink: emit sample-shading cap early

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

3 years agozink: remove needless shader-info from context
Erik Faye-Lund [Wed, 21 Apr 2021 10:30:54 +0000 (12:30 +0200)]
zink: remove needless shader-info from context

There's no longer any code reading this, so let's get rid of it. It
always rubbed me a bit the wrong way, because this repeated some
information already present in the context.

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

3 years agozink: emit cap early
Erik Faye-Lund [Wed, 21 Apr 2021 10:30:23 +0000 (12:30 +0200)]
zink: emit cap early

We have enough information to emit this cap early, so let's do that.

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

3 years agozink: do not check for varying output for fragment shaders
Erik Faye-Lund [Wed, 21 Apr 2021 10:23:52 +0000 (12:23 +0200)]
zink: do not check for varying output for fragment shaders

This will make us emit these caps needlessly, possibly on implementations
not supporting the enabling features.

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

3 years agozink: always enable fixed shader-caps
Erik Faye-Lund [Wed, 21 Apr 2021 10:09:45 +0000 (12:09 +0200)]
zink: always enable fixed shader-caps

This is required for a bunch of stuff that can occur in any Vulkan
shader stage, not just these few. So let's always emit this cap.

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

3 years agointel/decoder: add gen4/5 geometry state decode
Dave Airlie [Mon, 22 Mar 2021 00:03:52 +0000 (10:03 +1000)]
intel/decoder: add gen4/5 geometry state decode

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

3 years agointel/decoder: fixup batch decoder for binding tables on gen4/5
Dave Airlie [Thu, 31 Dec 2020 02:14:58 +0000 (12:14 +1000)]
intel/decoder: fixup batch decoder for binding tables on gen4/5

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

3 years agoradv: expose 2/3rd of total memory as VRAM and 1/3rd as GTT on APUs
Samuel Pitoiset [Tue, 23 Mar 2021 14:43:28 +0000 (14:43 +0000)]
radv: expose 2/3rd of total memory as VRAM and 1/3rd as GTT on APUs

A bunch of games complain when the VRAM size is too small. The most
compatible solution seems to return memory heaps like a dGPU.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3423
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/9774>

3 years agoradv: adjust the computation of the total usage of memory used
Samuel Pitoiset [Mon, 26 Apr 2021 11:43:44 +0000 (11:43 +0000)]
radv: adjust the computation of the total usage of memory used

internal_usage is the memory allocated by the current process (intent)
while system_usage is the memory allocated globally (actual).

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

3 years agogallium/u_threaded: don't set resource pointers to NULL after driver calls
Marek Olšák [Thu, 29 Apr 2021 04:42:40 +0000 (00:42 -0400)]
gallium/u_threaded: don't set resource pointers to NULL after driver calls

The pointers won't be used at that point. Just decrement the refcounts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>

3 years agogallium/u_threaded: rewrite slot layout to reduce wasted space
Marek Olšák [Wed, 28 Apr 2021 23:25:53 +0000 (19:25 -0400)]
gallium/u_threaded: rewrite slot layout to reduce wasted space

A lot of space was wasted due to 16-byte alignment for slots. This new
layout tries to match glthread. Highlights:

- the slot size changed to 8 bytes (was 16), so less padding
- the header size changed to 4 bytes (was 8), so some calls can use
  the remaining 4 bytes in the slot for parameters
- draw merging merges up to 307 draws (was 256) due to space savings
- parameters in structures are sorted based on implicit type alignment
  (uint8_t first, pointers last) to make it easier to utilize the 4 bytes
  after the header and to remove holes
- some structures use smaller types for parameters than pipe_context where
  it's safe (e.g. clear uses float instead of double for depth)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>

3 years agogallium/u_threaded: handle sampler views == NULL better
Marek Olšák [Thu, 22 Apr 2021 01:22:14 +0000 (21:22 -0400)]
gallium/u_threaded: handle sampler views == NULL better

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>

3 years agogallium/u_threaded: move base_valid_buffer_range to transfer where it belongs
Marek Olšák [Tue, 20 Apr 2021 10:19:14 +0000 (06:19 -0400)]
gallium/u_threaded: move base_valid_buffer_range to transfer where it belongs

This saves 8 bytes per resource.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>

3 years agoRevert "gallium/u_threaded: align batches and call slots to 16 bytes"
Marek Olšák [Wed, 28 Apr 2021 21:19:43 +0000 (17:19 -0400)]
Revert "gallium/u_threaded: align batches and call slots to 16 bytes"

This reverts commit 3b1ce49bc1e5aff87805b0bab255885c84bf5052.

It will be completely rewritten, but let's revert this first.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10606>

3 years agogallium: Reset attachments to ST_ATTACHMENT_INVALID when revalidating
Adam Jackson [Mon, 26 Apr 2021 21:22:18 +0000 (17:22 -0400)]
gallium: Reset attachments to ST_ATTACHMENT_INVALID when revalidating

It is *super* *confusing* to leave this initialized to zero, i.e.
ST_ATTACHMENT_FRONT_LEFT.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>

3 years agomesa: Ignore the depth buffer when computing framebuffer floatness
Adam Jackson [Wed, 31 Mar 2021 22:03:01 +0000 (18:03 -0400)]
mesa: Ignore the depth buffer when computing framebuffer floatness

Not that Z32F is especially common, but we shouldn't consider it to
imply that the color buffers are also float, which is what floatMode
is meant to mean.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>

3 years agomesa: Remove unused _mesa_{create,destroy}_visual
Adam Jackson [Wed, 31 Mar 2021 20:13:56 +0000 (16:13 -0400)]
mesa: Remove unused _mesa_{create,destroy}_visual

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>

3 years agoutil/math: change ROUND_DOWN_TO to return a uint64_t
Samuel Pitoiset [Tue, 4 May 2021 15:08:58 +0000 (17:08 +0200)]
util/math: change ROUND_DOWN_TO to return a uint64_t

For 32-bit builds.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10622>

3 years agointel/genxml: fix raster op fields on gen4/5
Dave Airlie [Tue, 29 Dec 2020 04:44:02 +0000 (14:44 +1000)]
intel/genxml: fix raster op fields on gen4/5

These should be unsigned integers

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

3 years agointel/gemxml: move blitter command to render on gen4/5
Dave Airlie [Tue, 22 Dec 2020 03:25:59 +0000 (13:25 +1000)]
intel/gemxml: move blitter command to render on gen4/5

The blitter commands don't show up in INTEL_DEBUG=bat, but on
gen4/5 they are emitted on the render engine ring so just change
the XML to reflect that.

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

3 years agointel/genxml: rewrite the prefilterop xml to be more consistent.
Dave Airlie [Wed, 5 May 2021 01:18:23 +0000 (11:18 +1000)]
intel/genxml: rewrite the prefilterop xml to be more consistent.

This uses a prefix at Ken's suggestion and aligns it across gens

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

3 years agointel/genxml: align gen4/5 xml for store data immediate
Dave Airlie [Wed, 5 May 2021 00:58:22 +0000 (10:58 +1000)]
intel/genxml: align gen4/5 xml for store data immediate

Just align with the gen6 and later xml

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

3 years agointel: fix MI builder for pre-gen7
Ilia Mirkin [Fri, 6 Dec 2019 02:40:51 +0000 (21:40 -0500)]
intel: fix MI builder for pre-gen7

MI_LOAD_REGISTER_MEM is only available on gen7+, so avoid build errors
on earlier generations.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>

3 years agozink: export PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE
Mike Blumenkrantz [Sun, 4 Apr 2021 17:28:59 +0000 (13:28 -0400)]
zink: export PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE

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

3 years agozink: implement sparse buffer creation/mapping
Mike Blumenkrantz [Sun, 4 Apr 2021 17:25:51 +0000 (13:25 -0400)]
zink: implement sparse buffer creation/mapping

sparse buffers are not cpu-readable, so any mapping requires that they
use a staging buffer, either the stream uploader for writes or a manual
copy for readback

future work here should attempt to resolve two perf issues:
* sparse allocations should be allocated dynamically using a suballocator
  or some other, more useful strategy
* readback shouldn't allocate a huge staging buffer

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

3 years agozink: add a pipe_context::resource_commit hook
Mike Blumenkrantz [Sun, 4 Apr 2021 17:17:23 +0000 (13:17 -0400)]
zink: add a pipe_context::resource_commit hook

so many structs

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

3 years agozink: use new ctx device lost checker function
Mike Blumenkrantz [Sun, 4 Apr 2021 17:10:40 +0000 (13:10 -0400)]
zink: use new ctx device lost checker function

make this handling more consistent

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

3 years agozink: add a ctx function for handling device lost resets
Mike Blumenkrantz [Sun, 4 Apr 2021 17:09:59 +0000 (13:09 -0400)]
zink: add a ctx function for handling device lost resets

ensure the reset function is only called once when the screen flag is set

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

3 years agozink: use zink_screen_handle_vkresult() for fence and timeline waiting
Mike Blumenkrantz [Sun, 4 Apr 2021 17:02:40 +0000 (13:02 -0400)]
zink: use zink_screen_handle_vkresult() for fence and timeline waiting

more consistent handling and some code size reduction

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

3 years agozink: add a screen util function for handling VkResults
Mike Blumenkrantz [Sun, 4 Apr 2021 16:59:41 +0000 (12:59 -0400)]
zink: add a screen util function for handling VkResults

enforce device lost status always

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

3 years agozink: minor refactoring of buffer map for read case
Mike Blumenkrantz [Sun, 4 Apr 2021 16:55:34 +0000 (12:55 -0400)]
zink: minor refactoring of buffer map for read case

make this a little more flexible for the non-DONTBLOCK case

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

3 years agopan/bi: Use nir_lower_to_bit_size
Alyssa Rosenzweig [Mon, 3 May 2021 23:39:59 +0000 (19:39 -0400)]
pan/bi: Use nir_lower_to_bit_size

Last holdout of the backend algebraic pass. Delete it.

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

3 years agopan/bi: Switch to 1-bit bools
Alyssa Rosenzweig [Mon, 3 May 2021 23:00:35 +0000 (19:00 -0400)]
pan/bi: Switch to 1-bit bools

In prep for FP16.

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

3 years agopan/bi: Don't swizzle scalars
Alyssa Rosenzweig [Tue, 4 May 2021 16:01:06 +0000 (12:01 -0400)]
pan/bi: Don't swizzle scalars

Pointless, already replicated.

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

3 years agopan/bi: Track scalarness of 16-bit ALU
Alyssa Rosenzweig [Wed, 14 Apr 2021 00:21:03 +0000 (20:21 -0400)]
pan/bi: Track scalarness of 16-bit ALU

Needed for optimal swizzle lowering.

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

3 years agopan/bi: Handle b2i8/16
Alyssa Rosenzweig [Mon, 3 May 2021 22:37:41 +0000 (18:37 -0400)]
pan/bi: Handle b2i8/16

Missing from the algebraic rules, get it right this time.

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

3 years agopan/bi: Handle b2f ourselves
Alyssa Rosenzweig [Mon, 3 May 2021 22:33:57 +0000 (18:33 -0400)]
pan/bi: Handle b2f ourselves

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

3 years agopan/bi: Handle ineg
Alyssa Rosenzweig [Mon, 3 May 2021 22:29:35 +0000 (18:29 -0400)]
pan/bi: Handle ineg

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

3 years agopan/bi: Handle integer min/max ourselves
Alyssa Rosenzweig [Mon, 3 May 2021 22:23:54 +0000 (18:23 -0400)]
pan/bi: Handle integer min/max ourselves

total instructions in shared programs: 158197 -> 158181 (-0.01%)
instructions in affected programs: 169 -> 153 (-9.47%)
helped: 3
HURT: 0

total nops in shared programs: 116393 -> 116397 (<.01%)
nops in affected programs: 60 -> 64 (6.67%)
helped: 0
HURT: 2

total clauses in shared programs: 28628 -> 28627 (<.01%)
clauses in affected programs: 10 -> 9 (-10.00%)
helped: 1
HURT: 0

total quadwords in shared programs: 124146 -> 124140 (<.01%)
quadwords in affected programs: 127 -> 121 (-4.72%)
helped: 3

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

3 years agopan/bi: Add imm_uintN helper
Alyssa Rosenzweig [Mon, 3 May 2021 23:00:23 +0000 (19:00 -0400)]
pan/bi: Add imm_uintN helper

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

3 years agozink: support PIPE_CAP_QUERY_MEMORY_INFO
Mike Blumenkrantz [Wed, 21 Apr 2021 17:20:40 +0000 (13:20 -0400)]
zink: support PIPE_CAP_QUERY_MEMORY_INFO

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

3 years agozink: hook up VK_EXT_memory_budget
Mike Blumenkrantz [Wed, 21 Apr 2021 17:20:13 +0000 (13:20 -0400)]
zink: hook up VK_EXT_memory_budget

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

3 years agozink: grab GetPhysicalDeviceMemoryProperties2 from instance
Mike Blumenkrantz [Wed, 21 Apr 2021 17:19:47 +0000 (13:19 -0400)]
zink: grab GetPhysicalDeviceMemoryProperties2 from instance

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

3 years agoci/freedreno: Mark a5xx texture gather as flaky.
Eric Anholt [Tue, 4 May 2021 19:42:16 +0000 (12:42 -0700)]
ci/freedreno: Mark a5xx texture gather as flaky.

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

3 years agonir/builder: Move clamp helpers to nir_builder.h
Jason Ekstrand [Tue, 4 May 2021 18:59:54 +0000 (13:59 -0500)]
nir/builder: Move clamp helpers to nir_builder.h

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

3 years agovulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable
Erik Kurzinger [Mon, 3 May 2021 12:18:03 +0000 (08:18 -0400)]
vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable

On Wayland, if the wl_drm interface is not available, for example if the
compositor is using the proprietary NVIDIA driver along with their egl-wayland
library, the device_select layer will fail to initialize. However, the failure
path will unconditionally call wl_drm_destroy even though info.wl_drm would be
NULL in that case. This can cause a segfault in libwayland-client.so.

To fix this, check if info.wl_drm is NULL before calling wl_drm_destroy. This
way, initialization will fail gracefully even if that interface is not present.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10598>

3 years agonir: Move shared_memory_explicit_layout bit into common shader_info
Caio Marcelo de Oliveira Filho [Thu, 29 Apr 2021 19:10:13 +0000 (12:10 -0700)]
nir: Move shared_memory_explicit_layout bit into common shader_info

Move it out of the "cs" sub-struct, since the bit can be used for
other shader stages in the future.

This also removes a subtle issue in spirv_to_nir:
info.cs.shared_memory_explicit_layout was used without checking for
the CS shader stage.  It ended up being "harmless" since the effects
also depended on presence of shared variables.

Fixes: 5de6c5973a6 ("spirv: Implement SPV_KHR_workgroup_memory_explicit_layout")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10529>

3 years agotunrip: Add support for VK_EXT_separate_stencil_usage.
Eric Anholt [Mon, 3 May 2021 18:28:50 +0000 (11:28 -0700)]
tunrip: Add support for VK_EXT_separate_stencil_usage.

We were implictly including it in exposing VK 1.2, but we weren't making
use of the supplied struct.  Actually enabling it gives us a chance to do
slightly better at Z/S UBWC, and means we won't lose the separate usage
test coverage when switching back to exposing VK 1.1.

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

3 years agozink: cache SpvId for aggregate glsl_types
Erik Faye-Lund [Mon, 19 Apr 2021 10:36:59 +0000 (12:36 +0200)]
zink: cache SpvId for aggregate glsl_types

This should reduce the amount of types we re-emit while producing
SPIR-V.

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

3 years agozink: handle matrix-types after vectors
Erik Faye-Lund [Mon, 19 Apr 2021 10:24:49 +0000 (12:24 +0200)]
zink: handle matrix-types after vectors

This makes us handle all non-aggregate types before we handle aggregate
types. This is going to matter in the next commit.

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

3 years agopan/mdg: Don't print zero
Alyssa Rosenzweig [Tue, 4 May 2021 16:46:26 +0000 (12:46 -0400)]
pan/mdg: Don't print zero

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

3 years agopan/mdg: Reduced printed parens
Alyssa Rosenzweig [Tue, 4 May 2021 16:42:17 +0000 (12:42 -0400)]
pan/mdg: Reduced printed parens

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

3 years agopan/mdg: Don't print mem addr brackets
Alyssa Rosenzweig [Tue, 4 May 2021 16:41:30 +0000 (12:41 -0400)]
pan/mdg: Don't print mem addr brackets

Already comma separated.

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

3 years agopan/mdg: Don't print explicit .rte
Alyssa Rosenzweig [Tue, 4 May 2021 16:36:36 +0000 (12:36 -0400)]
pan/mdg: Don't print explicit .rte

Default round mode.

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

3 years agopan/mdg: Suppress most attribute tables
Alyssa Rosenzweig [Tue, 4 May 2021 16:36:07 +0000 (12:36 -0400)]
pan/mdg: Suppress most attribute tables

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

3 years agopan/mdg: Don't print zero shifts
Alyssa Rosenzweig [Tue, 4 May 2021 16:33:15 +0000 (12:33 -0400)]
pan/mdg: Don't print zero shifts

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

3 years agopan/mdg: More concise RMU name
Alyssa Rosenzweig [Tue, 4 May 2021 16:30:13 +0000 (12:30 -0400)]
pan/mdg: More concise RMU name

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

3 years agopan/mdg: Hide units behind MIDGARD_MESA_DEBUG=verbose
Alyssa Rosenzweig [Tue, 4 May 2021 16:29:38 +0000 (12:29 -0400)]
pan/mdg: Hide units behind MIDGARD_MESA_DEBUG=verbose

Not usually interesting unless debugging bundling.

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

3 years agopanfrost: Key blend shaders to the input types
Alyssa Rosenzweig [Wed, 21 Apr 2021 19:37:26 +0000 (15:37 -0400)]
panfrost: Key blend shaders to the input types

On Bifrost, fragment shaders might output either FP16 or FP32. The blend
shader will access the output as-is within the register, so depending on
the precision of the blend shader's logic, it may need to insert a
f2f16 or f2f32 conversion. This requires expanding the blend shader key.

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

3 years agopan/blend: Emit explicit conversions for all types
Alyssa Rosenzweig [Wed, 21 Apr 2021 19:06:04 +0000 (15:06 -0400)]
pan/blend: Emit explicit conversions for all types

Needed so we can mix and match.

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

3 years agopanfrost/lower_framebufffer: Don't use i2imp
Alyssa Rosenzweig [Tue, 4 May 2021 15:08:42 +0000 (11:08 -0400)]
panfrost/lower_framebufffer: Don't use i2imp

Fails when converting from i2i8, which is possible.

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

3 years agopanfrost: Assume lower_fragcolor has been called
Alyssa Rosenzweig [Wed, 21 Apr 2021 18:13:41 +0000 (14:13 -0400)]
panfrost: Assume lower_fragcolor has been called

Allows us to clean up quite a bit.

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

3 years agopanfrost: Call nir_lower_fragcolor based on key
Alyssa Rosenzweig [Wed, 21 Apr 2021 18:13:04 +0000 (14:13 -0400)]
panfrost: Call nir_lower_fragcolor based on key

We only want it to trigger if MRT is actually in use. This is a cheap
key (only require multiple variants for an obscure edge case) and avoids
the perf regression of using this pass which is needed for conformance.

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

3 years agopanfrost/blend: Prepare for lower_fragcolor
Alyssa Rosenzweig [Wed, 21 Apr 2021 19:33:53 +0000 (15:33 -0400)]
panfrost/blend: Prepare for lower_fragcolor

FRAG_RESULT_COLOR means something a bit different.

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

3 years agopanfrost/blend: Distribute to_c_factor
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:30:09 +0000 (12:30 -0400)]
panfrost/blend: Distribute to_c_factor

Easier to understand, I think.

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

3 years agopanfrost/blend: Workaround a v7 implementation-detail
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:25:45 +0000 (12:25 -0400)]
panfrost/blend: Workaround a v7 implementation-detail

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

3 years agopanfrost/blend: Fix outdated comments
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:21:38 +0000 (12:21 -0400)]
panfrost/blend: Fix outdated comments

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

3 years agopan/lower_blend: Rename is_bifrost->scalar
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:20:42 +0000 (12:20 -0400)]
pan/lower_blend: Rename is_bifrost->scalar

Don't leak ISA details.

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

3 years agopan/lower_blend: Use NIR helpers
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:16:45 +0000 (12:16 -0400)]
pan/lower_blend: Use NIR helpers

Deletes a bunch of indentations.

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

3 years agopan/lower_blend: Clean up type size handling
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:09:20 +0000 (12:09 -0400)]
pan/lower_blend: Clean up type size handling

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

3 years agopanfrost: Don't clobber RT0 if RTn is disabled
Alyssa Rosenzweig [Mon, 3 May 2021 16:37:59 +0000 (12:37 -0400)]
panfrost: Don't clobber RT0 if RTn is disabled

Fixes: a124c47b9f9 ("panfrost: Fix NULL derefs in pan_cmdstream.c")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393>

3 years agopanfrost: Minor cleanup of blend CSO
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:04:09 +0000 (12:04 -0400)]
panfrost: Minor cleanup of blend CSO

No need to cast.

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

3 years agopanfrost: Support alpha_to_one
Alyssa Rosenzweig [Wed, 21 Apr 2021 16:02:12 +0000 (12:02 -0400)]
panfrost: Support alpha_to_one

Gets rid of a bogus assert in the blend CSO create.

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

3 years agopanfrost: Make comment less confusing
Alyssa Rosenzweig [Wed, 21 Apr 2021 15:44:07 +0000 (11:44 -0400)]
panfrost: Make comment less confusing

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

3 years agopan/bi: Lower 8-bit fragment input
Alyssa Rosenzweig [Mon, 3 May 2021 16:12:21 +0000 (12:12 -0400)]
pan/bi: Lower 8-bit fragment input

Same reasons/technique as fragment output lowering, just need the NIR.

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

3 years agopan/bi: Handle swizzles in i2i8
Alyssa Rosenzweig [Mon, 3 May 2021 16:11:54 +0000 (12:11 -0400)]
pan/bi: Handle swizzles in i2i8

Otherwise they get copypropped away.

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

3 years agopan/bi: Add single-component 8-bit mkvec lowering
Alyssa Rosenzweig [Mon, 3 May 2021 16:11:26 +0000 (12:11 -0400)]
pan/bi: Add single-component 8-bit mkvec lowering

So we can implement scalar i2i8.

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

3 years agopan/bi: Handle different sizes of LD_TILE
Alyssa Rosenzweig [Wed, 21 Apr 2021 21:42:54 +0000 (17:42 -0400)]
pan/bi: Handle different sizes of LD_TILE

v2: Fix overflow.

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

3 years agopan/bi: Track dual-src blend type
Alyssa Rosenzweig [Wed, 21 Apr 2021 19:01:49 +0000 (15:01 -0400)]
pan/bi: Track dual-src blend type

Will be needed for fp16 outputs. I am acutely aware dual-src blending is
broken on Bifrost right now anyway.

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

3 years agovenus: query extended resource info from gralloc
Yiwei Zhang [Fri, 30 Apr 2021 17:20:54 +0000 (17:20 +0000)]
venus: query extended resource info from gralloc

Creating Android swapchain image from gralloc buffer requires to use
VkImageDrmFormatModifierExplicitCreateInfoEXT. To fill the struct info,
we need to query extended resource info from gralloc.

With the queried modifier from gralloc, we can ask the driver for the
plane count of the given format and modifier pair.

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

3 years agotgsi: Mark the tgsi_exec_channel and tgsi_double_channel ALIGN16.
Eric Anholt [Mon, 3 May 2021 22:19:46 +0000 (15:19 -0700)]
tgsi: Mark the tgsi_exec_channel and tgsi_double_channel ALIGN16.

We allocate them all align16, so mark the unions (and their container
structs) that way so the compiler can do aligned SSE load/stores.

glmark2 -b loop FPS +0.197265% +/- 0.117633% (n=1906)

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

3 years agoradv: Add a STONEY baseline for dEQP.
Charlie Turner [Tue, 27 Apr 2021 09:10:28 +0000 (10:10 +0100)]
radv: Add a STONEY baseline for dEQP.

See:
  https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9286188
  https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9297109
  https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9297110

v2.
  - Clarify that the dEQP-VK.texture.explicit_lod.2d tests are skipped
  due to slow APU-based STONEY test devices.

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

3 years agov3d: choose a larger CSD supergroup size if possible
Iago Toral Quiroga [Thu, 29 Apr 2021 07:25:05 +0000 (09:25 +0200)]
v3d: choose a larger CSD supergroup size if possible

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

3 years agobroadcom/common: move CSD supergroup sizing to a common helper
Iago Toral Quiroga [Thu, 29 Apr 2021 07:23:28 +0000 (09:23 +0200)]
broadcom/common: move CSD supergroup sizing to a common helper

We want to use this in GL too.

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

3 years agov3dv: limit supergroup size in presence of TSY barriers
Iago Toral Quiroga [Wed, 28 Apr 2021 12:48:13 +0000 (14:48 +0200)]
v3dv: limit supergroup size in presence of TSY barriers

When a TSY barrier is hit, the entire supergroup will be synchronized.
If the supergoup is large and uses all available QPU threads it would
mean that we would sychronize and stall all running threads until all
of them reach the barrier, which may be inefficient.

This patch makes it so that if the compute shader has any such barriers
we limit the supergroup size so each supergroup only takes half of the
QPU threads available at most, so that if one supergroup hits a
barrier we have at least one other supergroup we can run, reducing
idle QPU time.

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