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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Arcady Goldmints-Orlov [Fri, 20 Nov 2020 07:12:51 +0000 (01:12 -0600)]
v3dv: Only lower local arrays of size up to 2 to if-chains
Larger arrays get lowered to scratch access later, as that turns out
to be faster, while the if-chain is actually faster for arrays of
2 elements.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Tue, 15 Dec 2020 19:55:23 +0000 (13:55 -0600)]
broadcom/compiler: Enable PER_QUAD TMU access only in uniform control flow
PER_QUAD TMU lookups will partially override the predication mask on TMU
writes. If some but not all lanes in a quad are predicated out, setting
PER_QUAD will force them all to be enabled. This can result in TMU
access to bogus addresses when in nonuniform control flow. Also, since
PER_QUAD is needed to make sure derivatives work with helper
invocations, and derivatives are undefined in nonuniform control flow,
there is no reason to leave it enabled in this case.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Thu, 24 Dec 2020 16:24:56 +0000 (10:24 -0600)]
broadcom/compiler: Emit uniform loops using uniform control flow
Similarly to if statements, uniform loops are now emitted without
predication, using simple branches for breaks and continues. The
uniformity of the loop is determined by running the
nir_divergence_analysis pass.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Thu, 31 Dec 2020 17:04:11 +0000 (11:04 -0600)]
broadcom/compiler: Use ANYA for branches in uniform ifs
Using ANYAP instead of ALLAP makes things work correctly in cases
where all lanes are masked out.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Jason Ekstrand [Tue, 15 Oct 2019 21:14:39 +0000 (16:14 -0500)]
nir/from_ssa: Respect and populate divergence information
Reviewed-by: Arcady Goldmints-Orlov <agoldmints@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Thu, 24 Dec 2020 16:23:33 +0000 (10:23 -0600)]
nir: store the results of divergence analysis on loops
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Tue, 29 Dec 2020 18:43:04 +0000 (12:43 -0600)]
nir: handle v3d intrinsics in divergence analysis
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Arcady Goldmints-Orlov [Mon, 4 Jan 2021 02:55:31 +0000 (20:55 -0600)]
nir: add more intrinsics to divergence analysis
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
Rob Clark [Sun, 31 Jan 2021 16:58:09 +0000 (08:58 -0800)]
mesa: Remove _mesa_destroy_context()
There was only one caller, an error path in mesa/st. But this is now
incorrect as we need align_free(). Just remove it.
Fixes:
55e853d823e ("mesa/st: Allocate the gl_context with 16-byte alignment.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8801>
Mauro Rossi [Sun, 31 Jan 2021 22:16:10 +0000 (23:16 +0100)]
android: pan/mdg: create nir pass to lower image coord bitsize
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: midgard_nir_lower_image_bitsize
>>> referenced by midgard_compile.c:321 (external/mesa/src/panfrost/midgard/midgard_compile.c:321)
Fixes:
db725e1d52a6 ("pan/mdg: create nir pass to lower image coord bitsize")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8802>
Vinson Lee [Sat, 23 Jan 2021 02:49:12 +0000 (18:49 -0800)]
v3dv: Fix assert.
Fix defect reported by Coverity Scan.
Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment job->ez_state =
VC5_EZ_DISABLED has a side effect. This code will work differently in a
non-debug build.
Fixes:
cec2ed7c80f ("v3dv: fix disabling Early Z for the whole frame")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8666>