vulkan: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor:
commit e966288576573c56199415f086fc5a1abfb11c1c
Author: Mark Young <marky@lunarg.com>
Date: Thu Jun 23 11:25:03 2016 -0600
docs: Fix broken link in LoaderAndLayerInterface
The Manifest file example link was broken.
Change-Id: I454392f14f526ef6fdf5b30d971bd06739acb994
diff --git a/loader/LoaderAndLayerInterface.md b/loader/LoaderAndLayerInterface.md
index 70069c3..3f0fef8 100644
--- a/loader/LoaderAndLayerInterface.md
+++ b/loader/LoaderAndLayerInterface.md
@@ -1165,7 +1165,7 @@ Allowable values for type (both before and after deprecation) are "INSTANCE", "G
Thus, layers must have a type of "GLOBAL" or "INSTANCE" for the loader to include the layer in the enumerated instance layer list.
"library\_path" is the filename, full path, or relative path to the library file.
-See [Manifest File Example](# ManifestFileExample) section for more details.
+See [Manifest File Example](#ManifestFileExample) section for more details.
Note 2: One "implementation\_version" node is required per layer. This node gives the layer version, a single number
increasing with backward uncompatible changes.
commit a41d861d585f2507dbc2ddd7cfad7e46da80e454
Author: Mark Young <marky@lunarg.com>
Date: Wed Jun 22 16:55:31 2016 -0600
winsdk: Fix multiple RT uninstall issue
Change originally by David Pinedo. If the same Vulkan Run-time
installer is executed multiple times, it will bump the install count
for the RT installation. There was a problem during uninstall
which failed to look at the install count and would always remove
some important files. This fixes that issue.
Change-Id: I4dda50b0dbdd9ec901aa25713be7d7348f3d67ec
diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi
index 0bfd47f..92da393 100644
--- a/windowsRuntimeInstaller/InstallerRT.nsi
+++ b/windowsRuntimeInstaller/InstallerRT.nsi
@@ -618,31 +618,44 @@ Section "uninstall"
# Delete vulkaninfo.exe in C:\Windows\System32 and C:\Windows\SysWOW64
Delete /REBOOTOK $WINDIR\SysWow64\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\SysWow64\vulkaninfo-$FileVersion.exe"
Delete /REBOOTOK $WINDIR\System32\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
- # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
+ # Delete vulkan-<majorabi>.dll in C:\Windows\System32 and C:\Windows\SysWOW64
Delete /REBOOTOK $WINDIR\SysWow64\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\SysWow64\vulkan-$FileVersion.dll
Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
# Else, running on a 32-bit OS machine
${Else}
# Delete vulkaninfo.exe in C:\Windows\System32
Delete /REBOOTOK $WINDIR\System32\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
- # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
+ # Delete vulkan-<majorabi>.dll in C:\Windows\System32
Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
${EndIf}
StrCpy $1 80
Call un.CheckForError
+ # If Ref Count is zero, remove files in C:\Windows\System32 and C:\Windows\SysWow64
+ ${If} $IC <= 0
+
+ ${If} ${RunningX64}
+ # Delete vulkaninfo.exe in C:\Windows\System32 and C:\Windows\SysWOW64
+ Delete /REBOOTOK "$WINDIR\SysWow64\vulkaninfo-$FileVersion.exe"
+ Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
+ # Delete vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll from sys dirs
+ Delete /REBOOTOK $WINDIR\SysWow64\vulkan-$FileVersion.dll
+ Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
+ ${Else}
+ # Delete vulkaninfo.exe in C:\Windows\System32
+ Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
+ # Delete vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll from sys dir
+ Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
+ ${EndIf}
+
+ ${Endif}
+
# Run the ConfigLayersAndVulkanDLL.ps1 script to copy the most recent version of
# vulkan-<abimajor>-*.dll to vulkan-<abimajor>.dll, and to set up layer registry
# entries to use layers from the corresponding SDK
@@ -664,7 +677,7 @@ Section "uninstall"
${Endif}
Call un.CheckForError
- # If Ref Count is zero, uninstall everything
+ # If Ref Count is zero, remove install dir
${If} $IC <= 0
# Remove files in install dir
commit 176929e69f3ff59fe70b6bd390be12e82038c92c
Author: Rene Lindsay <rene@lunarg.com>
Date: Wed Jun 22 15:46:48 2016 -0700
demos: Check global extensions before creating surface
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index ec3fcd5..51a4b47 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -483,7 +483,7 @@ static void app_dev_init(struct app_dev *dev, struct app_gpu *gpu) {
};
VkResult U_ASSERT_ONLY err;
- //Device extensions
+ // Device extensions
app_get_physical_device_layer_extensions(
gpu, NULL, &gpu->device_extension_count, &gpu->device_extensions);
@@ -584,7 +584,8 @@ static void app_get_instance_extensions(struct app_instance *inst) {
// Collect global extensions
inst->global_extension_count = 0;
- // Gets instance extensions, if no layer was specified in the first paramteter
+ // Gets instance extensions, if no layer was specified in the first
+ // paramteter
app_get_global_layer_extensions(NULL, &inst->global_extension_count,
&inst->global_extensions);
}
@@ -600,8 +601,9 @@ static void app_create_instance(struct app_instance *inst) {
// extension names
for (i = 0; (i < inst->global_extension_count); i++) {
const char *found_name = inst->global_extensions[i].extensionName;
- if (!strcmp(VK_KHR_SURFACE_EXTENSION_NAME, found_name))
- {ext_names[ext_count++] = VK_KHR_SURFACE_EXTENSION_NAME;}
+ if (!strcmp(VK_KHR_SURFACE_EXTENSION_NAME, found_name)) {
+ ext_names[ext_count++] = VK_KHR_SURFACE_EXTENSION_NAME;
+ }
}
if (ext_count)
@@ -610,20 +612,24 @@ static void app_create_instance(struct app_instance *inst) {
i++) {
const char *found_name = inst->global_extensions[i].extensionName;
#ifdef VK_USE_PLATFORM_WIN32_KHR
- if (!strcmp(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, found_name))
- {ext_names[ext_count++] = VK_KHR_WIN32_SURFACE_EXTENSION_NAME;}
+ if (!strcmp(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, found_name)) {
+ ext_names[ext_count++] = VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
+ }
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
- if (!strcmp(VK_KHR_XCB_SURFACE_EXTENSION_NAME, found_name))
- {ext_names[ext_count++] = VK_KHR_XCB_SURFACE_EXTENSION_NAME;}
+ if (!strcmp(VK_KHR_XCB_SURFACE_EXTENSION_NAME, found_name)) {
+ ext_names[ext_count++] = VK_KHR_XCB_SURFACE_EXTENSION_NAME;
+ }
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
- if (!strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, found_name))
- {ext_names[ext_count++] = VK_KHR_XLIB_SURFACE_EXTENSION_NAME;}
+ if (!strcmp(VK_KHR_XLIB_SURFACE_EXTENSION_NAME, found_name)) {
+ ext_names[ext_count++] = VK_KHR_XLIB_SURFACE_EXTENSION_NAME;
+ }
#endif
#ifdef VK_USE_PLATFORM_ANDROID_KHR
- if (!strcmp(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, found_name))
- {ext_names[ext_count++] = VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;}
+ if (!strcmp(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, found_name)) {
+ ext_names[ext_count++] = VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
+ }
#endif
}
// If we don't find the KHR_SURFACE extension and at least one other
@@ -1240,6 +1246,17 @@ app_dump_extensions(const char *indent, const char *layer_name,
fflush(stdout);
}
+// Returns true if the named extension is in the list of extensions.
+static bool has_extension(const char *extension_name,
+ const uint32_t extension_count,
+ const VkExtensionProperties *extension_properties) {
+ for (uint32_t i = 0; i < extension_count; i++) {
+ if (!strcmp(extension_name, extension_properties[i].extensionName))
+ return true;
+ }
+ return false;
+}
+
static void app_gpu_dump_queue_props(const struct app_gpu *gpu, uint32_t id) {
const VkQueueFamilyProperties *props = &gpu->queue_props[id];
@@ -1319,7 +1336,7 @@ static void app_gpu_dump(const struct app_gpu *gpu) {
uint32_t i;
printf("\nDevice Properties and Extensions :\n");
- printf( "==================================\n");
+ printf("==================================\n");
printf("GPU%u\n", gpu->id);
app_gpu_dump_props(gpu);
printf("\n");
@@ -1387,7 +1404,7 @@ int main(int argc, char **argv) {
app_create_instance(&inst);
printf("\nInstance Extensions:\n");
- printf( "====================\n");
+ printf("====================\n");
app_dump_extensions("", "Instance", inst.global_extension_count,
inst.global_extensions);
@@ -1425,19 +1442,19 @@ int main(int argc, char **argv) {
layer_prop->layerName, (char *)layer_prop->description,
spec_version, layer_version);
- app_dump_extensions("\t","Layer",
+ app_dump_extensions("\t", "Layer",
inst.global_layers[i].extension_count,
inst.global_layers[i].extension_properties);
- char* layerName=inst.global_layers[i].layer_properties.layerName;
- printf("\tDevices \tcount = %d\n",gpu_count);
+ char *layerName = inst.global_layers[i].layer_properties.layerName;
+ printf("\tDevices \tcount = %d\n", gpu_count);
for (uint32_t j = 0; j < gpu_count; j++) {
printf("\t\tGPU id : %u (%s)\n", j, gpus[j].props.deviceName);
- uint32_t count=0;
- VkExtensionProperties* props;
+ uint32_t count = 0;
+ VkExtensionProperties *props;
app_get_physical_device_layer_extensions(&gpus[j], layerName,
&count, &props);
- app_dump_extensions("\t\t","Layer-Device",count,props);
+ app_dump_extensions("\t\t", "Layer-Device", count, props);
free(props);
}
printf("\n");
@@ -1453,39 +1470,48 @@ int main(int argc, char **argv) {
//--WIN32--
#ifdef VK_USE_PLATFORM_WIN32_KHR
- app_create_win32_window(&inst);
- for (i = 0; i < gpu_count; i++) {
- app_create_win32_surface(&inst, &gpus[i]);
- printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
- printf("Surface type : %s\n", VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
- formatCount += app_dump_surface_formats(&inst, &gpus[i]);
- app_destroy_surface(&inst);
+ if (has_extension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
+ inst.global_extension_count, inst.global_extensions)) {
+ app_create_win32_window(&inst);
+ for (i = 0; i < gpu_count; i++) {
+ app_create_win32_surface(&inst, &gpus[i]);
+ printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
+ printf("Surface type : %s\n", VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
+ formatCount += app_dump_surface_formats(&inst, &gpus[i]);
+ app_destroy_surface(&inst);
+ }
+ app_destroy_win32_window(&inst);
}
- app_destroy_win32_window(&inst);
#endif
//--XCB--
#ifdef VK_USE_PLATFORM_XCB_KHR
- app_create_xcb_window(&inst);
- for (i = 0; i < gpu_count; i++) {
- app_create_xcb_surface(&inst, &gpus[i]);
- printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
- printf("Surface type : %s\n", VK_KHR_XCB_SURFACE_EXTENSION_NAME);
- formatCount += app_dump_surface_formats(&inst, &gpus[i]);
- app_destroy_surface(&inst);
+ if (has_extension(VK_KHR_XCB_SURFACE_EXTENSION_NAME,
+ inst.global_extension_count, inst.global_extensions)) {
+ app_create_xcb_window(&inst);
+ for (i = 0; i < gpu_count; i++) {
+ app_create_xcb_surface(&inst, &gpus[i]);
+ printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
+ printf("Surface type : %s\n", VK_KHR_XCB_SURFACE_EXTENSION_NAME);
+ formatCount += app_dump_surface_formats(&inst, &gpus[i]);
+ app_destroy_surface(&inst);
+ }
+ app_destroy_xcb_window(&inst);
}
- app_destroy_xcb_window(&inst);
#endif
//--XLIB--
#ifdef VK_USE_PLATFORM_XLIB_KHR
- app_create_xlib_window(&inst);
- for (i = 0; i < gpu_count; i++) {
- app_create_xlib_surface(&inst, &gpus[i]);
- printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
- printf("Surface type : %s\n", VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
- formatCount += app_dump_surface_formats(&inst, &gpus[i]);
- app_destroy_surface(&inst);
+ if (has_extension(VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
+ inst.global_extension_count, inst.global_extensions)) {
+ app_create_xlib_window(&inst);
+ for (i = 0; i < gpu_count; i++) {
+ app_create_xlib_surface(&inst, &gpus[i]);
+ printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName);
+ printf("Surface type : %s\n", VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
+ formatCount += app_dump_surface_formats(&inst, &gpus[i]);
+ app_destroy_surface(&inst);
+ }
+ app_destroy_xlib_window(&inst);
}
- app_destroy_xlib_window(&inst);
#endif
// TODO: Android / Wayland / MIR
if (!formatCount)
commit 964416c1e34fced990b3f24ba47005b11c725c37
Author: Tony Barbour <tony@LunarG.com>
Date: Wed Jun 22 15:24:24 2016 -0600
layers: Update json files - VK_EXT_debug_report v3
Change-Id: Ifdabdd288b965b17d1af31c443909da7469df63a
diff --git a/layers/linux/VkLayer_core_validation.json b/layers/linux/VkLayer_core_validation.json
index 85ed1a0..9ed677d 100644
--- a/layers/linux/VkLayer_core_validation.json
+++ b/layers/linux/VkLayer_core_validation.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_device_limits.json b/layers/linux/VkLayer_device_limits.json
index 94abcd1..fa7bf9e 100644
--- a/layers/linux/VkLayer_device_limits.json
+++ b/layers/linux/VkLayer_device_limits.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_image.json b/layers/linux/VkLayer_image.json
index a17ff94..4638d4b 100644
--- a/layers/linux/VkLayer_image.json
+++ b/layers/linux/VkLayer_image.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_object_tracker.json b/layers/linux/VkLayer_object_tracker.json
index 8d7ce1d..689c165 100644
--- a/layers/linux/VkLayer_object_tracker.json
+++ b/layers/linux/VkLayer_object_tracker.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_parameter_validation.json b/layers/linux/VkLayer_parameter_validation.json
index 6f06a42..44a67ad 100644
--- a/layers/linux/VkLayer_parameter_validation.json
+++ b/layers/linux/VkLayer_parameter_validation.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_swapchain.json b/layers/linux/VkLayer_swapchain.json
index 5e20ebf..a3b70a4 100644
--- a/layers/linux/VkLayer_swapchain.json
+++ b/layers/linux/VkLayer_swapchain.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/linux/VkLayer_threading.json b/layers/linux/VkLayer_threading.json
index ebe98ed..2299dcc 100644
--- a/layers/linux/VkLayer_threading.json
+++ b/layers/linux/VkLayer_threading.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_core_validation.json b/layers/windows/VkLayer_core_validation.json
index f230d9d..95ec05d 100644
--- a/layers/windows/VkLayer_core_validation.json
+++ b/layers/windows/VkLayer_core_validation.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_device_limits.json b/layers/windows/VkLayer_device_limits.json
index 05f62ab..a0c3fd5 100644
--- a/layers/windows/VkLayer_device_limits.json
+++ b/layers/windows/VkLayer_device_limits.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_image.json b/layers/windows/VkLayer_image.json
index d9d091c..7033a09 100644
--- a/layers/windows/VkLayer_image.json
+++ b/layers/windows/VkLayer_image.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_object_tracker.json b/layers/windows/VkLayer_object_tracker.json
index b63b0bb..0c28941 100644
--- a/layers/windows/VkLayer_object_tracker.json
+++ b/layers/windows/VkLayer_object_tracker.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_parameter_validation.json b/layers/windows/VkLayer_parameter_validation.json
index a2f983d..c1187a3 100644
--- a/layers/windows/VkLayer_parameter_validation.json
+++ b/layers/windows/VkLayer_parameter_validation.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_swapchain.json b/layers/windows/VkLayer_swapchain.json
index a3def9a..ac6e248 100644
--- a/layers/windows/VkLayer_swapchain.json
+++ b/layers/windows/VkLayer_swapchain.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
diff --git a/layers/windows/VkLayer_threading.json b/layers/windows/VkLayer_threading.json
index a874e6a..54b2125 100644
--- a/layers/windows/VkLayer_threading.json
+++ b/layers/windows/VkLayer_threading.json
@@ -10,7 +10,7 @@
"instance_extensions": [
{
"name": "VK_EXT_debug_report",
- "spec_version": "2"
+ "spec_version": "3"
}
]
}
commit 31df808aa1e44ddbfa52a26214d4728f87d98d09
Author: Mark Young <marky@lunarg.com>
Date: Wed Jun 22 15:25:00 2016 -0600
loader: Fix version info on manifest string.
Debug_report manifest string version was incorrect because of
the new version parsing code I had put in place.
Change-Id: I48d40b131bc3efd573d08576573ee9a4060a7332
diff --git a/loader/loader.c b/loader/loader.c
index 1e74a6d..5b12306 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2480,6 +2480,8 @@ void loader_icd_scan(const struct loader_instance *inst,
return;
}
char *file_vers = cJSON_Print(item);
+ loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
+ "Found manifest file %s, version %s", file_str, file_vers);
// Get the major/minor/and patch as integers for easier comparison
vers_tok = strtok(file_vers, ".\"\n\r");
if (NULL != vers_tok) {
@@ -2493,8 +2495,6 @@ void loader_icd_scan(const struct loader_instance *inst,
}
}
}
- loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0,
- "Found manifest file %s, version %s", file_str, file_vers);
if (file_major_vers != 1 || file_minor_vers != 0 || file_patch_vers > 1)
loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0,
"Unexpected manifest file version (expected 1.0.0 or 1.0.1), may "
commit 3897687aefcad30d46d08fc3a8bd6097c2486595
Author: David Pinedo <david@lunarg.com>
Date: Wed Jun 22 10:37:55 2016 -0600
windowsbuild: chmod -x update_external_sources.bat
diff --git a/update_external_sources.bat b/update_external_sources.bat
old mode 100755
new mode 100644
commit 703d10c95a7e6434c972c30195c5e3709e8e8c80
Author: Rene Lindsay <rene@lunarg.com>
Date: Wed Jun 22 09:00:12 2016 -0600
demos: LX535 Remove deprecated device layers.
Change-Id: I8f4bbac6d124ef18f4fb3edd0da5acf308d6f7a1
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index 5a5409d..ec3fcd5 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -154,9 +154,6 @@ struct app_gpu {
VkPhysicalDeviceFeatures features;
VkPhysicalDevice limits;
- uint32_t device_layer_count;
- struct layer_extension_list *device_layers;
-
uint32_t device_extension_count;
VkExtensionProperties *device_extensions;
@@ -486,49 +483,7 @@ static void app_dev_init(struct app_dev *dev, struct app_gpu *gpu) {
};
VkResult U_ASSERT_ONLY err;
- uint32_t count = 0;
-
- // Scan layers
- VkLayerProperties *device_layer_properties = NULL;
- struct layer_extension_list *device_layers = NULL;
-
- do {
- err = vkEnumerateDeviceLayerProperties(gpu->obj, &count, NULL);
- assert(!err);
-
- if (device_layer_properties) {
- free(device_layer_properties);
- }
- device_layer_properties = malloc(sizeof(VkLayerProperties) * count);
- assert(device_layer_properties);
-
- if (device_layers) {
- free(device_layers);
- }
- device_layers = malloc(sizeof(struct layer_extension_list) * count);
- assert(device_layers);
-
- err = vkEnumerateDeviceLayerProperties(gpu->obj, &count,
- device_layer_properties);
- } while (err == VK_INCOMPLETE);
- assert(!err);
-
- gpu->device_layer_count = count;
- gpu->device_layers = device_layers;
-
- for (uint32_t i = 0; i < gpu->device_layer_count; i++) {
- VkLayerProperties *src_info = &device_layer_properties[i];
- struct layer_extension_list *dst_info = &gpu->device_layers[i];
- memcpy(&dst_info->layer_properties, src_info,
- sizeof(VkLayerProperties));
-
- // Save away layer extension info for report
- app_get_physical_device_layer_extensions(
- gpu, src_info->layerName, &dst_info->extension_count,
- &dst_info->extension_properties);
- }
- free(device_layer_properties);
-
+ //Device extensions
app_get_physical_device_layer_extensions(
gpu, NULL, &gpu->device_extension_count, &gpu->device_extensions);
@@ -619,18 +574,17 @@ static void app_get_instance_extensions(struct app_instance *inst) {
memcpy(&dst_info->layer_properties, src_info,
sizeof(VkLayerProperties));
- /* Save away layer extension info for report */
- /* Gets layer extensions, if first parameter is not NULL*/
+ // Save away layer extension info for report
+ // Gets layer extensions, if first parameter is not NULL
app_get_global_layer_extensions(src_info->layerName,
&dst_info->extension_count,
&dst_info->extension_properties);
}
free(global_layer_properties);
- /* Collect global extensions */
+ // Collect global extensions
inst->global_extension_count = 0;
- /* Gets instance extensions, if no layer was specified in teh first
- * paramteter */
+ // Gets instance extensions, if no layer was specified in the first paramteter
app_get_global_layer_extensions(NULL, &inst->global_extension_count,
&inst->global_extensions);
}
@@ -1273,17 +1227,16 @@ app_dump_extensions(const char *indent, const char *layer_name,
if (layer_name && (strlen(layer_name) > 0)) {
printf("%s%s Extensions", indent, layer_name);
} else {
- printf("Extensions");
+ printf("%sExtensions", indent);
}
printf("\tcount = %d\n", extension_count);
for (i = 0; i < extension_count; i++) {
VkExtensionProperties const *ext_prop = &extension_properties[i];
printf("%s\t", indent);
- printf("%-32s: extension revision %2d\n", ext_prop->extensionName,
+ printf("%-36s: extension revision %2d\n", ext_prop->extensionName,
ext_prop->specVersion);
}
- printf("\n");
fflush(stdout);
}
@@ -1365,37 +1318,14 @@ static void app_gpu_dump_memory_props(const struct app_gpu *gpu) {
static void app_gpu_dump(const struct app_gpu *gpu) {
uint32_t i;
- printf("Device Extensions and layers:\n");
- printf("=============================\n");
+ printf("\nDevice Properties and Extensions :\n");
+ printf( "==================================\n");
printf("GPU%u\n", gpu->id);
app_gpu_dump_props(gpu);
printf("\n");
app_dump_extensions("", "Device", gpu->device_extension_count,
gpu->device_extensions);
printf("\n");
- printf("Layers\tcount = %d\n", gpu->device_layer_count);
- for (uint32_t i = 0; i < gpu->device_layer_count; i++) {
- uint32_t major, minor, patch;
- char spec_version[64], layer_version[64];
- struct layer_extension_list const *layer_info = &gpu->device_layers[i];
-
- extract_version(layer_info->layer_properties.specVersion, &major,
- &minor, &patch);
- snprintf(spec_version, sizeof(spec_version), "%d.%d.%d", major, minor,
- patch);
- snprintf(layer_version, sizeof(layer_version), "%d",
- layer_info->layer_properties.implementationVersion);
- printf("\t%s (%s) Vulkan version %s, layer version %s\n",
- layer_info->layer_properties.layerName,
- (char *)layer_info->layer_properties.description, spec_version,
- layer_version);
-
- app_dump_extensions("\t", layer_info->layer_properties.layerName,
- layer_info->extension_count,
- layer_info->extension_properties);
- fflush(stdout);
- }
- printf("\n");
for (i = 0; i < gpu->queue_count; i++) {
app_gpu_dump_queue_props(gpu, i);
printf("\n");
@@ -1456,12 +1386,30 @@ int main(int argc, char **argv) {
app_create_instance(&inst);
- printf("Instance Extensions and layers:\n");
- printf("===============================\n");
+ printf("\nInstance Extensions:\n");
+ printf( "====================\n");
app_dump_extensions("", "Instance", inst.global_extension_count,
inst.global_extensions);
- printf("Instance Layers\tcount = %d\n", inst.global_layer_count);
+ err = vkEnumeratePhysicalDevices(inst.instance, &gpu_count, NULL);
+ if (err)
+ ERR_EXIT(err);
+ if (gpu_count > MAX_GPUS) {
+ printf("Too many GPUS found \n");
+ ERR_EXIT(-1);
+ }
+ err = vkEnumeratePhysicalDevices(inst.instance, &gpu_count, objs);
+ if (err)
+ ERR_EXIT(err);
+
+ for (i = 0; i < gpu_count; i++) {
+ app_gpu_init(&gpus[i], i, objs[i]);
+ printf("\n\n");
+ }
+
+ //---Layer-Device-Extensions---
+ printf("Layers: count = %d\n", inst.global_layer_count);
+ printf("=======\n");
for (uint32_t i = 0; i < inst.global_layer_count; i++) {
uint32_t major, minor, patch;
char spec_version[64], layer_version[64];
@@ -1473,32 +1421,29 @@ int main(int argc, char **argv) {
patch);
snprintf(layer_version, sizeof(layer_version), "%d",
layer_prop->implementationVersion);
- printf("\t%s (%s) Vulkan version %s, layer version %s\n",
+ printf("%s (%s) Vulkan version %s, layer version %s\n",
layer_prop->layerName, (char *)layer_prop->description,
spec_version, layer_version);
- app_dump_extensions("\t",
- inst.global_layers[i].layer_properties.layerName,
+ app_dump_extensions("\t","Layer",
inst.global_layers[i].extension_count,
inst.global_layers[i].extension_properties);
- }
-
- err = vkEnumeratePhysicalDevices(inst.instance, &gpu_count, NULL);
- if (err)
- ERR_EXIT(err);
- if (gpu_count > MAX_GPUS) {
- printf("Too many GPUS found \n");
- ERR_EXIT(-1);
- }
- err = vkEnumeratePhysicalDevices(inst.instance, &gpu_count, objs);
- if (err)
- ERR_EXIT(err);
- for (i = 0; i < gpu_count; i++) {
- app_gpu_init(&gpus[i], i, objs[i]);
- app_gpu_dump(&gpus[i]);
- printf("\n\n");
+ char* layerName=inst.global_layers[i].layer_properties.layerName;
+ printf("\tDevices \tcount = %d\n",gpu_count);
+ for (uint32_t j = 0; j < gpu_count; j++) {
+ printf("\t\tGPU id : %u (%s)\n", j, gpus[j].props.deviceName);
+ uint32_t count=0;
+ VkExtensionProperties* props;
+ app_get_physical_device_layer_extensions(&gpus[j], layerName,
+ &count, &props);
+ app_dump_extensions("\t\t","Layer-Device",count,props);
+ free(props);
+ }
+ printf("\n");
}
+ fflush(stdout);
+ //-----------------------------
printf("Presentable Surface formats:\n");
printf("============================\n");
@@ -1547,6 +1492,11 @@ int main(int argc, char **argv) {
printf("None found\n");
//---------
+ for (i = 0; i < gpu_count; i++) {
+ app_gpu_dump(&gpus[i]);
+ printf("\n\n");
+ }
+
for (i = 0; i < gpu_count; i++)
app_gpu_destroy(&gpus[i]);
commit a6b399e5b85017a0b615b0fc41ceb3bba149aa07
Author: Rene Lindsay <rene@lunarg.com>
Date: Tue Jun 21 14:58:57 2016 -0700
demos: Use XSync to fix intermittent xlib crash.
Change-Id: Ica7f99cac89a4956f60e9f8eb915a047d1b40875
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index 866756a..5a5409d 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -948,7 +948,7 @@ static void app_create_xlib_window(struct app_instance *inst) {
inst->width, inst->height, 0, visualInfo->depth, InputOutput,
visualInfo->visual, 0, NULL);
- XFlush(inst->xlib_display);
+ XSync(inst->xlib_display,false);
}
static void app_create_xlib_surface(struct app_instance *inst, struct app_gpu *gpu) {
commit 9332a04124badba590a480bfcf36c35044474480
Author: Mark Lobodzinski <mark@lunarg.com>
Date: Tue Jun 21 15:54:57 2016 -0600
Revert "layers: Add debug report header"
This reverts commit 2f50b5f4afa2198e13dfa8a80a460c15a6acc56c.
Change-Id: If67e7039a339ae39008a2c73f97b6a1eaedf1c3d
diff --git a/layers/vk_layer_config.cpp b/layers/vk_layer_config.cpp
index d1f61e1..049ffdc 100644
--- a/layers/vk_layer_config.cpp
+++ b/layers/vk_layer_config.cpp
@@ -32,17 +32,6 @@
#define MAX_CHARS_PER_LINE 4096
-// Flag for ONE-TIME debug output initialization
-static bool log_message_initialized = false;
-
-// Accessor functions to ensure the correct instance of the shared flag gets used
-bool LogMessageInitialized() {
- return log_message_initialized;
-}
-void SetLogMessageInitialized() {
- log_message_initialized = true;
-}
-
class ConfigFile {
public:
ConfigFile();
diff --git a/layers/vk_layer_config.h b/layers/vk_layer_config.h
index 097ba42..c4526db 100644
--- a/layers/vk_layer_config.h
+++ b/layers/vk_layer_config.h
@@ -63,8 +63,6 @@ VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map<std::string,
void setLayerOption(const char *_option, const char *_val);
void print_msg_flags(VkFlags msgFlags, char *msg_flags);
-bool LogMessageInitialized();
-void SetLogMessageInitialized();
#ifdef __cplusplus
}
diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h
index 2836313..0328031 100644
--- a/layers/vk_layer_logging.h
+++ b/layers/vk_layer_logging.h
@@ -104,55 +104,17 @@ static inline void RemoveAllMessageCallbacks(debug_report_data *debug_data, VkLa
*list_head = NULL;
}
-static inline bool OutputLogMsgHeader(const debug_report_data *debug_data, VkFlags msgFlags) {
- bool output = false;
- VkLayerDbgFunctionNode *pTrav =
- (debug_data->debug_callback_list != NULL) ? debug_data->debug_callback_list : debug_data->default_debug_callback_list;
-
- while (pTrav) {
- const char *message_header = "Legend:\n\n"
- "*******************************************************************************************\n"
- "* Vulkan Validation Layer Debug Output *\n"
- "* *\n"
- "* Debug Output Type Definitions: *\n"
- "* ------------------------------ *\n"
- "* ERROR: Errors are output when a validation layer detects that some application behavior *\n"
- "* has violated the Vulkan Specification. When an error is encountered it is *\n"
- "* recommended that the user callback function return 'true' for optimal *\n"
- "* validation results. Any validation error may result in undefined behavior and *\n"
- "* errors should be corrected as they are encountered for best results. *\n"
- "* WARN: Warnings are output in cases where mistakes are commonly made and do NOT *\n"
- "* necessarily indicate that an app has violated the Vulkan Specification. *\n"
- "* Warnings basically translate to 'Did you really mean to do this?' *\n"
- "* PERF: Performance Warnings are output in cases where a possible inefficiency has been *\n"
- "* detected. These also do NOT imply that the specification was violated. *\n"
- "* INFO: These log messages are for informational purposes only. For instance, the *\n"
- "* core_validation layer can print out lists of memory objects and their bindings *\n"
- "* which may help with debugging or improving application efficiency. *\n"
- "*******************************************************************************************\n";
-
- if (pTrav->msgFlags & msgFlags) {
- pTrav->pfnMsgCallback(VK_DEBUG_REPORT_DEBUG_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, 0, 0,
- VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT, "", message_header, pTrav->pUserData);
- output |= true;
- }
- pTrav = pTrav->pNext;
- }
- return output;
-}
-
// Utility function to handle reporting
static inline bool debug_report_log_msg(const debug_report_data *debug_data, VkFlags msgFlags,
VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode,
const char *pLayerPrefix, const char *pMsg) {
bool bail = false;
- VkLayerDbgFunctionNode *pTrav =
- (debug_data->debug_callback_list != NULL) ? debug_data->debug_callback_list : debug_data->default_debug_callback_list;
+ VkLayerDbgFunctionNode *pTrav = NULL;
- if ((LogMessageInitialized() == false) && (strcmp(pLayerPrefix, "DebugReport") != 0)) {
- if (OutputLogMsgHeader(debug_data, msgFlags) == true) {
- SetLogMessageInitialized();
- }
+ if (debug_data->debug_callback_list != NULL) {
+ pTrav = debug_data->debug_callback_list;
+ } else {
+ pTrav = debug_data->default_debug_callback_list;
}
while (pTrav) {
@@ -189,7 +151,6 @@ debug_report_create_instance(VkLayerInstanceDispatchTable *table, VkInstance ins
debug_data->g_DEBUG_REPORT = true;
}
}
-
return debug_data;
}
commit 20b6024d132a52a49525a1668972a13f1069ef47
Author: Mark Lobodzinski <mark@lunarg.com>
Date: Tue Jun 21 15:53:37 2016 -0600
Revert "layers: Make vklayer_utils a shared library"
This reverts commit 5fa68457c16e57d90274d911adc49179024442b3.
Change-Id: I5bd6c6be23859f271c84aa44ab62cab6c518db5a
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 099b711..acf67b8 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -142,10 +142,11 @@ run_vk_layer_xml_generate(Threading thread_check.h)
run_vk_layer_generate(unique_objects unique_objects.cpp)
run_vk_layer_xml_generate(ParamChecker parameter_validation.h)
-
# Layer Utils Library
+# For Windows, we use a static lib because the Windows loader has a fairly restrictive loader search
+# path that can't be easily modified to point it to the same directory that contains the layers.
if (WIN32)
- add_library(VkLayer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp VkLayer_utils.def)
+ add_library(VkLayer_utils STATIC vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp)
else()
add_library(VkLayer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp)
install(TARGETS VkLayer_utils DESTINATION ${PROJECT_BINARY_DIR}/install_staging)
@@ -165,24 +166,3 @@ add_vk_layer(parameter_validation parameter_validation.cpp parameter_validation.
target_include_directories(VkLayer_core_validation PRIVATE ${GLSLANG_SPIRV_INCLUDE_DIR})
target_include_directories(VkLayer_core_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR})
target_link_libraries(VkLayer_core_validation ${SPIRV_TOOLS_LIBRARIES})
-
-if (WIN32)
- if (CMAKE_GENERATOR MATCHES "^Visual Studio.*")
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/VkLayer_utils.dll COPY_SRC_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../demos/$<CONFIGURATION>/ COPY_DST_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../tests/$<CONFIGURATION>/ COPY_DST_TEST_PATH)
- else()
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_utils.dll COPY_SRC_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../demos/ COPY_DST_PATH)
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../tests/ COPY_DST_TEST_PATH)
- endif()
- # Copy layer utils library to correct locations
- add_custom_command(TARGET VkLayer_utils
- POST_BUILD
- COMMAND xcopy /Y /I ${COPY_SRC_PATH} ${COPY_DST_PATH}
- COMMENT "Copying VkLayer_utils.dll to demos dir")
- add_custom_command(TARGET VkLayer_utils
- POST_BUILD
- COMMAND xcopy /Y /I ${COPY_SRC_PATH} ${COPY_DST_TEST_PATH}
- COMMENT "Copying VkLayer_utils.dll to demos dir")
-endif()
diff --git a/layers/VkLayer_utils.def b/layers/VkLayer_utils.def
deleted file mode 100644
index 629c7d0..0000000
Reply to: