summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2020-06-15 01:38:03 +1000
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-06-21 09:30:29 +0000
commitc21aefbfb05ac48a839dd93be960be2acbd9bb37 (patch)
tree69ea437c1625d0faad498cd066a0a610cdf8e69b /gst-libs
parent09613696a62838a7cecef5e91dbb313baf13794a (diff)
downloadgstreamer-plugins-bad-c21aefbfb05ac48a839dd93be960be2acbd9bb37.tar.gz
vulkan: log extension/layers available/enabled on instance/device creation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1341>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vulkan/gstvkdevice.c11
-rw-r--r--gst-libs/gst/vulkan/gstvkinstance.c49
-rw-r--r--gst-libs/gst/vulkan/gstvkphysicaldevice.c13
3 files changed, 64 insertions, 9 deletions
diff --git a/gst-libs/gst/vulkan/gstvkdevice.c b/gst-libs/gst/vulkan/gstvkdevice.c
index 76be6449b..9cdc62f20 100644
--- a/gst-libs/gst/vulkan/gstvkdevice.c
+++ b/gst-libs/gst/vulkan/gstvkdevice.c
@@ -294,6 +294,17 @@ gst_vulkan_device_open (GstVulkanDevice * device, GError ** error)
priv->queue_family_id = i;
priv->n_queues = 1;
+ GST_INFO_OBJECT (device, "Creating a device from physical %" GST_PTR_FORMAT
+ " with %u layers and %u extensions", device->physical_device,
+ priv->enabled_layers->len, priv->enabled_extensions->len);
+
+ for (i = 0; i < priv->enabled_layers->len; i++)
+ GST_DEBUG_OBJECT (device, "layer %u: %s", i,
+ (gchar *) g_ptr_array_index (priv->enabled_layers, i));
+ for (i = 0; i < priv->enabled_extensions->len; i++)
+ GST_DEBUG_OBJECT (device, "extension %u: %s", i,
+ (gchar *) g_ptr_array_index (priv->enabled_extensions, i));
+
{
VkDeviceQueueCreateInfo queue_info = { 0, };
VkDeviceCreateInfo device_info = { 0, };
diff --git a/gst-libs/gst/vulkan/gstvkinstance.c b/gst-libs/gst/vulkan/gstvkinstance.c
index fd16a0ca0..177335886 100644
--- a/gst-libs/gst/vulkan/gstvkinstance.c
+++ b/gst-libs/gst/vulkan/gstvkinstance.c
@@ -713,6 +713,7 @@ gst_vulkan_instance_fill_info_unlocked (GstVulkanInstance * instance,
{
GstVulkanInstancePrivate *priv;
VkResult err;
+ guint i;
priv = GET_PRIV (instance);
@@ -756,6 +757,16 @@ gst_vulkan_instance_fill_info_unlocked (GstVulkanInstance * instance,
return FALSE;
}
+ GST_INFO_OBJECT (instance, "found %u layers and %u extensions",
+ priv->n_available_layers, priv->n_available_extensions);
+
+ for (i = 0; i < priv->n_available_layers; i++)
+ GST_DEBUG_OBJECT (instance, "available layer %u: %s", i,
+ priv->available_layers[i].layerName);
+ for (i = 0; i < priv->n_available_extensions; i++)
+ GST_DEBUG_OBJECT (instance, "available extension %u: %s", i,
+ priv->available_extensions[i].extensionName);
+
/* configure default extensions */
{
GstVulkanDisplayType display_type;
@@ -854,15 +865,8 @@ gst_vulkan_instance_open (GstVulkanInstance * instance, GError ** error)
requested_instance_api =
VK_MAKE_VERSION (priv->requested_api_major, priv->requested_api_minor,
0);
- GST_INFO_OBJECT (instance, "requesting Vulkan API %u.%u, max supported "
- "%u.%u", priv->requested_api_major, priv->requested_api_minor,
- VK_VERSION_MAJOR (priv->supported_instance_api),
- VK_VERSION_MINOR (priv->supported_instance_api));
} else {
requested_instance_api = priv->supported_instance_api;
- GST_INFO_OBJECT (instance, "requesting maximum supported API %u.%u",
- VK_VERSION_MAJOR (priv->supported_instance_api),
- VK_VERSION_MINOR (priv->supported_instance_api));
}
if (requested_instance_api > priv->supported_instance_api) {
@@ -875,6 +879,37 @@ gst_vulkan_instance_open (GstVulkanInstance * instance, GError ** error)
goto error;
}
+ /* list of known vulkan loader environment variables taken from:
+ * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/loader/LoaderAndLayerInterface.md#table-of-debug-environment-variables */
+ GST_DEBUG_OBJECT (instance, "VK_ICD_FILENAMES: %s",
+ g_getenv ("VK_ICD_FILENAMES"));
+ GST_DEBUG_OBJECT (instance, "VK_INSTANCE_LAYERS: %s",
+ g_getenv ("VK_INSTANCE_LAYERS"));
+ GST_DEBUG_OBJECT (instance, "VK_LAYER_PATH: %s", g_getenv ("VK_LAYER_PATH"));
+ GST_DEBUG_OBJECT (instance, "VK_LOADER_DISABLE_INST_EXT_FILTER: %s",
+ g_getenv ("VK_LOADER_DISABLE_INST_EXT_FILTER"));
+ GST_DEBUG_OBJECT (instance, "VK_LOADER_DEBUG: %s",
+ g_getenv ("VK_LOADER_DEBUG"));
+
+ {
+ guint i;
+
+ GST_INFO_OBJECT (instance, "attempting to create instance for Vulkan API "
+ "%u.%u, max supported %u.%u with %u layers and %u extensions",
+ VK_VERSION_MAJOR (requested_instance_api),
+ VK_VERSION_MINOR (requested_instance_api),
+ VK_VERSION_MAJOR (priv->supported_instance_api),
+ VK_VERSION_MINOR (priv->supported_instance_api),
+ priv->enabled_layers->len, priv->enabled_extensions->len);
+
+ for (i = 0; i < priv->enabled_layers->len; i++)
+ GST_DEBUG_OBJECT (instance, "layer %u: %s", i,
+ (gchar *) g_ptr_array_index (priv->enabled_layers, i));
+ for (i = 0; i < priv->enabled_extensions->len; i++)
+ GST_DEBUG_OBJECT (instance, "extension %u: %s", i,
+ (gchar *) g_ptr_array_index (priv->enabled_extensions, i));
+ }
+
{
VkApplicationInfo app = { 0, };
VkInstanceCreateInfo inst_info = { 0, };
diff --git a/gst-libs/gst/vulkan/gstvkphysicaldevice.c b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
index f55e0f475..cf9be303b 100644
--- a/gst-libs/gst/vulkan/gstvkphysicaldevice.c
+++ b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
@@ -802,6 +802,7 @@ gst_vulkan_physical_device_fill_info (GstVulkanPhysicalDevice * device,
{
GstVulkanPhysicalDevicePrivate *priv = GET_PRIV (device);
VkResult err;
+ guint i;
device->device = gst_vulkan_physical_device_get_handle (device);
if (!device->device) {
@@ -833,8 +834,6 @@ gst_vulkan_physical_device_fill_info (GstVulkanPhysicalDevice * device,
"vkEnumerateDeviceExtensionProperties") < 0) {
goto error;
}
- GST_DEBUG_OBJECT (device, "Found %u extensions",
- priv->n_available_extensions);
priv->available_extensions =
g_new0 (VkExtensionProperties, priv->n_available_extensions);
@@ -846,6 +845,16 @@ gst_vulkan_physical_device_fill_info (GstVulkanPhysicalDevice * device,
goto error;
}
+ GST_INFO_OBJECT (device, "found %u layers and %u extensions",
+ priv->n_available_layers, priv->n_available_extensions);
+
+ for (i = 0; i < priv->n_available_layers; i++)
+ GST_DEBUG_OBJECT (device, "available layer %u: %s", i,
+ priv->available_layers[i].layerName);
+ for (i = 0; i < priv->n_available_extensions; i++)
+ GST_DEBUG_OBJECT (device, "available extension %u: %s", i,
+ priv->available_extensions[i].extensionName);
+
vkGetPhysicalDeviceProperties (device->device, &device->properties);
#if defined (VK_API_VERSION_1_2)
if (gst_vulkan_instance_check_version (device->instance, 1, 2, 0)) {