platform/upstream/mesa.git
3 years agoradeonsi: set current_rast_prim at bind time for tess and GS
Marek Olšák [Thu, 14 Jan 2021 12:22:20 +0000 (07:22 -0500)]
radeonsi: set current_rast_prim at bind time for tess and GS

It doesn't have to be done in draw_vbo.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>

3 years agointel: combine common gather routines in INTEL_MEASURE
Mark Janes [Fri, 29 Jan 2021 23:45:44 +0000 (15:45 -0800)]
intel: combine common gather routines in INTEL_MEASURE

Anv and iris had separate, similar routines to gather intel_measure
timestamps.  Timestamps are now managed within intel_measure, allowing
those routines to be consolidated.

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

3 years agointel: support secondary command buffers in INTEL_MEASURE
Mark Janes [Thu, 17 Dec 2020 18:45:16 +0000 (10:45 -0800)]
intel: support secondary command buffers in INTEL_MEASURE

When a secondary command buffer is encountered, insert an event that
links to the new batch.

This commit leaves intel_measure timestamp buffer objects mmapped,
which is more efficient than mapping/unmapping several times.  With
the BOs mapped at all times, timestamp buffers can be managed directly
by intel_measure, where it will iterate over timestamps of linked
secondary buffers.

With timestamp buffers managed by intel_measure, a more efficient and
accurate check for render completion can be moved into intel_measure
from anv/iris.

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

3 years agointel: stop tracking submission state in INTEL_MEASURE
Mark Janes [Wed, 6 Jan 2021 05:06:13 +0000 (21:06 -0800)]
intel: stop tracking submission state in INTEL_MEASURE

With secondary command buffers, it is inconvenient to track whether a
batch has been submitted and needs to be gathered.  Instead, always
check for completed snapshots before destroying a command buffer.

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

3 years agoiris: add hooks to call INTEL_MEASURE
Kenneth Graunke [Tue, 27 Oct 2020 22:56:06 +0000 (15:56 -0700)]
iris: add hooks to call INTEL_MEASURE

These hooks were written in the initial IRIS_MEASURE implementation.
Minor changes by Mark Janes <markjanes@swizzler.org> to adapt to the
INTEL_MEASURE reimplementation.

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

3 years agoiris: add a iris_context reference to iris_batch
Mark Janes [Wed, 28 Oct 2020 21:13:48 +0000 (14:13 -0700)]
iris: add a iris_context reference to iris_batch

This eliminates the need to use container_of in error handling code.
INTEL_MEASURE will need to access the iris context from each batch.

suggested-by: Kenneth Graunke <kenneth@whitecape.org>

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

3 years agoiris: implement iris layer of INTEL_MEASURE
Mark Janes [Mon, 11 May 2020 20:51:45 +0000 (13:51 -0700)]
iris: implement iris layer of INTEL_MEASURE

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

3 years agoanv: add hooks to call INTEL_MEASURE
Mark Janes [Wed, 6 Jan 2021 03:34:51 +0000 (19:34 -0800)]
anv: add hooks to call INTEL_MEASURE

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

3 years agoblorp: add hook for INTEL_MEASURE
Mark Janes [Tue, 30 Jun 2020 22:00:13 +0000 (15:00 -0700)]
blorp: add hook for INTEL_MEASURE

Saves the snapshot type within the blorp parameters.

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

3 years agoanv: implement anv layer of INTEL_MEASURE
Mark Janes [Wed, 21 Oct 2020 21:10:35 +0000 (14:10 -0700)]
anv: implement anv layer of INTEL_MEASURE

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

3 years agoanv: enable timestamp for INTEL_MEASURE
Mark Janes [Tue, 30 Jun 2020 22:59:22 +0000 (15:59 -0700)]
anv: enable timestamp for INTEL_MEASURE

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

3 years agointel: Print GPU timing data based on INTEL_MEASURE
Mark Janes [Wed, 9 Sep 2020 22:13:30 +0000 (15:13 -0700)]
intel: Print GPU timing data based on INTEL_MEASURE

This infrastructure collects GPU timestamps over common intervals, and
generates a CSV report to show how long rendering took.  The overhead
of collection is limited to the flushing that is required at the
interval boundaries for accurate timestamps.

By default, timing data is sent to stderr.  To direct output to a
file:
 INTEL_MEASURE=file=/tmp/measure.csv {workload}

To begin capturing timestamps at a particular frame:
 INTEL_MEASURE=file=/tmp/measure.csv,start=15 {workload}

To capture only 23 frames:
 INTEL_MEASURE=count=23 {workload}

To capture frames 15-37, stopping before frame 38:
 INTEL_MEASURE=start=15,count=23 {workload}

Designate an asynchronous control file with:
 INTEL_MEASURE=control=path/to/control.fifo {workload}

As the workload runs, enable capture for 5 frames with:

 $ echo 5 > path/to/control.fifo

Enable unbounded capture:

 $ echo -1 > path/to/control.fifo

and disable with:

 $ echo 0 > path/to/control.fifo

Select the boundaries of each snapshot with:
 INTEL_MEASURE=draw  : DEFAULT - Collects timings for every render
 INTEL_MEASURE=rt    : Collects timings when the render target changes
 INTEL_MEASURE=batch : Collects timings when batches are submitted
 INTEL_MEASURE=frame : Collects timings at frame boundaries

With INTEL_MEASURE=interval=5, the duration of 5 events will be
combined into a single record in the output.  When possible, a single
start and end event will be submitted to the GPU to minimize
stalling.  Combined events will not span batches, except in
the case of INTEL_MEASURE=frame.

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

3 years agoradv: Enable modifiers with the WSI.
Bas Nieuwenhuizen [Wed, 18 Nov 2020 01:35:59 +0000 (02:35 +0100)]
radv: Enable modifiers with the WSI.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Enable DRM format modifiers on GFX9+.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:52:58 +0000 (12:52 +0100)]
radv: Enable DRM format modifiers on GFX9+.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Add image layout with drm format modifiers.
Bas Nieuwenhuizen [Tue, 17 Nov 2020 04:10:20 +0000 (05:10 +0100)]
radv: Add image layout with drm format modifiers.

Half of it is passing the right modifier to ac_surface, the other half
is applying the offset/strides.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Add drm format modifier queries.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:52:27 +0000 (12:52 +0100)]
radv: Add drm format modifier queries.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Add format modifier format queries.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 03:00:29 +0000 (04:00 +0100)]
radv: Add format modifier format queries.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Don't relayout images with modifiers.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:01:54 +0000 (12:01 +0100)]
radv: Don't relayout images with modifiers.

The modifier should have been the exact layout of the image. Hence
we should not relayout the image according to the implicit modifier
on memory import (i.e. VkMemory allocation).

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Use the surface offset from ac_surface instead of a plane offset.
Bas Nieuwenhuizen [Tue, 17 Nov 2020 03:47:13 +0000 (04:47 +0100)]
radv: Use the surface offset from ac_surface instead of a plane offset.

In preparation for doing this with modifiers in general.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoradv: Extract DCC format support handling.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 02:42:12 +0000 (03:42 +0100)]
radv: Extract DCC format support handling.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agoamd/common: Add modifier size helper.
Bas Nieuwenhuizen [Mon, 16 Nov 2020 11:28:13 +0000 (12:28 +0100)]
amd/common: Add modifier size helper.

For use in Vulkan.

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>

3 years agonir/from_ssa: don't check for interference within the same set
Yevhenii Kolesnikov [Mon, 28 Dec 2020 10:25:31 +0000 (12:25 +0200)]
nir/from_ssa: don't check for interference within the same set

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246>

3 years agonir/from_ssa: consider defs in sibling blocks
Yevhenii Kolesnikov [Wed, 23 Dec 2020 23:16:38 +0000 (01:16 +0200)]
nir/from_ssa: consider defs in sibling blocks

If def a and def b are in sibling blocks, the one with higher
parent_instr's index does not necessarily come after the other.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3712
Fixes: 943ddb945877fc8 "nir: Add a better out-of-SSA pass"
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246>

3 years agoScons: check for timespec_get on windows as well as unices
Dylan Baker [Wed, 20 Jan 2021 17:16:27 +0000 (09:16 -0800)]
Scons: check for timespec_get on windows as well as unices

windows has a timespec_get function, and if we don't check that then it
will try to fall back to using clock_gettime, which windows doesn't
have.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8592>

3 years agovulkan: Drop the type_prefix parameter from gen_extensions
Jason Ekstrand [Sat, 30 Jan 2021 16:41:08 +0000 (10:41 -0600)]
vulkan: Drop the type_prefix parameter from gen_extensions

Now that all the drivers are converted, it's set to 'vk' by everyone so
there's no point in having the parameter.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Rework vk_device_init and friends
Jason Ekstrand [Fri, 29 Jan 2021 18:30:34 +0000 (12:30 -0600)]
vulkan: Rework vk_device_init and friends

Now that all drivers are converted over, we can make a few changes.
First off, vk_device_init no longer takes two separate allocators
because we can assume that the parent instance is non-null and it can
pull the instance allocator from that.  Second, dispatch tables and the
instance extension table are no longer optional.  We leave the device
extension table optional for now because we don't do any verification at
vk_init_physical_device time and some drivers find it more convenient to
set the extensions later in their own physical_device_init for various
reasons.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv,radv: Use common entrypoints for VK_KHR_deferred_operation
Jason Ekstrand [Mon, 1 Feb 2021 16:29:22 +0000 (10:29 -0600)]
anv,radv: Use common entrypoints for VK_KHR_deferred_operation

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Make the debug_report implementation internal
Jason Ekstrand [Thu, 28 Jan 2021 23:43:58 +0000 (17:43 -0600)]
vulkan: Make the debug_report implementation internal

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Use vk_object_base::type for debug_report
Jason Ekstrand [Thu, 28 Jan 2021 23:20:24 +0000 (17:20 -0600)]
vulkan: Use vk_object_base::type for debug_report

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Use vk_object_base::type for debug_report
Jason Ekstrand [Thu, 28 Jan 2021 23:17:59 +0000 (17:17 -0600)]
anv: Use vk_object_base::type for debug_report

This is way better than the giant macro thing we had before.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Make vk_debug_report_callback derive from vk_object_base
Jason Ekstrand [Thu, 28 Jan 2021 22:45:29 +0000 (16:45 -0600)]
vulkan: Make vk_debug_report_callback derive from vk_object_base

Fixes: 51c6bc13ce3a "anv,vulkan: Implement VK_EXT_private_data"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoradv: Switch to the common VK_EXT_debug_report
Jason Ekstrand [Thu, 28 Jan 2021 22:29:37 +0000 (16:29 -0600)]
radv: Switch to the common VK_EXT_debug_report

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

3 years agoradv: Use common entrypoints for VK_EXT_private_data
Jason Ekstrand [Thu, 28 Jan 2021 22:22:41 +0000 (16:22 -0600)]
radv: Use common entrypoints for VK_EXT_private_data

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

3 years agoradv: port to using common dispatch code.
Dave Airlie [Mon, 25 Jan 2021 01:11:57 +0000 (11:11 +1000)]
radv: port to using common dispatch code.

I think this has the SQTT layer hooked in correctly, would
be good if somebody could confirm this.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoradv: move to subclassed instance/physical_device structs
Dave Airlie [Mon, 25 Jan 2021 00:35:32 +0000 (10:35 +1000)]
radv: move to subclassed instance/physical_device structs

This moves to using the common base structs for these
two objects, this is prep work for the using the common
dispatch layer code.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoradv: remove all entrypoint enabled debug option
Dave Airlie [Mon, 25 Jan 2021 01:32:22 +0000 (11:32 +1000)]
radv: remove all entrypoint enabled debug option

This was useful back at the dawn of time when apps weren't as
well developed and layers mostly sucked. I don't think it's been
used in a quite a while so remove it, as the new dispatch
layer doesn't support it.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoradv: move queue object to a common base object
Dave Airlie [Mon, 25 Jan 2021 01:23:58 +0000 (11:23 +1000)]
radv: move queue object to a common base object

This is needed to use the new dispatch layer code.  While we're here, we
clean up the context on the error path.

Fixes: 9b1138e3f0e96 "radv: implement VK_EXT_private_data"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agov3dv: Switch to the common VK_EXT_debug_report
Jason Ekstrand [Thu, 28 Jan 2021 21:26:53 +0000 (15:26 -0600)]
v3dv: Switch to the common VK_EXT_debug_report

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

3 years agov3dv: Use common entrypoints for VK_EXT_private_data
Jason Ekstrand [Thu, 28 Jan 2021 21:25:30 +0000 (15:25 -0600)]
v3dv: Use common entrypoints for VK_EXT_private_data

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

3 years agov3dv: port to using common dispatch code.
Alejandro Piñeiro [Wed, 27 Jan 2021 23:21:38 +0000 (00:21 +0100)]
v3dv: port to using common dispatch code.

This moves v3dv over to using the new common dispatch layer code.

v2 (Jason Ekstrand):
 - Remove some now dead function declarations

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

3 years agov3dv: remove reference to v3dv_instance on v3dv_physical_device
Alejandro Piñeiro [Wed, 27 Jan 2021 22:45:28 +0000 (23:45 +0100)]
v3dv: remove reference to v3dv_instance on v3dv_physical_device

As we already have a reference to vk_instance at vk_physical_device,
that we are setting when calling vk_physical_device_init.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agov3dv: Drop v3dv_instance::app_info
Jason Ekstrand [Fri, 29 Jan 2021 18:01:34 +0000 (12:01 -0600)]
v3dv: Drop v3dv_instance::app_info

There's an equivalent data structure in vk_instance.

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

3 years agov3dv: move to subclassing instance/physical device
Alejandro Piñeiro [Wed, 27 Jan 2021 12:46:58 +0000 (13:46 +0100)]
v3dv: move to subclassing instance/physical device

This moves to using the common base structs for these two objects, but
doesn't use any of the new features yet.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agolavapipe: Drop some wrappers in favor of common code
Jason Ekstrand [Thu, 28 Jan 2021 21:03:04 +0000 (15:03 -0600)]
lavapipe: Drop some wrappers in favor of common code

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

3 years agoturnip: Switch to the common VK_EXT_debug_report
Jason Ekstrand [Thu, 28 Jan 2021 20:56:34 +0000 (14:56 -0600)]
turnip: Switch to the common VK_EXT_debug_report

Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoturnip: Drop some legacy wrappers in favor of common code
Jason Ekstrand [Thu, 28 Jan 2021 20:24:32 +0000 (14:24 -0600)]
turnip: Drop some legacy wrappers in favor of common code

Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoturnip: Use common entrypoints for VK_EXT_private_data
Jason Ekstrand [Thu, 28 Jan 2021 20:23:34 +0000 (14:23 -0600)]
turnip: Use common entrypoints for VK_EXT_private_data

Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoturnip: Use the common dispatch framework
Jason Ekstrand [Thu, 28 Jan 2021 19:53:02 +0000 (13:53 -0600)]
turnip: Use the common dispatch framework

Acked-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agolavapipe: use common dispatch layer.
Dave Airlie [Sun, 24 Jan 2021 23:50:29 +0000 (09:50 +1000)]
lavapipe: use common dispatch layer.

This moves lavapipe over to using the new common dispatch layer code.

v2 (Jason Ekstrand):
 - Less pointless messing around with python and meson

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

3 years agolavapipe: sort extensions in proper order.
Dave Airlie [Sun, 24 Jan 2021 23:49:28 +0000 (09:49 +1000)]
lavapipe: sort extensions in proper order.

Subsequent patch enforces this, so just do it in advance.

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

3 years agolavapipe: add missing wsi entrypoint.
Dave Airlie [Sun, 24 Jan 2021 23:40:58 +0000 (09:40 +1000)]
lavapipe: add missing wsi entrypoint.

Add support for GetPhysicalDeviceSurfaceFormats2KHR which is helpful
to make the new dispatch code work.

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

3 years agolavapipe: move to subclassing instance/physical device.
Dave Airlie [Sun, 24 Jan 2021 22:57:46 +0000 (08:57 +1000)]
lavapipe: move to subclassing instance/physical device.

This doesn't use any of the features yet, just moves to subclassing.

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

3 years agoanv: Switch to the common VK_EXT_debug_report
Jason Ekstrand [Wed, 27 Jan 2021 17:37:00 +0000 (11:37 -0600)]
anv: Switch to the common VK_EXT_debug_report

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add a truly common VK_EXT_debug_report implementation
Jason Ekstrand [Wed, 27 Jan 2021 17:32:15 +0000 (11:32 -0600)]
vulkan: Add a truly common VK_EXT_debug_report implementation

Now that we've got a common vk_instance, we can put the debug_report
stuff there and make it truly common.  For drivers to use this
implementation, they need to delete their own vk_debug_report_instance
and make sure everything references the common one.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan,anv: Move VK_KHR_copy_commands2 wrappers to common code
Jason Ekstrand [Mon, 25 Jan 2021 09:08:27 +0000 (03:08 -0600)]
vulkan,anv: Move VK_KHR_copy_commands2 wrappers to common code

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan,anv: Move a bunch of trivial wrappers to common code
Jason Ekstrand [Sun, 24 Jan 2021 20:49:57 +0000 (14:49 -0600)]
vulkan,anv: Move a bunch of trivial wrappers to common code

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Make Get*MemoryRequirements a wrapper
Jason Ekstrand [Thu, 28 Jan 2021 20:33:19 +0000 (14:33 -0600)]
anv: Make Get*MemoryRequirements a wrapper

Instead of making Get*MemoryRequirements2 call the legacy version to
fill out the base struct, put everything in Get*MemoryRequirements2 and
make the old one a trivial wrapper.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan,anv: Add common entrypoints for VK_EXT_private_data
Jason Ekstrand [Sun, 24 Jan 2021 04:43:56 +0000 (22:43 -0600)]
vulkan,anv: Add common entrypoints for VK_EXT_private_data

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan,anv: Move GetDeviceProcAddr to common code
Jason Ekstrand [Sun, 24 Jan 2021 20:29:28 +0000 (14:29 -0600)]
vulkan,anv: Move GetDeviceProcAddr to common code

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add framework for common entrypoints
Jason Ekstrand [Sun, 24 Jan 2021 20:26:23 +0000 (14:26 -0600)]
vulkan: Add framework for common entrypoints

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Use the common dispatch framework
Jason Ekstrand [Sat, 23 Jan 2021 10:57:21 +0000 (04:57 -0600)]
anv: Use the common dispatch framework

This commit switches ANV to using the new common physical device and
instance base structs as well as the new dispatch framework.  This
should make code sharing between Vulkan drivers much easier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Add a single anv_genX switch macro
Jason Ekstrand [Sun, 24 Jan 2021 03:09:18 +0000 (21:09 -0600)]
anv: Add a single anv_genX switch macro

This should make future platform enabling a good bit easier and more
reliable than having 3 of them.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add a common entrypoint table generator
Jason Ekstrand [Sun, 24 Jan 2021 20:03:52 +0000 (14:03 -0600)]
vulkan: Add a common entrypoint table generator

This is based on the one in ANV but it's a bit different because it uses
vk_entrypoint_table instead of vk_dispatch_table.  This is because,
without knowing what extensions are implemented by a driver, we have to
generate a table with everything and sort it all out later.  We use the
same trick as ANV with weak function declarations to provide NULL values
for any entrypoints NOT implemented by the driver.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add common Get*ProcAddr implementations
Jason Ekstrand [Sat, 23 Jan 2021 19:48:04 +0000 (13:48 -0600)]
vulkan: Add common Get*ProcAddr implementations

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add entrypoint tables and related helpers
Jason Ekstrand [Sun, 24 Jan 2021 17:07:24 +0000 (11:07 -0600)]
vulkan: Add entrypoint tables and related helpers

Entrypoint tables are distinct from dispatch tables because they are not
de-duplicated.  These are needed to make codegen easier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add generators for instance trampoline functions
Jason Ekstrand [Sat, 23 Jan 2021 19:28:21 +0000 (13:28 -0600)]
vulkan: Add generators for instance trampoline functions

ANV needs these because we have a different dispatch table for each
hardware generation and Vulkan requires that the device entrypoints
returned from vkGetInstanceProcAddr work regardless of which device
they're used with.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add common instance and physical device structs
Jason Ekstrand [Sat, 23 Jan 2021 19:06:02 +0000 (13:06 -0600)]
vulkan: Add common instance and physical device structs

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add dispatch table lookup helpers
Jason Ekstrand [Sat, 23 Jan 2021 18:46:02 +0000 (12:46 -0600)]
vulkan: Add dispatch table lookup helpers

These both look up a name by string and check to see if it's actually
supported given instance and possibly device extension tables.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan-overlay-layer: Use the new dispatch tables
Jason Ekstrand [Sat, 23 Jan 2021 17:47:35 +0000 (11:47 -0600)]
vulkan-overlay-layer: Use the new dispatch tables

This lets us drop the dispatch tables in enum_to_str and replace them
with the new, better versions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add dispatch table loading helpers
Jason Ekstrand [Sat, 23 Jan 2021 17:36:18 +0000 (11:36 -0600)]
vulkan: Add dispatch table loading helpers

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add common dispatch table generation
Jason Ekstrand [Sat, 23 Jan 2021 11:00:08 +0000 (05:00 -0600)]
vulkan: Add common dispatch table generation

This is based off the dispatch table generation in ANV with the notable
exception that these tables de-duplicate aliased entrypoints by wrapping
all aliased entrypoints in a union which contains all the aliases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Use the common extension table struct
Jason Ekstrand [Sat, 23 Jan 2021 20:45:32 +0000 (14:45 -0600)]
anv: Use the common extension table struct

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add common extension tables
Jason Ekstrand [Sat, 23 Jan 2021 11:12:43 +0000 (05:12 -0600)]
vulkan: Add common extension tables

Unlike the per-driver tables, these contain every extension ever and
assume the maximum extension version.  This later assumption is ok
because Vulkan extension versions have only been used for something
interesting once in the history of the API.  If it happens again, we can
afford a special case.

This requires us to rework the extension table generation scripts
somewhat because we want to use the same script for both common and
per-driver codegen right now.  To do this we add a "prefix" variable to
go alongside "driver".

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Add a return code to vk_device_init
Jason Ekstrand [Sun, 24 Jan 2021 15:26:24 +0000 (09:26 -0600)]
vulkan: Add a return code to vk_device_init

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan: Move vk_device to its own file
Jason Ekstrand [Sun, 24 Jan 2021 15:06:09 +0000 (09:06 -0600)]
vulkan: Move vk_device to its own file

Things are going to start getting more complicated so let's avoid the
single mega-file approach.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agolavapipe: Properly clean up vk_device
Jason Ekstrand [Sat, 23 Jan 2021 10:31:08 +0000 (04:31 -0600)]
lavapipe: Properly clean up vk_device

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

3 years agov3dv: Properly clean up vk_device
Jason Ekstrand [Sat, 23 Jan 2021 10:29:04 +0000 (04:29 -0600)]
v3dv: Properly clean up vk_device

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

3 years agoturnip: Properly clean up vk_device
Jason Ekstrand [Sat, 23 Jan 2021 10:24:09 +0000 (04:24 -0600)]
turnip: Properly clean up vk_device

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoradv: Properly clean up vk_device
Jason Ekstrand [Sat, 23 Jan 2021 10:23:51 +0000 (04:23 -0600)]
radv: Properly clean up vk_device

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoanv: Clean up the vk_device on the CreateDevice error path
Jason Ekstrand [Sat, 23 Jan 2021 10:33:02 +0000 (04:33 -0600)]
anv: Clean up the vk_device on the CreateDevice error path

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agovulkan/meson: Add missing dependencise on vk_extensions_gen.py
Jason Ekstrand [Thu, 28 Jan 2021 19:51:57 +0000 (13:51 -0600)]
vulkan/meson: Add missing dependencise on vk_extensions_gen.py

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

3 years agoci/freedreno: Add Valve games and other traces now that we have GLX.
Eric Anholt [Thu, 21 Jan 2021 20:42:11 +0000 (12:42 -0800)]
ci/freedreno: Add Valve games and other traces now that we have GLX.

Two games are skipped until we fix up their runtimes (or maybe make
scheduled overnight pipelines for longer traces?)

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/freedreno: Do our piglit runs against Xorg.
Eric Anholt [Fri, 22 Jan 2021 00:19:43 +0000 (16:19 -0800)]
ci/freedreno: Do our piglit runs against Xorg.

We were using surfaceless, which misses out on some useful coverage we'd
like to have in the GLX/EGL piglit tests, but more importantly prevented
many traces from running.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/lava+baremetal: Add an xserver to the root fs.
Eric Anholt [Thu, 21 Jan 2021 23:59:47 +0000 (15:59 -0800)]
ci/lava+baremetal: Add an xserver to the root fs.

We want to be able to test GLX and EGL on real hardware, and we can't do
that with just the surfaceless backend.  Bringing up the xserver is pretty
easy.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agodocs/ci: Document setting up the http cache for traces.
Eric Anholt [Thu, 21 Jan 2021 21:55:02 +0000 (13:55 -0800)]
docs/ci: Document setting up the http cache for traces.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/docs: Update CI farm requirements suggestions.
Eric Anholt [Thu, 21 Jan 2021 21:40:47 +0000 (13:40 -0800)]
ci/docs: Update CI farm requirements suggestions.

We have a handy printout for slow tests now, and DEQP_FRACTION is now
compatible with parallel.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/freedreno: Use the http cache for artifacts downloads, too.
Eric Anholt [Thu, 21 Jan 2021 23:41:18 +0000 (15:41 -0800)]
ci/freedreno: Use the http cache for artifacts downloads, too.

The gitlab artifacts handling has been slow in the past as we hit
gitlab.fdo from multiple runners, and it costs fd.o egress bandwidth.  Use
the local http cache against the packet.net minio to cut that downloads
cost.

Closes: #3249
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/freedreno: Use the new nginx cache for trace downloads.
Eric Anholt [Thu, 21 Jan 2021 20:36:01 +0000 (12:36 -0800)]
ci/freedreno: Use the new nginx cache for trace downloads.

As we introduce bigger traces to the replay, pulling all of that down all
the way from packet is going to get unreasonable.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoci/freedreno: Drop pointless GIT_STRATEGY setting for a630.
Eric Anholt [Thu, 28 Jan 2021 19:56:30 +0000 (11:56 -0800)]
ci/freedreno: Drop pointless GIT_STRATEGY setting for a630.

It's already in place due to extending from .test.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>

3 years agoradv: Do not hash vk_object_base in descriptor set layout.
Bas Nieuwenhuizen [Mon, 1 Feb 2021 12:19:26 +0000 (13:19 +0100)]
radv: Do not hash vk_object_base in descriptor set layout.

It contains potentially pointer-y stuff.

Fixes: 178adfa6a8e ("radv: use the base object struct types")
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8809>

3 years agoradv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe
Samuel Pitoiset [Thu, 28 Jan 2021 15:26:47 +0000 (16:26 +0100)]
radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe

The CP DMA bandwidth is always better than PCIe, so I think wasting
compute resources is not a good idea. This is only enabled on GFX10+
because untested on older gens and also because RadeonSI does that.

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

3 years agoradv/winsys: move the initial BO domain to radeon_winsys_bo
Samuel Pitoiset [Thu, 28 Jan 2021 15:19:26 +0000 (16:19 +0100)]
radv/winsys: move the initial BO domain to radeon_winsys_bo

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

3 years agoci: Use GNU time as meson test wrapper
Michel Dänzer [Fri, 29 Jan 2021 10:03:19 +0000 (11:03 +0100)]
ci: Use GNU time as meson test wrapper

This will hopefully give us more information about why some tests are
intermittently timing out.

Only in build jobs using the x86_build docker image for now, since
those are where we're currently seeing most such timeouts. But may
expand this later if it provides the expected benefits.

v2:
* Add comment about why we test for and use /usr/bin/time explicitly.

Acked-by: Eric Engestrom <eric@engestrom.ch> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8776>

3 years agor600/sfn: Use the constant buffer ID when given
Gert Wollny [Sun, 31 Jan 2021 17:54:29 +0000 (18:54 +0100)]
r600/sfn: Use the constant buffer ID when given

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

3 years agor600/sfn: Fix dual source blend lowered to FRAG_DATA
Gert Wollny [Sun, 31 Jan 2021 12:39:47 +0000 (13:39 +0100)]
r600/sfn: Fix dual source blend lowered to FRAG_DATA

This fixes the Unigine benchmarks.

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

3 years agor600/sfn: Fix FS inputs when reading from the same position
Gert Wollny [Sat, 30 Jan 2021 20:47:26 +0000 (21:47 +0100)]
r600/sfn: Fix FS inputs when reading from the same position

Don't add another varying in this case.

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

3 years agor600/sfn: Add the position input as varying
Gert Wollny [Sat, 30 Jan 2021 18:09:42 +0000 (19:09 +0100)]
r600/sfn: Add the position input as varying

Like this it will be handled correctly in the shader IO structure

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

3 years agor600/sfn: Set unnormalized flag for z-coordinate when fetching from array
Gert Wollny [Sat, 30 Jan 2021 18:08:55 +0000 (19:08 +0100)]
r600/sfn: Set unnormalized flag for z-coordinate when fetching from array

It shouldn't be relewant for fetch, but the TGSI code path does it, so
let's do it here as well.

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

3 years agor600/sfn: Fix use of cnde_int for bcsel
Gert Wollny [Sat, 30 Jan 2021 18:07:38 +0000 (19:07 +0100)]
r600/sfn: Fix use of cnde_int for bcsel

The boolean is an int, so use the int version of the opcode.

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

3 years agodocs/features: mark ssbos as done for zink
Erik Faye-Lund [Fri, 29 Jan 2021 11:34:18 +0000 (12:34 +0100)]
docs/features: mark ssbos as done for zink

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