wsi: Guard DRM-dependent function implementations with HAVE_LIBDRM
Adress an implicit function declaration error by ensuring that DRM-dependent
functions are only compiled when HAVE_LIBDRM is set.
Fixes: 59813ae468 ("wsi: Add common infrastructure for explicit sync")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29267>
This commit is contained in:
committed by
Marge Bot
parent
930e4fa283
commit
d93d989e5d
@@ -908,7 +908,6 @@ wsi_drm_wait_for_explicit_sync_release(struct wsi_swapchain *chain,
|
||||
uint64_t rel_timeout_ns,
|
||||
uint32_t *image_index)
|
||||
{
|
||||
#ifdef HAVE_LIBDRM
|
||||
STACK_ARRAY(uint32_t, handles, image_count);
|
||||
STACK_ARRAY(uint64_t, points, image_count);
|
||||
STACK_ARRAY(uint32_t, indices, image_count);
|
||||
@@ -989,7 +988,4 @@ done:
|
||||
return rel_timeout_ns ? VK_TIMEOUT : VK_NOT_READY;
|
||||
else
|
||||
return VK_ERROR_OUT_OF_DATE_KHR;
|
||||
#else
|
||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1893,11 +1893,16 @@ wsi_wl_swapchain_acquire_next_image_explicit(struct wsi_swapchain *wsi_chain,
|
||||
for (uint32_t i = 0; i < chain->base.image_count; i++)
|
||||
images[i] = &chain->images[i].base;
|
||||
|
||||
VkResult result = wsi_drm_wait_for_explicit_sync_release(wsi_chain,
|
||||
wsi_chain->image_count,
|
||||
images,
|
||||
info->timeout,
|
||||
image_index);
|
||||
VkResult result;
|
||||
#ifdef HAVE_LIBDRM
|
||||
result = wsi_drm_wait_for_explicit_sync_release(wsi_chain,
|
||||
wsi_chain->image_count,
|
||||
images,
|
||||
info->timeout,
|
||||
image_index);
|
||||
#else
|
||||
result = VK_ERROR_FEATURE_NOT_PRESENT;
|
||||
#endif
|
||||
STACK_ARRAY_FINISH(images);
|
||||
|
||||
if (result == VK_SUCCESS)
|
||||
|
||||
@@ -1240,12 +1240,16 @@ x11_wait_for_explicit_sync_release_submission(struct x11_swapchain *chain,
|
||||
for (uint32_t i = 0; i < chain->base.image_count; i++)
|
||||
images[i] = &chain->images[i].base;
|
||||
|
||||
VkResult result =
|
||||
wsi_drm_wait_for_explicit_sync_release(&chain->base,
|
||||
chain->base.image_count,
|
||||
images,
|
||||
rel_timeout_ns,
|
||||
image_index);
|
||||
VkResult result;
|
||||
#ifdef HAVE_LIBDRM
|
||||
result = wsi_drm_wait_for_explicit_sync_release(&chain->base,
|
||||
chain->base.image_count,
|
||||
images,
|
||||
rel_timeout_ns,
|
||||
image_index);
|
||||
#else
|
||||
result = VK_ERROR_FEATURE_NOT_PRESENT;
|
||||
#endif
|
||||
STACK_ARRAY_FINISH(images);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user