Commit graph

1635 commits

Author SHA1 Message Date
Eric Engestrom
6d287943d1 vk/update-aliases: drop VK_ERROR_ prefix substitution
There is no code currently concatenating that string so it is not useful
to have it here, and it is triggering a loop because a substitution is
becoming itself if we remove this prefix.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28102>
2024-03-11 14:48:14 +00:00
Boris Brezillon
6fab8abebb vk/meta: Fix base_type selection in build_{clear,blit}_shader()
vk_format_is_int() returns true for both signed and unsigned integers,
which means unsigned types will always be assigned a GLSL_TYPE_INT type,
which causes some backend compilers (like bifrost) to pick a wrong
register type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28073>
2024-03-11 11:52:13 +00:00
Boris Brezillon
c722265c16 vk/meta: Add the PUSH_DESCRIPTOR_BIT flag when creating blit pipeline layouts
Descriptors are updated with CmdPushDescriptorSet(), we need to reflect
that with a VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR when
the DescriptorSetLayout is created.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28073>
2024-03-11 11:52:13 +00:00
Yiwei Zhang
c9d3cc2615 vulkan: refactor the runtime header gen order dependency
Summary:
- ensure headers used outside runtime are included in dependency source
- drop redundant idep_vulkan_common_entrypoints_h
- drop redundant icd side tricks for the order of header gen

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
d857f10574 vulkan: remove header files from lib source files
The generated "astc_spv.h" is for runtime internal use, so leave it
inside the runtime files to ensure the header is generated before being
used to compile.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
90824e07a2 vulkan: properly ensure wsi_entrypoints header gen order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
872c9fabeb vulkan: remove unused wsi_common_entrypoints include and dep
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Zan Dobersek
e29677b16d vulkan/rmv: enable logging miscellaneous internal resources
Add the vk_rmv_misc_internal_description struct and list the misc_internal
member of that type in the vk_rmv_resource_create_token union, allowing
logging of different internal resources in RMV dumps.

The vk_rmv_common.h header also has the C-linkage block added in order to
enable its inclusion in C++ files.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27631>
2024-03-08 11:34:17 +00:00
Yiwei Zhang
bffdd05a79 vulkan: fix runtime libraries' dep against generated headers
This change adds a new generated header dep to the runtime internal
library dependencies. This ensures the headers are generated before the
below libraries are compiled:
- libvulkan_lite_runtime (already satisfied due to file sources)
- libvulkan_lite_instance
- libvulkan_runtime
- libvulkan_instance

Fixes: fe2ec50844 ("vulkan: allow building venus without libcompiler")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28062>
2024-03-07 22:17:12 -08:00
Yonggang Luo
fe2ec50844 vulkan: allow building venus without libcompiler
This is done by introduce idep_vulkan_lite_runtime, and only venus
depends on  idep_vulkan_lite_runtime.

Modify the meson and source files to allow building venus without
the compiler.

See details Venus build metrics at the MR description.

gfxstream-vulkan forwards the shader to the host, and doesn't
need to convert into NIR in the guest.  This results in faster
builds and less parts of Mesa to build.  Also venus does the
same thing too, that's what the build is keyed on right now
as an in-tree user.

v7: By Yonggang Luo <luoyonggang@gmail.com>
  Add idep_vulkan_common_entrypoints_h into vulkan_lite_runtime_deps because
  vk_instance.c depends on idep_vulkan_common_entrypoints_h but vk_common_entrypoints is
  not compiled in library `vulkan_lite_instance`.
  Rename idep_vulkan_runtime_headers to idep_vulkan_lite_runtime_headers because
  both lite/full runtime library depends on this, but lite should not depends on full
  vk_meta_private.h added into vulkan_runtime_files

v6: By Yonggang Luo <luoyonggang@gmail.com>
  get vulkan_lite_runtime_files and vulkan_runtime_files sorted

v5: By Yiwei Zhang <zzyiwei@chromium.org>
  both vk_sampler and vk_ycbcr_conversion can stay in the lite runtime

v4: By Yonggang Luo <luoyonggang@gmail.com>
  only build vk_instance.(c|h) twice for reduce compiling time

v3: By Yiwei Zhang <zzyiwei@chromium.org>
  less code changes by introduce libvulkan_lite_runtime

v2: By Yonggang Luo <luoyonggang@gmail.com>
  allow building Vulkan without libcompiler without compiling flags, the
  venus is always built without libcompiler

v1: By Gurchetan Singh <gurchetansingh@google.com>
  allow building Vulkan without libcompiler

Signed-off-by: Gurchetan Singh <gurchetansingh@google.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574>
2024-03-07 20:33:28 +00:00
Yonggang Luo
a367cd4931 Revert "meson/vulkan/util: allow venus to drop compiler deps"
This reverts commit 3923d43908.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574>
2024-03-07 20:33:28 +00:00
Konstantin Seurer
f3fe1f2f18 vulkan: Implement DebugMarkerSetObjectNameEXT
DebugMarkerSetObjectNameEXT is just a less powerful version of
SetDebugUtilsObjectNameEXT. Fixes the objectType cast warning as well.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27975>
2024-03-07 19:28:53 +00:00
Konstantin Seurer
ff09e95080 vulkan/cmd_queue: Implement CmdBuildAccelerationStructuresKHR
This is needed for copying the arguments properly.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:25 +00:00
qbojj
4b7f4724f8 vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill
Fixes: 2b62d90158 ("vk/graphics_state: Support VK_KHR_maintenance5")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10705
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27929>
2024-03-06 07:54:28 +00:00
Faith Ekstrand
d1cf01dc52 vulkan/pipeline: Always init pipeline cache objects
vk_shader_init_cache_obj() is fast enough and the already-found case is
rare enough that there's no good reason to avoid the init.  This allows
us to use vk_shader_unref instead of vk_shader_destroy which is probably
a touch safer over-all.  It also fixes the assert that the two shaders
have matching keys.

Fixes: bb8b11d806 ("vulkan/pipeline: Handle fully compiled library shaders properly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10752
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27993>
2024-03-05 23:12:34 +00:00
Yonggang Luo
1e97fded47 vulkan/runtime: Mark vk_default_dynamic_graphics_state to be private
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Yonggang Luo
db103c56ab treewide: Remove vulkan/runtime vulkan/util prefix in include path
This is for unify the include style of shared vulkan headers

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Friedrich Vock
e7d78a7b87 vulkan/runtime: Allow more than 8 DRM devices
Some people seem to have systems with more than 8 GPUs installed at
once. 256 is the maximum number of devices returned by libdrm, so using
this seems like a good choice for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27901>
2024-03-01 21:18:44 +00:00
Derek Foreman
7f72eb9e6c vulkan/wsi/wayland: More descriptive name for swapchain queue
We can have multiple swapchains, and we can also have retired swap chains
that can continue to deliver events briefly after being replaced. It's
helpful to have both a surface id and a per surface swapchain id.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27852>
2024-02-29 21:45:57 +00:00
Hans-Kristian Arntzen
73c1fbfc79 wsi/wayland: Replace surface pilfer with retired bool.
PresentWait can still be called on a retired swapchain, and pilfering
the WSI surface can cause issues. To avoid retired swapchains
interfering with non-retired swapchain event queue, flag a swapchain as
retired instead and immediately return OUT_OF_DATE from acquire and
present.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
c7dc82e3e8 vulkan/wsi/wayland: Use wl_display_dispatch_queue_timeout
Instead of coding our own polling function, use the (new) wayland
wl_display_dispatch_queue_timeout() function instead.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
7eaceb0392 vulkan/wsi/wayland: Adjust presentation id locking
If we want to use the new wl_display_dispatch_queue_timeout function
in libwayland we lose the ability to drop the lock while we poll
and pick it up again to dispatch.

That would cause other waiters to potentially block past their
timeouts while waiting for the dispatching thread's timeout.

Prepare for this change now by dropping the lock for the entire
dispatch, and reacquiring the lock in the functions being dispatched.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
fb22b69df3 vulkan/wsi/wayland: Remove confusing comment
We do own the lock if there's a timeout, and the code is written with that
in mind - but the comment seems to imply otherwise.

Drop it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Eric Engestrom
64f037e079 vk/util: print a nice error in vk_icd_gen.py when VK_HEADER_VERSION is not defined
Shouldn't be reachable in normal case, but when messing with vk.xml it's
nicer than the current:

    TypeError: can only concatenate str (not NoneType) to str

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27779>
2024-02-29 14:25:49 +00:00
Eric Engestrom
3f2790adcd vk/util: trivial cleanups in vk_icd_gen.py
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27779>
2024-02-29 14:25:49 +00:00
Mike Blumenkrantz
5d91db9666 vulkan/dispatch_table: add an uncompacted version of the table
this is a bandaid fix that allows users (zink) to actually call the
functions intended to be called. the real fix would be to figure out
which extensions are enabled on the device and then only GPA the
functions associated with those extensions

that's too hard though so I'm slapping some flex tape on it

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27834>
2024-02-29 11:18:18 +00:00
Faith Ekstrand
bb8b11d806 vulkan/pipeline: Handle fully compiled library shaders properly
In the fast-link case, we should just use the library shader and assume
that it's correct.  We have to do this because we may not have a
precompiled shader in this case so we can't even generate the shader
hash.

In the link optimization case, we could still have a library shader
coming in from some library pipeline.  That shader may happen to be
correct, in which case we can just use it and not even bother digging
around in the cache.  In the more likely case, the keys won't match and
we should throw it away before we look up a different shader in the
cache and leak our reference.

Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementation")
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
Faith Ekstrand
d9908af9d2 vulkan/pipeline: Whitespace fix
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
Chia-I Wu
f623c27eab meson: fix a build ereror
Fixes

  src/vulkan/wsi/meson.build:71:13:
  ERROR: Unknown variable "libloader_wayland_helper".

for headless vulkan-only builds.

Fixes: a00f9c401b ("loader/wayland: Add fallback wl_display_dispatch_queue_timeout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27837>
2024-02-28 15:03:05 +00:00
Robert Beckett
9c096e23c0 vulkan/wsi: fix force_bgra8_unorm_first
fixes: 7c16a1ae vulkan/wsi: Add a driconf option to force WSI to advertise BGRA8_UNORM first

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23991>
2024-02-28 13:20:56 +00:00
Derek Foreman
61cfabda5d vulkan/wsi/wayland: Give names to our Wayland event queues
Named queues just add a little bit more debugging information.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Faith Ekstrand
9308e8d90d vulkan: Add generic graphics and compute VkPipeline implementations
These implementations are built on top of vk_shader.  For the most part,
the driver shouldn't notice a difference between draws consuming
pipelines vs. draws consuming shaders.  The only real difference is
that, when vk_driver_shader_ops::compile() is called for pipelines, a
struct vk_graphics_pipeline_state is provided.  For shader objects, the
state object will be NULL indicating that all state is unknown.  Besides
that, all the rest of the differences between Vulkan 1.0 pipelines,
VK_EXT_graphics_pipeline_library, and VK_EXT_shader_object are handled
by the Vulkan runtime code.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
c488dc9f50 vulkan: Add a BLAKE3 hash to vk_descriptor_set_layout
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
682b99a63f vulkan: Add push constant ranges to vk_pipeline_layout
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
e2cb395a1f vulkan: Add a vk_pipeline base struct
We need to be able to thunk through a destroy callback if we want to
have different kinds of pipelines implemented in different parts of the
stack.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
5e71e6f3f6 vulkan: Add a new dynamic state for render pass attachments
This is useful for implementing VK_EXT_dynamic_rendering_unused_attachments

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
6ec177b116 vulkan: Rework vk_render_pass_state::attachments
The new bitfield has a separat flag for each of the color attachments.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
c09c086c12 vulkan: Add a vk_render_pass_state_has_attachment_info() helper
We already have a helper like this internally.  Give it a better name
and expose it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
9f62008bff vulkan: Add runtime code for VK_EXT_shader_object
This adds a new base vk_shader object along with vtables for creating,
binding, and working with shader objects.

Unlike other parts of the runtime, the new shader object code is a bit
more sanitized and opinionated than just handing you the Vulkan
entrypoints.  For one thing, the create_shaders() calback takes a NIR
shader, not SPIR-V.  Conversion of SPIR-V into NIR, handling of magic
meta NIR shaders, etc. is all done in common code.  [De]serialization is
done via `struct blob` and the common code does a checksum of the binary
and handles rejecting invalid binaries based on shaderBinaryUUID and
shaderBinaryVersion.  This should make life a bit easier for driver
authors as well as provides a bit nicer interface for building the
common pipeline implementation on top of shader objects.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Connor Abbott
0d225c9e43 vk/graphics_state: Add stubs required by VK_EXT_shader_objects
Because these functions were introduced by VK_EXT_shader_objects, we
technically have to expose them even though they have to do with NV
extensions that no one else supports.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Connor Abbott
657b8e5264 vk/graphics_state: Remove bogus assert in CmdSetSampleMaskEXT
We're supposed to just ignore samples above what we support, and there's
no VU matching this assert. Fixes a crash in
dEQP-VK.pipeline.shader_object_unlinked_spirv.extended_dynamic_state.misc.sample_shading_dynamic_sample_count.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
Faith Ekstrand
6ad294202e vulkan: Move the descriptor set limit to vk_limits.h
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
Faith Ekstrand
498d58a5f8 vulkan: Add a vk_get_subgroup_size() helper
No reason to duplicate this logic between pipelines and shader objects.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
Sebastian Wick
0fe7e06f5f vulkan/wsi/wayland: Use dispatch_queue_timeout in acquire_next_image
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Sebastian Wick
a00f9c401b loader/wayland: Add fallback wl_display_dispatch_queue_timeout
This is almost a 1:1 copy of the same function in libwayland. If the version
with the symbol propagates far enough the fallback can be removed again.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Pierre-Eric Pelloux-Prayer
a8a4bcec36 wsi/wl: check wsi_wl_surface's validity before use
Fixes: 9a00a360ad ("wsi/wl: flush connection on swapchain failure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27767>
2024-02-26 16:56:27 +00:00
Faith Ekstrand
a72bcc0a26 vulkan/meta: Handle VK_REMAINING_ARRAY_LAYERS in blit and resolve
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Alyssa Rosenzweig
a97966b840 vulkan: add vk_index_type_to_restart helper
from nvk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764>
2024-02-26 14:13:07 +00:00
Pierre-Eric Pelloux-Prayer
9a00a360ad wsi/wl: flush connection on swapchain failure
wayland-client stores up to MAX_FDS_OUT (28) outgoing fds and
then release them in batch later through close_fds.

While this is not a problem in normal situation, because the
app would also have a reference to the same buffers, this is
an issue when these buffers are released (eg: because the
swapchain creation failed).
In this situation wayland-client owns the last ref to these
buffers and prevent their deletion.

This is an issue with dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_extent
because it creates swapchains in a fast loop with a failing allocator
to fail the swapchain creation.
Without this change, on a 16GB dGPU the test peaks at 95% VRAM / 60% GTT and
completes in 1.5 sec.
With this change, the max usage is 65% VRAM / 10% GTT and  completes it
in 0.3 sec.

Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27592>
2024-02-22 14:32:26 +00:00
Mike Blumenkrantz
1e849b12f5 vk/wsi/x11/sw: use swapchain depth for putimage
this is otherwise broken for 32bit depth windows

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27605>
2024-02-20 15:47:45 +00:00