mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
vkphysicaldevice: add gst_vulkan_physical_device_get_features()
gst_vulkan_physical_device_get_features() is a private function to access to the available features in the device. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
This commit is contained in:
parent
83160fb47c
commit
9e807b58a0
2 changed files with 49 additions and 0 deletions
|
@ -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 <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
const
|
||||
VkPhysicalDeviceFeatures2 * gst_vulkan_physical_device_get_features (GstVulkanPhysicalDevice * device);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VULKAN_PHYSICAL_DEVICE_PRIVATE_H__ */
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "gstvkphysicaldevice.h"
|
||||
|
||||
#include "gstvkphysicaldevice-private.h"
|
||||
#include "gstvkdebug.h"
|
||||
|
||||
#include <string.h>
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue