// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
// Record the VkSurfaceKHR returned by the ICD:
my_data->surfaceMap[*pSurface].surface = *pSurface;
my_data->surfaceMap[*pSurface].pInstance = pInstance;
- my_data->surfaceMap[*pSurface].usedAllocatorToCreate = (pAllocator != NULL);
my_data->surfaceMap[*pSurface].numQueueFamilyIndexSupport = 0;
my_data->surfaceMap[*pSurface].pQueueFamilyIndexSupport = NULL;
// Point to the associated SwpInstance:
}
pSurface->swapchains.clear();
}
- if ((pAllocator != NULL) != pSurface->usedAllocatorToCreate) {
- 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_INCOMPATIBLE_ALLOCATOR, swapchain_layer_name,
- "vkDestroySurfaceKHR() called with incompatible pAllocator from when the object was created.");
- }
my_data->surfaceMap.erase(surface);
}
lock.unlock();
}
my_data->swapchainMap[*pSwapchain].pDevice = pDevice;
my_data->swapchainMap[*pSwapchain].imageCount = 0;
- my_data->swapchainMap[*pSwapchain].usedAllocatorToCreate = (pAllocator != NULL);
// Store a pointer to the surface
SwpPhysicalDevice *pPhysicalDevice = pDevice->pPhysicalDevice;
SwpInstance *pInstance = (pPhysicalDevice) ? pPhysicalDevice->pInstance : NULL;
if (pSwapchain->imageCount) {
pSwapchain->images.clear();
}
- if ((pAllocator != NULL) != pSwapchain->usedAllocatorToCreate) {
- 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_INCOMPATIBLE_ALLOCATOR, swapchain_layer_name,
- "vkDestroySwapchainKHR() called with incompatible pAllocator from when the object was created.");
- }
my_data->swapchainMap.erase(swapchain);
}
lock.unlock();
SWAPCHAIN_WRONG_STYPE, // The sType for a struct has the wrong value
SWAPCHAIN_WRONG_NEXT, // The pNext for a struct is not NULL
SWAPCHAIN_ZERO_VALUE, // A value should be non-zero
- SWAPCHAIN_INCOMPATIBLE_ALLOCATOR, // pAllocator must be compatible (i.e. NULL or not) when object is created and destroyed
SWAPCHAIN_DID_NOT_QUERY_QUEUE_FAMILIES, // A function using a queueFamilyIndex was called before
// vkGetPhysicalDeviceQueueFamilyProperties() was called
SWAPCHAIN_QUEUE_FAMILY_INDEX_TOO_LARGE, // A queueFamilyIndex value is not less than pQueueFamilyPropertyCount returned by
// remembered:
unordered_map<VkSwapchainKHR, SwpSwapchain *> swapchains;
- // 'true' if pAllocator was non-NULL when vkCreate*SurfaceKHR was called:
- bool usedAllocatorToCreate;
-
// Value of pQueueFamilyPropertyCount that was returned by the
// vkGetPhysicalDeviceQueueFamilyProperties() function:
uint32_t numQueueFamilyIndexSupport;
// remembered:
uint32_t imageCount;
unordered_map<int, SwpImage> images;
-
- // 'true' if pAllocator was non-NULL when vkCreateSwapchainKHR was called:
- bool usedAllocatorToCreate;
};
// Create one of these for each VkQueue within a VkDevice: