mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
vulkan/wsi: Use HAVE_LIBDRM to detect DRM instead of !_WIN32
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17170>
This commit is contained in:
parent
a7127fbc4c
commit
64d074879b
2 changed files with 6 additions and 4 deletions
|
|
@ -865,7 +865,7 @@ wsi_signal_semaphore_for_image(struct vk_device *device,
|
|||
|
||||
vk_semaphore_reset_temporary(device, semaphore);
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef HAVE_LIBDRM
|
||||
VkResult result = wsi_create_sync_for_dma_buf_wait(chain, image,
|
||||
VK_SYNC_FEATURE_GPU_WAIT,
|
||||
&semaphore->temporary);
|
||||
|
|
@ -897,7 +897,7 @@ wsi_signal_fence_for_image(struct vk_device *device,
|
|||
|
||||
vk_fence_reset_temporary(device, fence);
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef HAVE_LIBDRM
|
||||
VkResult result = wsi_create_sync_for_dma_buf_wait(chain, image,
|
||||
VK_SYNC_FEATURE_CPU_WAIT,
|
||||
&fence->temporary);
|
||||
|
|
@ -1075,7 +1075,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
|||
VkFence fence = swapchain->fences[image_index];
|
||||
|
||||
bool has_signal_dma_buf = false;
|
||||
#ifndef _WIN32
|
||||
#ifdef HAVE_LIBDRM
|
||||
result = wsi_prepare_signal_dma_buf_from_semaphore(swapchain, image);
|
||||
if (result == VK_SUCCESS) {
|
||||
assert(submit_info.signalSemaphoreCount == 0);
|
||||
|
|
@ -1108,7 +1108,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail_present;
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef HAVE_LIBDRM
|
||||
if (has_signal_dma_buf) {
|
||||
result = wsi_signal_dma_buf_from_semaphore(swapchain, image);
|
||||
if (result != VK_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ void
|
|||
wsi_destroy_image(const struct wsi_swapchain *chain,
|
||||
struct wsi_image *image);
|
||||
|
||||
#ifdef HAVE_LIBDRM
|
||||
VkResult
|
||||
wsi_prepare_signal_dma_buf_from_semaphore(struct wsi_swapchain *chain,
|
||||
const struct wsi_image *image);
|
||||
|
|
@ -208,6 +209,7 @@ wsi_create_sync_for_dma_buf_wait(const struct wsi_swapchain *chain,
|
|||
const struct wsi_image *image,
|
||||
enum vk_sync_features sync_features,
|
||||
struct vk_sync **sync_out);
|
||||
#endif
|
||||
|
||||
struct wsi_interface {
|
||||
VkResult (*get_support)(VkIcdSurfaceBase *surface,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue