Commit Graph

207 Commits

Author SHA1 Message Date
Mike Blumenkrantz b7fbaf924d lavapipe: EXT_pipeline_creation_cache_control
again, technically passing is still passing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15379>
2022-03-16 04:46:06 +00:00
Mike Blumenkrantz 9bce878490 lavapipe: EXT_pipeline_creation_feedback
cts passes with mostly quality warnings, but it does pass

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15379>
2022-03-16 04:46:06 +00:00
Mike Blumenkrantz dffe8141bd lavapipe: KHR_zero_initialize_workgroup_memory
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15403>
2022-03-16 04:05:14 +00:00
Mike Blumenkrantz f72d5a930b lavapipe: KHR_format_feature_flags2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15395>
2022-03-16 02:12:05 +00:00
Mike Blumenkrantz 40fcd8ef83 lavapipe: enable KHR_memory_model support
lavapipe's memory is always coherent, so this is already supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15377>
2022-03-15 22:17:43 +00:00
Mike Blumenkrantz 1b2c4d7196 lavapipe: KHR_shader_integer_dot_product
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15384>
2022-03-15 18:07:47 +00:00
Mike Blumenkrantz a33a07bd06 lavapipe: maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz b2f69a8bb8 lavapipe: set maxBufferSize for maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz 987e8a5a0c lavapipe: implement vkGetDevice*MemoryRequirements
for maint4

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz 21abb01fb9 lavapipe: make device limits a physical device struct
it's useful to have this info around and a bit simpler to gather
info on init

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14656>
2022-03-11 04:26:28 +00:00
Jason Ekstrand f7175bf416 lavapipe: Use the common vk_enqueue_CmdBindDescriptorSets
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15329>
2022-03-10 21:08:36 +00:00
Boris Brezillon b98cfe9cb4 lavapipe: Re-use auto-generated vk_cmd_enqueue entrypoints
Re-use auto-generated vk_cmd_enqueue entrypoints instead of generating
our own version doing the same thing.  In order to effectively do this,
we also add an allow-list of which entrypoints lavapipe actually handles
to avoid issues where the autogenerated one stomps a vkCmdFoo2 wrapper.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15311>
2022-03-10 15:52:10 +00:00
Michel Zou bf7777a5d4 lavapipe: set non-zero device/driver uuid
Closes #5875

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15230>
2022-03-09 15:10:45 +00:00
Mike Blumenkrantz fcf58e75d0 lavapipe: heap-allocate rendering_state struct
this thing is like 28k now, which is just way too big to have on the stack

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15233>
2022-03-07 03:56:46 +00:00
Mike Blumenkrantz 07c0801e60 lavapipe: EXT_depth_clip_control
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15126>
2022-02-25 05:27:27 +00:00
Dave Airlie 604ed15e56 lavapipe: handle non-timeline semaphores wait/signal.
When llvmpipe is allowed execute fragment shaders overlapping
with other stuff, we have to start using the pipe fences.

With presentation, the acquire path needs to signal a semaphore
that can be waited on by the user, so add support for passing
signal/wait semaphores for non-timeline in, and just put a
fence pointer in the semaphore for that case.

This fixes rendering once we allow overlapping rasterization.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14923>
2022-02-21 03:52:02 +00:00
Dave Airlie 1f1e62c15d lavapipe: handle endless fence timeout properly.
If the users ask for an infinte timeout, just pass it through
to gallium.

When llvmpipe ends up allowing async fragment shaders, it's important
to get this right for lots of CTS tests.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14923>
2022-02-21 03:52:02 +00:00
Dave Airlie b805d3e6ab lavapipe: reference gallium fences correctly.
Make sure to take references in all the correct places to get
right lifetimes for these objects and avoid leaks.

Fixes: 94a4982805 ("lavapipe: implement timeline semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15046>
2022-02-17 00:01:39 +00:00
Charles Giessen 6eb8ceac87 lavapipe: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
2022-01-20 07:25:07 +00:00
Konstantin Seurer 2b5cf84efd lavapipe: Fixed maxFragmentCombinedOutputResources
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14320>
2022-01-10 19:28:17 +00:00
Thomas H.P. Andersen 107c63aee8 lavapipe: fix string-plus-int warning
Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 16:22:53 +01:00
Thomas H.P. Andersen 57f6ef69b9 lavapipe: fix implicit-fallthrough warning
Fixes a warning on clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>
2021-12-22 17:02:00 +00:00
Juan A. Suarez Romero 38c953e287 gallium: add new PIPE_CAP_IMAGE_STORE_FORMATTED
This capability is enabled for drivers supporting formatless image
writing in shader.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13409>
2021-12-03 15:32:36 +00:00
Michel Zou 0daed2dc6b lavapipe: fix unused variable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13892>
2021-11-23 19:11:05 +00:00
Marek Olšák b80dca86c3 gallium: rename PIPE_CAPF_MAX_POINT_WIDTH -> MAX_POINT_SIZE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13676>
2021-11-08 14:37:49 +00:00
Mike Blumenkrantz 8a6160a354 lavapipe: VK_KHR_dynamic_rendering
this is a conformant implementation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>
2021-11-04 03:22:09 +00:00
Jason Ekstrand 79f57f6893 lavapipe: Don't wrap errors returned from vk_device_init in vk_error
vk_device_init already calls vk_error so this is redundant.  Also, it
makes vk_error grumpy to see a VK_ERROR_FEATURE_NOT_PRESENT on an
instance rather than a physical device.

Fixes: 47adb11143 ("lavapipe: Switch to the new vk_error helpers")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13619>
2021-11-01 14:30:32 +10:00
Dave Airlie 75dc302340 lavapipe: drop EXT_acquire_xlib_display
This has a requirement on the display extensions.

VK-GL-CTS: dEQP-VK.info.instance_extensions

Fixes: 1d574d4860 ("lavapipe: remove display extension support")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13616>
2021-11-01 09:46:24 +10:00
Jason Ekstrand 8c4d78c764 lavapipe: Use the common WSI wrappers
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13234>
2021-10-13 00:06:15 +00:00
Jason Ekstrand 47adb11143 lavapipe: Switch to the new vk_error helpers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045>
2021-10-07 20:51:36 +00:00
Dave Airlie b1f15b4f4d Revert "lvp/fence: quick fix to previous commit."
This reverts commit 028591954a.

This wasn't the correct fix, that is coming up.

Fixes: 028591954a ("lvp/fence: quick fix to previous commit.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13218>
2021-10-06 20:52:09 +00:00
Mike Blumenkrantz 1d574d4860 lavapipe: remove display extension support
lavapipe doesn't actually support these

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13141>
2021-10-06 14:19:35 +00:00
Thomas Wagner fe1a091bd0 lavapipe: enable KHR_external_memory_fd
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Heinrich Fink <hfink@snap.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345>
2021-10-06 13:49:08 +00:00
Thomas Wagner 895d3399f7 lavapipe: add support for KHR_external_memory_fd
Support creating exportable memory. Use memfd file
descriptors and import/export them as opaque fd handles.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Heinrich Fink <hfink@snap.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345>
2021-10-06 13:49:08 +00:00
Dave Airlie 028591954a lvp/fence: quick fix to previous commit.
This fixes last of xcb cts issues.

Fixes: 8a294b6f975e1 ("lavapipe: Fix vkWaitForFences for initially-signalled fences")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13212>
2021-10-06 15:27:33 +10:00
Pavel Asyutchenko b9617bc621 lavapipe: Fix vkWaitForFences for initially-signalled fences
Fences with VK_FENCE_CREATE_SIGNALED_BIT are created with
signalled=true and timeline=0, waiting on them without
submitting first returned VK_TIMEOUT instead of VK_SUCCESS.

Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13128>
2021-10-06 15:11:04 +10:00
Mike Blumenkrantz 96ea718b7e lavapipe: EXT_4444_formats support
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12001>
2021-10-06 04:35:25 +00:00
Tapani Pälli 54325dd138 lavapipe: remove feature checks from device creation
This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>
2021-10-01 17:37:02 +00:00
Jason Ekstrand 06ac3b1bea lavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand f3040c6e05 lavapipe: Simplify DeviceWaitIdle
No reason to duplicate the guts of QueueWaitIdle inside DeviceWaitIdle.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand 6c8b0b35a6 lavapipe: Drop lvp_queue::flags
It's now part of vk_queue

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand b2313b6884 vulkan: Add the pCreateInfo to vk_queue_init()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Dave Airlie 03097f30fb lavapipe: move to new shared features/properties
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
2021-09-27 16:35:54 +10:00
Dave Airlie 08b54ebe98 lavapipe: enable vulkan 1.2 support.
The remaining extensions are optional features, just turn on vk 1.2
with them reporting as off.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
2021-09-27 16:35:49 +10:00
Dave Airlie 6f6f7d2680 gallivm/nir: fix subgroup invocation read.
Again if you get passed an invoc but the exec mask has the
active lane somewhere other than at 0, then if we have an
invoc we should find the active lane and extract the value
from invoc rather than using the idx.

This fixes a bunch of VK 1.2 subgroup tests once 1.2 is enabled:
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_nonconst*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
2021-09-27 16:35:45 +10:00
Dave Airlie c7907fe1a1 lavapipe: move to 1.2 features/properties structs.
This just adds all the wrappers in the right places hopefully

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
2021-09-27 16:35:03 +10:00
Mike Blumenkrantz a8e123cd1c lavapipe: add support for KHR_shader_float_controls
These pass all the CTS tests, though not sure how useful they are.

[airlied: these may need some work in the future depending on app expectations]

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
2021-09-27 16:34:34 +10:00
Yevhenii Kolesnikov 9d40877f72 lavapipe: Use a common vk_queue structure
Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
2021-09-23 15:57:46 +00:00
Dave Airlie 86399c1b1f lavapipe: enable KHR_spirv_1_4
One test fails but I think it's a missing barrier in the test

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12888>
2021-09-17 05:38:29 +10:00
Dave Airlie c1de9eff01 lavapipe: enable KHR_shader_subgroup_extended_types
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
2021-09-16 04:15:41 +00:00
Dave Airlie 3a27e406ed lavapipe: enable KHR_shader_float16_int8
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
2021-09-16 04:15:41 +00:00
Dave Airlie d9a784520a lavapipe: enable dynamic index ubo/ssbo
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689>
2021-09-16 08:05:59 +10:00
Roland Scheidegger 1a554fd610 lavapipe: implement VK_EXT_depth_clip_enable
v2: fix pipeline creation, need a deep copy for rasterization state now

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260>
2021-09-09 18:29:26 +00:00
Mike Blumenkrantz 9be8c48058 lavapipe: support EXT_primitive_topology_list_restart
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12627>
2021-09-01 22:01:03 +00:00
Dave Airlie 07956bbcae lavapipe: VK_KHR_depth_stencil_resolve support
This adds support for depth stencil resolves to lavapipe.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>
2021-08-31 23:26:45 +00:00
Erik Faye-Lund a16f3963d3 lavapipe: fix reported subpixel precision for lines
We have no reason to report a subpixel precision of 4 for lines; in fact
LLVMpipe uses 8 subpixel bits for lines, similar to other primitives.
But let's use the pipe-cap for this instead of hard-coding it.

Fixes: 9fbf6b2abf ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12277>
2021-08-24 08:45:20 +00:00
Michel Zou 8bb9e9e76f lavapipe: fix missing VKAPI_CALL attribute
Fixes build on mingw

Fixes: c198adf7

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12484>
2021-08-21 16:46:43 +02:00
Dave Airlie c198adf718 lavapipe: add host ptr support.
This actually doesn't need any backend support.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12316>
2021-08-11 09:58:17 +10:00
Erik Faye-Lund 7d3ab96f39 lavapipe: lower mipmapPrecisionBits to 4
Through some exhaustive searching, I've found that our log2 approximation
is precise to around 3.5 bits. And the squaring step should increase the
result with one bit, leaving us with 4.5 bits of precision.

Reporting the right mipmap precision fixes a few CTS-tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12238>
2021-08-09 06:27:10 +00:00
xantares 48980b7b7a lavapipe: Fix 32bits windows build
Fixes: 94a49828
Closes #5161

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12165>
2021-08-02 17:59:37 +00:00
Mike Blumenkrantz 94a4982805 lavapipe: implement timeline semaphores
this uses a singly-linked list of timeline ids to compare against the device
queue's cmdbuf counter and determine which timeline id maps to which cmdbuf and
thus which fence can be waited on

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071>
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz 326253786e lavapipe: use consistent semaphore variable naming
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071>
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz 032d4a0e7d lavapipe: rework queue to use u_queue
this simplifies the entire queue mechanism and makes it more consistent:
previously some cases (e.g., null cmdbuf submission) would immediately
be marked as finished, which meant that fences could theoretically become
desynchronized, breaking application assumptions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12071>
2021-07-29 00:06:10 +00:00
Mike Blumenkrantz 1769ce3404 lavapipe: add support for anisotropic texturing
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8804>
2021-07-21 10:19:51 +10:00
Mike Blumenkrantz 578190c0fe lavapipe: implement VK_EXT_color_write_enable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961>
2021-07-19 21:21:59 +00:00
Dave Airlie 9d225c43cb lavapipe: add the separate depth/stencil layout enable.
This was missing.

Fixes: ac07ad8414 ("lavapipe: implement KHR_separate_depth_stencil_layouts")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11840>
2021-07-13 02:15:20 +00:00
Erik Faye-Lund 1ac29863a9 lavapipe: expose strict-lines feature
The strictLines-feature requires lines to be rasterized as rectangles
by default instead of using the parallelograms you get from extending
bresenham lines along their minor axis.

Now that we can specify the line mode fully we can actually express
this, so let's do so.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund 29ceb80834 lavapipe: re-expose line-rasterization extension
While we're at it, let's also enable rectangular line support, now that
we can properly control it.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund 3720447204 lavapipe: expose more storage-image features
I believe these Gallium caps imply these Vulkan features. If they don't,
then we got things wrong on the Zink side as well ;)

While we're at it, query shaderStorageImageWriteWithoutFormat based on
the PIPE_SHADER_CAP_MAX_SHADER_IMAGES cap. This matches what the gallium
OpenGL frontend does.

This brings Zink on Lavapipe up to OpenGL 4.5.

For some reason, a bunch of PBO tests starts failing on CI for Zink, but
that doesn't seem like a Lavapipe problem...

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Mike Blumenkrantz 97c19ac358 lavapipe: disable line rasterization ext
need to add some gallium hooks for line drawing mode before this can
be reliably supported

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11762>
2021-07-07 14:32:16 +00:00
Mike Blumenkrantz 6741e4be31 lavapipe: implement EXT_extended_dynamic_state2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11736>
2021-07-07 02:13:20 +00:00
Mike Blumenkrantz ac07ad8414 lavapipe: implement KHR_separate_depth_stencil_layouts
this is a conformant implementation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
2021-07-06 17:09:31 -04:00
Mike Blumenkrantz 9bbe80accd lavapipe: implement EXT_separate_stencil_usage
this is a conformant implementation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
2021-07-06 17:09:31 -04:00
Thomas H.P. Andersen 8795501cef lavapipe: remove initialization override
These are duplicates from a few lines up

Reviewed-by: Dave Airlie <airlied@redhat.com>
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/11703>
2021-07-05 19:49:32 +00:00
Mike Blumenkrantz 3292a9d660 lavapipe: wideLines support
easy enough

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11041>
2021-07-05 14:14:40 +00:00
Mike Blumenkrantz 9fbf6b2abf lavapipe: implement VK_EXT_line_rasterization
rectangular and strict lines aren't supported in this, and multisampling
must be disabled for correct line rasterization

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Georg Lehmann 0556173918 lavapipe: Use common default allocator.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11114>
2021-07-01 17:09:02 +00:00
Dave Airlie 75a8246563 gallium/sw: add sw_vk bit to avoid having to futz with env vars for lavapipe
lavapipe really only currently works with llvmpipe, and likely for the forseeable
future.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11643>
2021-07-01 10:27:44 +00:00
Mike Blumenkrantz 5951d2abac lavapipe: implement EXT_vertex_input_dynamic_state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11231>
2021-07-01 00:37:08 +00:00
Mike Blumenkrantz f99f7c06e7 lavapipe: implement multidraw ext
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11533>
2021-06-24 01:35:33 +00:00
Mike Blumenkrantz 5b3e8d3d6f lavapipe: use cso caching
really this only needs cso_cache api, but it's cumbersome to redo all
the hashing and state creation, so just use the whole context

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11071>
2021-06-11 17:19:36 +00:00
Mike Blumenkrantz cf3f17a643 lavapipe: fix fencing when submitting multiple cmdbufs
a fence applies to all the submitted cmdbufs, so it's necessary to do
the flush which creates the user fence after all the cmdbufs have been
processed in order to avoid creating a fence that only applies to the
first cmdbuf

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10795>
2021-05-14 03:03:32 +00:00
Erik Faye-Lund 790b9a5872 lavapipe: correct reported number of UBOs
When emitting the state we add one to the UBO index, so we have to
subtract one from the number of UBOs that we support. This is still
fine, because Vulkan only requires 14 UBOs to be supported, and LLVMpipe
supports 16.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10731>
2021-05-12 10:52:36 +02:00
Erik Faye-Lund e10618f6f5 lavapipe: report out-of-memory when binding
This isn't the perfect error-code, but we don't really have anything
better, it seems.

The ideal fix here would be to fix LLVMpipe to support larger textures,
but this is probably as far as I'm interested in chasing down this path
for now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
2021-05-10 16:38:04 +00:00
Mike Blumenkrantz 49f93a4c5e lavapipe: set events to the unsignalled state on creation
this is otherwise uninitialized and not compliant with spec

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>
2021-05-06 14:59:31 +00:00
Mike Blumenkrantz 0e439541a5 lavapipe: implement VK_EXT_provoking_vertex
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Dave Airlie 6d3ded7995 lavapipe: add support for non-dri loader on linux
If you build --glx=gallium-xlib then lavapipe will fail to
link this should let it use the non-dri paths on Linux in that
case

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9400>
2021-04-20 01:00:54 +00:00
Erik Faye-Lund bd1b0c3266 lavapipe: implement VK_EXT_custom_border_color
This fixes a bunch of piglit failures on Zink.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10320>
2021-04-19 14:01:41 +00:00
Erik Faye-Lund a20e0b8a97 lavapipe: resolve border-color when creating sampler
This is going to make it easier to implement the custom border-color
extension.

While we're moving the code, tweak the memset code a bit, so we don't do
any float-ism in the int-case. It doesn't change anything functionally,
just makes it slightly clearer what's going on here.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10320>
2021-04-19 14:01:41 +00:00
Erik Faye-Lund 3ebe604ad6 lavapipe: ask pipe-driver for int16 support
We shouldn't assume the driver can deal with int16 unless it reports
that it can.

... And LLVMpipe isn't quite there yet, see this MR for details:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189>
2021-04-14 09:17:00 +00:00
Erik Faye-Lund ffe534f27b lavapipe: check all graphics stages
For these caps, we need to check all stages to be sure we've got things
right.

Again, this is probably benign, because LLVMpipe should support the same
value for all stages.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189>
2021-04-14 09:17:00 +00:00
Erik Faye-Lund d91a549b67 lavapipe: check all vertex-stages
We should really check for the minimum of all supported vertex-stages
here, not just the vertex-shader.

This shouldn't make any real-world difference, because we really only
support LLVMpipe here, and that driver has the same limits for all
stages. But it seems better to actually check all stages instead of just
assuming.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189>
2021-04-14 09:17:00 +00:00
Erik Faye-Lund 83de54f6a6 lavapipe: do not subtract 8 from enum
This seems arbitrary, and makes us check for PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS
instead of PIPE_SHADER_CAP_MAX_SHADER_IMAGES, which isn't what we want.

The end result is that we accidentally exposed 128 shader images,
instead of 16. This can lead to us writing outside of the array of
shader images in llvmpipe_set_shader_images, among other bad things.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189>
2021-04-14 09:17:00 +00:00
Dave Airlie 8343dfe059 lavapipe: add dummy sampler ycbcr conversion
This at least keeps the CTS tests happy.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10098>
2021-04-08 20:13:23 +00:00
Dave Airlie 2a92e9ee3f lavapipe: add vk1.1 image swapchain support
Adding support to create images from memory in the swapchain.
Just missed this in my pass of 1.1 features

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10099>
2021-04-08 20:02:26 +00:00
Dave Airlie e1eb72ae3c lavapipe: enable Vulkan 1.1 support
This is not fully conformant but the failures are the same as the Vulkan 1.0
failures.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
2021-04-07 19:56:17 +00:00
Dave Airlie 7b79db11c2 lavapipe: enable correct workgroup sizing
If I say layering violation, you say?

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
2021-04-07 19:56:17 +00:00
Dave Airlie 34525bb088 lavapipe: enable subgroups features
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
2021-04-07 19:56:17 +00:00
Dave Airlie 8a18ed018b lavapipe: fix missing protected memory properties
This is needed for vk 1.1

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
2021-04-07 19:56:17 +00:00
Dave Airlie e47b742810 lavapipe: add vulkan 1.1 properties/features apis
Still have to add subgroups before advertising 1.1

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
2021-04-07 19:56:17 +00:00