Commit Graph

210 Commits

Author SHA1 Message Date
Yonggang Luo 48e72da0dd gallium: Rename macros HAVE_PIPE_LOADER*
Rename macro HAVE_PIPE_LOADER_DRI to HAVE_DRI
Rename macro HAVE_PIPE_LOADER_KMS to HAVE_DRISW_KMS

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Dave Airlie 62207cf885 lavapipe: enable VK_EXT_depth_range_unrestricted.
This passes all the VK CTS tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-28 10:36:01 +10:00
Dave Airlie 8be15cc382 lavapipe: expose some subgroup extensions
These are part of vulkan 1.2, but expose them to be nice.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>
2022-07-27 20:58:56 +00:00
Mike Blumenkrantz 27c97dc0d1 lavapipe: advertise VK_EXT_multisampled_render_to_single_sampled
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz ad09694cba lavapipe: EXT_non_seamless_cube_map
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17711>
2022-07-25 00:50:14 +00:00
Dave Airlie bfebf51571 lavapipe: state latest conformance tests passed
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable "22.1"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17643>
2022-07-20 03:36:13 +00:00
Dave Airlie af2e4a23c9 lavapipe: enable variablePointers
This passes the CTS with no regressions.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17587>
2022-07-17 23:16:40 +00:00
Eric Engestrom ebb3ea5790 lavapipe: use updated tokens from vk.xml
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17342>
2022-07-12 15:53:11 +00:00
Jason Ekstrand d06335ed76 vulkan: Depend on vk_pipeline_layout in vk_cmd_enqueue
Now that we have a common pipeline layout with reference counting, we
don't need these driver hooks for reference counting anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17286>
2022-06-29 20:31:58 +00:00
Jason Ekstrand a579d33352 lavapipe: Use the vk_pipeline_layout base struct
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17286>
2022-06-29 20:31:58 +00:00
Jason Ekstrand 498a8e77dd lavapipe: Use the new border color helper
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15359>
2022-06-23 00:01:41 +00:00
Mike Blumenkrantz efa58f6b47 lavapipe: VK_EXT_border_color_swizzle
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16992>
2022-06-14 01:52:50 +00:00
Michel Zou 3684776f79 lavapipe: allow null handleTypes
handleTypes is allowed to be null with VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Closes #6501

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16590>
2022-06-08 18:43:57 +02:00
Marek Olšák ad8f9d5d58 gallium: rename PIPE_CAP_MAX_SHADER_BUFFER_SIZE -> *_UINT
to imply the maximum of 4GB - 1.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:58 -04:00
Marek Olšák fd6b8999d7 gallium: rename PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE->MAX_TEXEL_BUFFER_ELEMENTS_UINT
to allow exposing 4G - 1. The "SIZE" was also a misnomer because it meant
elements. This no longer clamps the size to INT_MAX in st/mesa.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:58 -04:00
Marek Olšák 406cf871b2 gallium: rename PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE to *_BUFFER0_*
UBOs will use a larger limit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Jonathan Weinstein 2b844aab6a lavapipe: support instance rate zero for VK_EXT_vertex_attribute_divisor
gallium can't directly support vertex attribute instance rate zero, since
the instance rate is also used to determine if the data is per-vertex or
per-instance in the first place (hence divisor zero meaning the data is
per vertex).
While it's an optional feature for VK_EXT_vertex_attribute_divisor, some
apps require it to work (it's a standard d3d10 feature and widely
supported), hence translate it away as MAX_UINT32 divisor instead (which
at this point probably makes more sense than to change the gallium
interface), which should work all the same.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16526>
2022-05-18 01:29:36 +00:00
Greg Depoire--Ferrer d3bef6ba73 lavapipe: check for error when initializing lvp_queue
When lvp_queue_init fails, propagate the failure to the caller.

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>
2022-05-13 19:35:11 +00:00
Autumn on Tape d561279c7b lavapipe: enable subgroup quad operations
Signed-off-by: Autumn on Tape <autumn@cyfox.net>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16340>
2022-05-11 21:09:43 +00:00
Mike Blumenkrantz 0cebb87025 lavapipe: set robustBufferAccess2 and robustImageAccess2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137>
2022-05-10 20:30:09 +00:00
Erik Faye-Lund 8c8d08a8b8 lavapipe: add support for null-descriptors from EXT_robustness2
Mike says this should be enough for full support, so let's see ;)

Nope, no robust image or buffer access implemented yet.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137>
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz 7767b2f7b5 lavapipe: enqueue pipeline destruction
this avoids races in llvmpipe related to modification of per-context shader
variant lists, which causes massive amounts of flakiness in ci

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16331>
2022-05-10 06:07:44 +00:00
Autumn on Tape 433ec23457 lavapipe: enable subgroup shuffle operations
Bits flipped in VkPhysicalDeviceSubgroupProperties.supportedOperations:
  * SUBGROUP_FEATURE_SHUFFLE_BIT
  * SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT

Signed-off-by: Autumn on Tape <autumn@cyfox.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13671>
2022-05-03 23:09:37 +00:00
Erik Faye-Lund 5c61aa5eed lavapipe: quiet non-conformant warning on ci
This helper has built-in support to be quieted, which seems like a good
idea to do on ci.

Let's enable the quieting while we're at it.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16033>
2022-04-26 13:47:34 +00:00
Mike Blumenkrantz bbede22850 lavapipe: KHR_swapchain_mutable_format
it Just Works(tm)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15808>
2022-04-07 23:06:05 +00:00
Jason Ekstrand dbfb0b4989 lavapipe: Go back to manually signaling in lvp_AcquireNextImage2()
When porting lavapipe to the common sync framework, I stole the dummy
sync signal_for_memory idea from RADV but didn't actually do it
correctly.  Unless you set wsi_device::signal_semaphore_with_memory and
wsi_device::signal_fence_with_memory, it doesn't actually signal
anything.  If you do set those, it works but also results in dummy
syncs being created for present fences which we see as signals.  We
could choose to just skip those like RADV does but that's too magic.
Instead, have our own AcquireNextImage2() again which sets dummy syncs.

Fixes: 3b547a9b58 ("lavapipe: Switch to the common sync framework")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15774>
2022-04-06 18:30:51 +00:00
Jason Ekstrand 77ffa61a14 lavapipe: Enable VK_EXT_debug_utils
It's implemented in common code as long as you use vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand 3b547a9b58 lavapipe: Switch to the common sync framework
The common Vulkan sync framework will do most of the queueing for us.
It will even sort out timeline semaphore dependencies and ensure
everything executes in-order.  All we have to do is make sure our
vk_sync type implements VK_SYNC_FEATURE_WAIT_PENDING.  This lets us get
rid of a big pile of code.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15651>
2022-04-06 00:38:22 +00:00
Mike Blumenkrantz 8b5c9e7c81 lavapipe: expose VK_EXT_image_2d_view_of_3d
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>
2022-04-05 20:30:31 +00:00
Mike Blumenkrantz 0be484ece4 lavapipe: add an env var to enable poisoning memory allocations
it's not random, but it's definitely not zero or any other expected
value, which means it's going to break anything that was passing due to lucky
uninitialized values

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15620>
2022-04-01 01:14:03 +00:00
Mike Blumenkrantz 5461a1cbaa lavapipe: enforce monotonic timeline incrementing
maybe just being overly paranoid, but make sure that the timeline id
gets compared while the lock is held in every scenario

cc: mesa-stable

Reviewed-by: Omar Akkila <omar.akkila@collabora.com>

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15453>
2022-03-30 02:47:45 +00:00
Mike Blumenkrantz 7aed40e4ab lavapipe: allow timeline progress in GetSemaphoreCounterValue
the vulkan spec doesn't explicitly state whether this function progresses
a given semaphore's timeline, and apparently there are some cases where
it's assumed that progress occurs if this function is called in a loop
instead of WaitSemaphores, so check the current fence for completion

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15453>
2022-03-30 02:47:45 +00:00
Mike Blumenkrantz aed49c89a5 lavapipe: display EXT_graphics_pipeline_library
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz 22fd70ca81 lavapipe: support KHR_pipeline_library
this is basically a no-op since raytracing isn't supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Mike Blumenkrantz 0918095b9a lavapipe: EXT_primitives_generated_query
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15636>
2022-03-29 12:41:51 +00:00
Jason Ekstrand 8068c68b1f lavapipe: Delete render passes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15431>
2022-03-24 18:37:14 -05:00
Boris Brezillon aa0c543533 lavapipe: Don't use VK_OUTARRAY_MAKE()/vk_outarray_append()
MSVC doesn't support typeof(). If we want to keep compiling radv on
windows we need to use the typed variants of those macros.

Fixes: dc8fdab71e ("lavapipe: Use VK_OUTARRAY for GetPhysicalDeviceQueueFamilyProperties[2]")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Lionel Landwerlin 3889dda1f1 vulkan: move EXT_tooling_info implementation to runtime
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15491>
2022-03-23 09:51:57 +00:00
Mike Blumenkrantz bd06680b61 lavapipe: KHR_synchronization2
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
2022-03-21 04:55:37 +00:00
Mike Blumenkrantz 6d62c671ab lavapipe: add QueueSubmit2 implementation
this converts the existing code to use VkSubmitInfo2 structs and adds
a new QueueSubmit wrapper which generates these structs from VkSubmitInfo

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
2022-03-21 04:55:37 +00:00
Mike Blumenkrantz a364f8c532 lavapipe 1.3
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15463>
2022-03-21 04:39:56 +00:00
Mike Blumenkrantz 0b8ecb5406 lavapipe: add a GetPhysicalDeviceToolPropertiesEXT stub
when no tools are loaded, this will otherwise crash

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15463>
2022-03-21 04:39:56 +00:00
Mike Blumenkrantz 741be76963 lavapipe: EXT_subgroup_size_control
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>
2022-03-21 04:09:48 +00:00
Mike Blumenkrantz 7f1050f207 lavapipe: EXT_inline_uniform_block
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
2022-03-21 03:58:14 +00:00
Mike Blumenkrantz 526e898dfc lavapipe: add a stream uploader to rendering_state and queue objects
not currently used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
2022-03-21 03:58:14 +00:00
Mike Blumenkrantz 40607f5088 lavapipe: KHR_shader_terminate_invocation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
2022-03-21 03:20:33 +00:00
Mike Blumenkrantz 82d3e7515e lavapipe: EXT_shader_demote_to_helper_invocation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
2022-03-21 03:20:33 +00:00
Michel Zou 49e2d39c66 lavapipe: fix i686 mingw build
Fixes: 987e8a5a
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15464>
2022-03-18 22:42:51 +00:00
Omar Akkila f18429340e lavapipe: Lift fence check into dedicated function
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15443>
2022-03-18 18:15:39 +00:00
Jason Ekstrand 68fe847a26 lavapipe: Drop GetPhysicalDeviceQueueFamilyProperties
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
2022-03-18 11:19:15 -05:00