mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
vkswapper: add the necessary call to check if the physical device supports the surface
Silences an error in the validation layers.
This commit is contained in:
parent
4ca3fdb955
commit
49430569da
1 changed files with 23 additions and 4 deletions
|
@ -171,8 +171,27 @@ _choose_queue (GstVulkanDevice * device, GstVulkanQueue * queue,
|
|||
struct choose_data *data)
|
||||
{
|
||||
guint flags = device->queue_family_props[queue->family].queueFlags;
|
||||
VkPhysicalDevice gpu;
|
||||
gboolean supports_present;
|
||||
|
||||
gpu = gst_vulkan_device_get_physical_device (data->swapper->device);
|
||||
|
||||
{
|
||||
VkResult err;
|
||||
GError *error = NULL;
|
||||
VkBool32 physical_device_supported;
|
||||
|
||||
err =
|
||||
data->swapper->GetPhysicalDeviceSurfaceSupportKHR (gpu, queue->index,
|
||||
data->swapper->surface, &physical_device_supported);
|
||||
if (gst_vulkan_error_to_g_error (err, &error,
|
||||
"GetPhysicalDeviceSurfaceSupport") < 0) {
|
||||
GST_DEBUG_OBJECT (data->swapper,
|
||||
"surface not supported by the physical device: %s", error->message);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
supports_present =
|
||||
gst_vulkan_window_get_presentation_support (data->swapper->window,
|
||||
device, queue->index);
|
||||
|
@ -603,8 +622,8 @@ _allocate_swapchain (GstVulkanSwapper * swapper, GstCaps * caps,
|
|||
n_images_wanted = swapper->surf_props.maxImageCount;
|
||||
}
|
||||
|
||||
if (swapper->surf_props.
|
||||
supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) {
|
||||
if (swapper->
|
||||
surf_props.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) {
|
||||
preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||
} else {
|
||||
preTransform = swapper->surf_props.currentTransform;
|
||||
|
@ -636,8 +655,8 @@ _allocate_swapchain (GstVulkanSwapper * swapper, GstCaps * caps,
|
|||
"Incorrect usage flags available for the swap images");
|
||||
return FALSE;
|
||||
}
|
||||
if ((swapper->
|
||||
surf_props.supportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
|
||||
if ((swapper->surf_props.
|
||||
supportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
|
||||
!= 0) {
|
||||
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue