Bas Nieuwenhuizen
4dbbd59a01
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 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
f543f09e2a
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 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
bd816bddf2
radv: Extract DCC format support handling.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
21f476920e
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 >
2021-02-02 00:43:56 +00:00
Yevhenii Kolesnikov
a678ec9b8c
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 >
2021-02-01 14:28:35 -06:00
Yevhenii Kolesnikov
fd05620e43
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: 943ddb9458 "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 >
2021-02-01 14:27:56 -06:00
Dylan Baker
abdaf5fab8
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 >
2021-02-01 19:40:20 +00:00
Jason Ekstrand
f2545f22f4
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
bafd0c680d
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
3a7514ea09
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
23ba48a0c7
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
41318a5819
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
c41eaf0add
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
bd1705a480
vulkan: Make vk_debug_report_callback derive from vk_object_base
...
Fixes: 51c6bc13ce "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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
19d7cf0457
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 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
3f2341767b
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 >
2021-02-01 18:54:25 +00:00
Dave Airlie
23f8ca0c9d
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 >
2021-02-01 18:54:25 +00:00
Dave Airlie
7d16621281
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 >
2021-02-01 18:54:25 +00:00
Dave Airlie
abbca2fa92
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 >
2021-02-01 18:54:24 +00:00
Dave Airlie
f695957421
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: 9b1138e3f0 "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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
7fe36c1187
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
9933b188d2
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 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
21f9a88673
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 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
3e2bbf5d50
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
bde7e1c313
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 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
9c0079e0ee
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
249652fc1e
lavapipe: Drop some wrappers in favor of common code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
394708b3cb
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
3a8060271c
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
0870cf4c06
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
59d70c47c7
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 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ed9e75950b
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 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ae895d308a
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 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ce98c8f7af
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 >
2021-02-01 18:54:24 +00:00
Dave Airlie
fd3c665df0
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
bcdf481d13
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
eef79aab1c
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
06f877f6e6
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
ac6be0ef22
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
f51155a349
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
3536bec0fa
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
f8bc9a4e7a
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
94d02e8dea
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
0be8200839
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
4e190bc2ae
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
9be7aa3fc8
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
66cdc0c0db
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
46ecbff39b
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
eff07c0407
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 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
d360a996f9
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 >
2021-02-01 18:54:24 +00:00