aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-10-21 16:25:47 -0600
committerMark Young <marky@lunarg.com>2016-10-21 17:13:56 -0600
commit8b0f75529901e0dfc7a5d70a19ed95c41d8035af (patch)
treea8d03e25ac1e3b9a2867e458460efc72085b946b
parent39ab5b89751b624fb1ad1a958f1a5f9958c0d543 (diff)
downloadvulkan-validation-layers-8b0f75529901e0dfc7a5d70a19ed95c41d8035af.tar.gz
loader: gh610- More debug log messages
Add more debug log messages for CreateDevice. Change-Id: Iba02facc479fab6a6f976addc94da3accf9541f4
-rw-r--r--loader/loader.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/loader/loader.c b/loader/loader.c
index a950ea1d6..4dda59ab4 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -824,12 +824,14 @@ VkResult loader_add_device_extensions(const struct loader_instance *inst,
NULL);
if (res == VK_SUCCESS && count > 0) {
ext_props = loader_stack_alloc(count * sizeof(VkExtensionProperties));
- if (!ext_props)
+ if (!ext_props) {
return VK_ERROR_OUT_OF_HOST_MEMORY;
+ }
res = fpEnumerateDeviceExtensionProperties(physical_device, NULL,
&count, ext_props);
- if (res != VK_SUCCESS)
+ if (res != VK_SUCCESS) {
return res;
+ }
for (i = 0; i < count; i++) {
char spec_version[64];
@@ -4302,6 +4304,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(
icd_exts.list = NULL;
if (fpCreateDevice == NULL) {
+ loader_log(phys_dev->this_icd->this_instance,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
+ "No vkCreateDevice command exposed by ICD %s",
+ phys_dev->this_icd->this_icd_lib->lib_name);
res = VK_ERROR_INITIALIZATION_FAILED;
goto out;
}
@@ -4355,17 +4361,23 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(
filtered_extension_names[localCreateInfo.enabledExtensionCount] =
(char *)extension_name;
localCreateInfo.enabledExtensionCount++;
+ } else {
+ loader_log(phys_dev->this_icd->this_instance,
+ VK_DEBUG_REPORT_WARNING_BIT_EXT, 0,
+ "vkCreateDevice extension %s not available for "
+ "devices associated with ICD %s",
+ extension_name,
+ phys_dev->this_icd->this_icd_lib->lib_name);
}
}
- // TODO: Why does fpCreateDevice behave differently than
- // this_icd->CreateDevice?
- // VkResult res = fpCreateDevice(phys_dev->phys_dev, &localCreateInfo,
- // pAllocator, &localDevice);
- res = phys_dev->this_icd->CreateDevice(phys_dev->phys_dev, &localCreateInfo,
- pAllocator, &dev->device);
-
+ res = fpCreateDevice(phys_dev->phys_dev, &localCreateInfo, pAllocator,
+ &dev->device);
if (res != VK_SUCCESS) {
+ loader_log(phys_dev->this_icd->this_instance,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
+ "vkCreateDevice call failed in ICD %s",
+ phys_dev->this_icd->this_icd_lib->lib_name);
goto out;
}