aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-11-02 18:34:25 +1300
committerChris Forbes <chrisforbes@google.com>2016-11-07 15:25:05 +1300
commit412d7bd596efc1ae2b9ea5d6de8e49b68eab3d6d (patch)
tree64fd70b374e774e931ac3c5aea7ea33aa258288a
parent9996e6a75ef0a1ab2d96c2a13f7e6a17444e1d16 (diff)
downloadusermoji-412d7bd596efc1ae2b9ea5d6de8e49b68eab3d6d.tar.xz
layers: Move swapchain and surface extension enable checks to PV
Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/parameter_validation.cpp97
-rw-r--r--layers/swapchain.cpp93
-rw-r--r--layers/swapchain.h9
3 files changed, 83 insertions, 116 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index 885e1bc2..a3c38d64 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -4741,6 +4741,13 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
assert(my_data != NULL);
+ if (!my_data->swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(device), __LINE__, EXTENSION_NOT_ENABLED, LayerName,
+ "vkCreateSwapchainKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+ }
+
skip_call |= parameter_validation_vkCreateSwapchainKHR(my_data->report_data, pCreateInfo, pAllocator, pSwapchain);
if (!skip_call) {
@@ -4759,6 +4766,13 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
assert(my_data != NULL);
+ if (!my_data->swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(device), __LINE__, EXTENSION_NOT_ENABLED, LayerName,
+ "vkGetSwapchainImagesKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+ }
+
skip_call |=
parameter_validation_vkGetSwapchainImagesKHR(my_data->report_data, swapchain, pSwapchainImageCount, pSwapchainImages);
@@ -4779,6 +4793,13 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
assert(my_data != NULL);
+ if (!my_data->swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(device), __LINE__, EXTENSION_NOT_ENABLED, LayerName,
+ "vkAcquireNextImageKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+ }
+
skip_call |=
parameter_validation_vkAcquireNextImageKHR(my_data->report_data, swapchain, timeout, semaphore, fence, pImageIndex);
@@ -4798,6 +4819,14 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf
layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map);
assert(my_data != NULL);
+ if (!my_data->swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
+ reinterpret_cast<uint64_t>(queue), __LINE__,
+ EXTENSION_NOT_ENABLED, LayerName,
+ "vkQueuePresentKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+ }
+
skip_call |= parameter_validation_vkQueuePresentKHR(my_data->report_data, pPresentInfo);
if (!skip_call) {
@@ -4809,6 +4838,25 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf
return result;
}
+VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) {
+ bool skip_call = false;
+ layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
+ assert(my_data != NULL);
+
+ if (!my_data->swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(device), __LINE__, EXTENSION_NOT_ENABLED, LayerName,
+ "vkDestroySwapchainKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_SWAPCHAIN_EXTENSION_NAME);
+ }
+
+ /* No generated validation function for this call */
+
+ if (!skip_call) {
+ get_dispatch_table(pc_device_table_map, device)->DestroySwapchainKHR(device, swapchain, pAllocator);
+ }
+}
+
VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
VkSurfaceKHR surface, VkBool32 *pSupported) {
VkResult result = VK_ERROR_VALIDATION_FAILED_EXT;
@@ -4851,7 +4899,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysica
reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
LayerName,
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
+ VK_KHR_SURFACE_EXTENSION_NAME);
}
skip_call |=
@@ -4881,7 +4929,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi
reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
LayerName,
"vkGetPhysicalDeviceSurfaceFormatsKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
+ VK_KHR_SURFACE_EXTENSION_NAME);
}
skip_call |= parameter_validation_vkGetPhysicalDeviceSurfaceFormatsKHR(my_data->report_data, surface, pSurfaceFormatCount,
@@ -4911,7 +4959,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica
reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
LayerName,
"vkGetPhysicalDeviceSurfacePresentModesKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
+ VK_KHR_SURFACE_EXTENSION_NAME);
}
skip_call |= parameter_validation_vkGetPhysicalDeviceSurfacePresentModesKHR(my_data->report_data, surface, pPresentModeCount,
@@ -4927,6 +4975,24 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica
return result;
}
+VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) {
+ bool skip_call = false;
+ layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
+ assert(my_data != NULL);
+
+ if (!instance_extension_map[get_dispatch_table(pc_instance_table_map, instance)].surface_enabled) {
+ skip_call |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
+ reinterpret_cast<uint64_t>(instance), __LINE__, EXTENSION_NOT_ENABLED,
+ LayerName, "vkDestroySurfaceKHR() called even though the %s extension was not enabled for this VkInstance.",
+ VK_KHR_SURFACE_EXTENSION_NAME);
+ }
+
+ if (!skip_call) {
+ get_dispatch_table(pc_instance_table_map, instance)->DestroySurfaceKHR(instance, surface, pAllocator);
+ }
+}
+
#ifdef VK_USE_PLATFORM_WIN32_KHR
VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -5246,6 +5312,13 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
assert(my_data != NULL);
+ if (!my_data->display_swapchain_enabled) {
+ skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(device), __LINE__, EXTENSION_NOT_ENABLED, LayerName,
+ "vkCreateSharedSwapchainsKHR() called even though the %s extension was not enabled for this VkDevice.",
+ VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME);
+ }
+
skip_call |= parameter_validation_vkCreateSharedSwapchainsKHR(my_data->report_data, swapchainCount, pCreateInfos, pAllocator,
pSwapchains);
@@ -5604,22 +5677,17 @@ static PFN_vkVoidFunction InterceptWsiEnabledCommand(const char *name, VkDevice
{"vkGetSwapchainImagesKHR", reinterpret_cast<PFN_vkVoidFunction>(GetSwapchainImagesKHR)},
{"vkAcquireNextImageKHR", reinterpret_cast<PFN_vkVoidFunction>(AcquireNextImageKHR)},
{"vkQueuePresentKHR", reinterpret_cast<PFN_vkVoidFunction>(QueuePresentKHR)},
+ {"vkDestroySwapchainKHR", reinterpret_cast<PFN_vkVoidFunction>(DestroySwapchainKHR)},
};
if (device) {
- layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
-
- if (device_data->swapchain_enabled) {
- for (size_t i = 0; i < ARRAY_SIZE(wsi_device_commands); i++) {
- if (!strcmp(wsi_device_commands[i].name, name))
- return wsi_device_commands[i].proc;
- }
+ for (size_t i = 0; i < ARRAY_SIZE(wsi_device_commands); i++) {
+ if (!strcmp(wsi_device_commands[i].name, name))
+ return wsi_device_commands[i].proc;
}
- if (device_data->display_swapchain_enabled) {
- if (!strcmp("vkCreateSharedSwapchainsKHR", name)) {
- return reinterpret_cast<PFN_vkVoidFunction>(CreateSharedSwapchainsKHR);
- }
+ if (!strcmp("vkCreateSharedSwapchainsKHR", name)) {
+ return reinterpret_cast<PFN_vkVoidFunction>(CreateSharedSwapchainsKHR);
}
}
@@ -5637,6 +5705,7 @@ static PFN_vkVoidFunction InterceptWsiEnabledCommand(const char *name, VkInstanc
{"vkGetPhysicalDeviceSurfaceFormatsKHR", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfaceFormatsKHR)},
{"vkGetPhysicalDeviceSurfacePresentModesKHR",
reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfacePresentModesKHR)},
+ {"vkDestroySurfaceKHR", reinterpret_cast<PFN_vkVoidFunction>(DestroySurfaceKHR)},
};
for (size_t i = 0; i < ARRAY_SIZE(wsi_instance_commands); i++) {
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 502f7501..02b9c44d 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -43,7 +43,6 @@ static const VkLayerProperties swapchain_layer = {
};
static void checkDeviceRegisterExtensions(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, VkDevice device) {
- uint32_t i;
layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
layer_data *my_instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
@@ -63,20 +62,6 @@ static void checkDeviceRegisterExtensions(VkPhysicalDevice physicalDevice, const
"vkCreateDevice() called with a non-valid VkPhysicalDevice.");
}
my_device_data->deviceMap[device].device = device;
- my_device_data->deviceMap[device].swapchainExtensionEnabled = false;
- my_device_data->deviceMap[device].displaySwapchainExtensionEnabled = false;
-
- // Record whether the WSI device extension was enabled for this VkDevice.
- // No need to check if the extension was advertised by
- // vkEnumerateDeviceExtensionProperties(), since the loader handles that.
- for (i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) {
- my_device_data->deviceMap[device].swapchainExtensionEnabled = true;
- }
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME) == 0) {
- my_device_data->deviceMap[device].displaySwapchainExtensionEnabled = true;
- }
- }
}
static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateInfo, VkInstance instance) {
@@ -86,7 +71,6 @@ static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI
// Remember this instance, and whether the VK_KHR_surface extension
// was enabled for it:
my_data->instanceMap[instance].instance = instance;
- my_data->instanceMap[instance].surfaceExtensionEnabled = false;
my_data->instanceMap[instance].displayExtensionEnabled = false;
// Look for one or more debug report create info structures, and copy the
@@ -98,10 +82,6 @@ static void checkInstanceRegisterExtensions(const VkInstanceCreateInfo *pCreateI
// VkInstance. No need to check if the extension was advertised by
// vkEnumerateInstanceExtensionProperties(), since the loader handles that.
for (i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SURFACE_EXTENSION_NAME) == 0) {
-
- my_data->instanceMap[instance].surfaceExtensionEnabled = true;
- }
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_DISPLAY_EXTENSION_NAME) == 0) {
my_data->instanceMap[instance].displayExtensionEnabled = true;
@@ -956,20 +936,6 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR s
auto it = my_data->surfaceMap.find(surface);
pSurface = (it == my_data->surfaceMap.end()) ? NULL : &it->second;
}
- SwpInstance *pInstance = NULL;
- {
- auto it = my_data->instanceMap.find(instance);
- pInstance = (it == my_data->instanceMap.end()) ? NULL : &it->second;
- }
-
- // Validate that the platform extension was enabled:
- if (pInstance && !pInstance->surfaceExtensionEnabled) {
- skip_call |=
- log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- reinterpret_cast<uint64_t>(instance), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkDestroySurfaceKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
- }
// Regardless of skip_call value, do some internal cleanup:
if (pSurface) {
@@ -1383,14 +1349,6 @@ static bool validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateI
pDevice = (it == my_data->deviceMap.end()) ? NULL : &it->second;
}
- // Validate that the swapchain extension was enabled:
- if (pDevice && !pDevice->swapchainExtensionEnabled) {
- return log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkCreateSwapchainKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_SWAPCHAIN_EXTENSION_NAME);
- }
-
// Keep around a useful pointer to pPhysicalDevice:
SwpPhysicalDevice *pPhysicalDevice = pDevice->pPhysicalDevice;
@@ -1711,19 +1669,6 @@ VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR s
bool skip_call = false;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
std::unique_lock<std::mutex> lock(global_lock);
- SwpDevice *pDevice = NULL;
- {
- auto it = my_data->deviceMap.find(device);
- pDevice = (it == my_data->deviceMap.end()) ? NULL : &it->second;
- }
-
- // Validate that the swapchain extension was enabled:
- if (pDevice && !pDevice->swapchainExtensionEnabled) {
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkDestroySwapchainKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_SWAPCHAIN_EXTENSION_NAME);
- }
// Regardless of skip_call value, do some internal cleanup:
SwpSwapchain *pSwapchain = NULL;
@@ -1758,19 +1703,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai
bool skip_call = false;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
std::unique_lock<std::mutex> lock(global_lock);
- SwpDevice *pDevice = NULL;
- {
- auto it = my_data->deviceMap.find(device);
- pDevice = (it == my_data->deviceMap.end()) ? NULL : &it->second;
- }
- // Validate that the swapchain extension was enabled:
- if (pDevice && !pDevice->swapchainExtensionEnabled) {
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkGetSwapchainImagesKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_SWAPCHAIN_EXTENSION_NAME);
- }
SwpSwapchain *pSwapchain = NULL;
{
auto it = my_data->swapchainMap.find(swapchain);
@@ -1850,13 +1783,6 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK
pDevice = (it == my_data->deviceMap.end()) ? NULL : &it->second;
}
- // Validate that the swapchain extension was enabled:
- if (pDevice && !pDevice->swapchainExtensionEnabled) {
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkAcquireNextImageKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_SWAPCHAIN_EXTENSION_NAME);
- }
SwpSwapchain *pSwapchain = NULL;
{
auto it = my_data->swapchainMap.find(swapchain);
@@ -1932,13 +1858,6 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf
pSwapchain = (it == my_data->swapchainMap.end()) ? NULL : &it->second;
}
if (pSwapchain) {
- if (!pSwapchain->pDevice->swapchainExtensionEnabled) {
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(pSwapchain->pDevice->device), __LINE__,
- SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkQueuePresentKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_SWAPCHAIN_EXTENSION_NAME);
- }
SwpQueue *pQueue = NULL;
{
auto it = my_data->queueMap.find(queue);
@@ -1998,19 +1917,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32
bool skip_call = false;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
std::unique_lock<std::mutex> lock(global_lock);
- SwpDevice *pDevice = nullptr;
- {
- auto it = my_data->deviceMap.find(device);
- pDevice = (it == my_data->deviceMap.end()) ? nullptr : &it->second;
- }
- // Validate that the swapchain extension was enabled:
- if (pDevice && !pDevice->displaySwapchainExtensionEnabled) {
- skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, swapchain_layer_name,
- "vkCreateSharedSwapchainsKHR() called even though the %s extension was not enabled for this VkDevice.",
- VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME);
- }
if (!pCreateInfos || !pSwapchains) {
skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_NULL_POINTER, swapchain_layer_name,
diff --git a/layers/swapchain.h b/layers/swapchain.h
index ce071949..e472d1cf 100644
--- a/layers/swapchain.h
+++ b/layers/swapchain.h
@@ -101,9 +101,6 @@ struct SwpInstance {
// remembered:
unordered_map<const void *, SwpPhysicalDevice *> physicalDevices;
- // Set to true if VK_KHR_SURFACE_EXTENSION_NAME was enabled for this VkInstance:
- bool surfaceExtensionEnabled;
-
// Set to true if VK_KHR_DISPLAY_EXTENSION_NAME was enabled for this VkInstance:
bool displayExtensionEnabled;
};
@@ -182,12 +179,6 @@ struct SwpDevice {
// Corresponding VkPhysicalDevice (and info) to this VkDevice:
SwpPhysicalDevice *pPhysicalDevice;
- // Set to true if VK_KHR_SWAPCHAIN_EXTENSION_NAME was enabled:
- bool swapchainExtensionEnabled;
-
- // Set to true if VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME was enabled:
- bool displaySwapchainExtensionEnabled;
-
// When vkCreateSwapchainKHR is called, the VkSwapchainKHR's are
// remembered:
unordered_map<VkSwapchainKHR, SwpSwapchain *> swapchains;