VkBool32 skipCall = VK_FALSE;
dispatch_key key = get_dispatch_key(instance);
layer_data *my_data = get_my_data_ptr(key, layer_data_map);
- // Validate that a valid VkInstance was used:
SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (VK_FALSE == skipCall) {
// Call down the call chain:
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (!pCreateInfo) {
skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
device,
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
- // Validate that a valid VkInstance was used:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
-
if (VK_FALSE == skipCall) {
// Call down the call chain:
my_data->instance_dispatch_table->DestroySurfaceKHR(
VkResult result = VK_SUCCESS;
VkBool32 skipCall = VK_FALSE;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
-
- // Validate that a valid VkInstance was used:
SwpInstance *pInstance = &(my_data->instanceMap[instance]);
- if (!pInstance) {
- skipCall |= LOG_ERROR_NON_VALID_OBJ(VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- instance,
- "VkInstance");
- }
if (VK_FALSE == skipCall) {
// Call down the call chain:
if ((result == VK_SUCCESS) && pInstance && pPhysicalDevices &&
(*pPhysicalDeviceCount > 0)) {
// Record the VkPhysicalDevices returned by the ICD:
- SwpInstance *pInstance = &(my_data->instanceMap[instance]);
for (uint32_t i = 0; i < *pPhysicalDeviceCount; i++) {
my_data->physicalDeviceMap[pPhysicalDevices[i]].physicalDevice =
pPhysicalDevices[i];
my_data->physicalDeviceMap[pPhysicalDevices[i]].presentModeCount = 0;
my_data->physicalDeviceMap[pPhysicalDevices[i]].pPresentModes = NULL;
// Point to the associated SwpInstance:
- pInstance->physicalDevices[pPhysicalDevices[i]] =
- &my_data->physicalDeviceMap[pPhysicalDevices[i]];
+ if (pInstance) {
+ pInstance->physicalDevices[pPhysicalDevices[i]] =
+ &my_data->physicalDeviceMap[pPhysicalDevices[i]];
+ }
}
}