diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice-private.h b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice-private.h new file mode 100644 index 0000000000..ac3583a606 --- /dev/null +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice-private.h @@ -0,0 +1,33 @@ +/* + * GStreamer + * Copyright (C) 2022 Igalia, S.L. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_VULKAN_PHYSICAL_DEVICE_PRIVATE_H__ +#define __GST_VULKAN_PHYSICAL_DEVICE_PRIVATE_H__ + +#include + +G_BEGIN_DECLS + +const +VkPhysicalDeviceFeatures2 * gst_vulkan_physical_device_get_features (GstVulkanPhysicalDevice * device); + +G_END_DECLS + +#endif /* __GST_VULKAN_PHYSICAL_DEVICE_PRIVATE_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c index 995ebd180b..b30a01dd08 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkphysicaldevice.c @@ -24,6 +24,7 @@ #include "gstvkphysicaldevice.h" +#include "gstvkphysicaldevice-private.h" #include "gstvkdebug.h" #include @@ -1213,3 +1214,18 @@ gst_vulkan_physical_device_get_extension_info (GstVulkanPhysicalDevice * device, return ret; } + +const VkPhysicalDeviceFeatures2 * +gst_vulkan_physical_device_get_features (GstVulkanPhysicalDevice * device) +{ +#if defined (VK_API_VERSION_1_2) + GstVulkanPhysicalDevicePrivate *priv; + + g_return_val_if_fail (GST_IS_VULKAN_PHYSICAL_DEVICE (device), FALSE); + + priv = GET_PRIV (device); + if (gst_vulkan_instance_check_version (device->instance, 1, 2, 0)) + return &priv->features10; +#endif + return NULL; +}