"(ICD).\n\nPlease look at the Getting Started guide for "
"additional information.\n",
"vkCreateInstance Failure");
- } else if (err == VK_ERROR_INVALID_EXTENSION) {
+ } else if (err == VK_ERROR_EXTENSION_NOT_PRESENT) {
ERR_EXIT("Cannot find a specified extension library"
".\nMake sure your layers path is set appropriately\n",
"vkCreateInstance Failure");
"(ICD).\n\nPlease look at the Getting Started guide for "
"additional information.\n",
"vkCreateInstance Failure");
- } else if (err == VK_ERROR_INVALID_EXTENSION) {
+ } else if (err == VK_ERROR_EXTENSION_NOT_PRESENT) {
ERR_EXIT("Cannot find a specified extension library"
".\nMake sure your layers path is set appropriately\n",
"vkCreateInstance Failure");
STR(VK_TIMEOUT);
STR(VK_EVENT_SET);
STR(VK_EVENT_RESET);
- STR(VK_ERROR_UNKNOWN);
STR(VK_ERROR_INITIALIZATION_FAILED);
STR(VK_ERROR_OUT_OF_HOST_MEMORY);
STR(VK_ERROR_OUT_OF_DEVICE_MEMORY);
STR(VK_ERROR_DEVICE_LOST);
- STR(VK_ERROR_INVALID_EXTENSION);
+ STR(VK_ERROR_LAYER_NOT_PRESENT);
+ STR(VK_ERROR_EXTENSION_NOT_PRESENT);
STR(VK_ERROR_MEMORY_MAP_FAILED);
- STR(VK_ERROR_MEMORY_UNMAP_FAILED);
- STR(VK_ERROR_INCOMPATIBLE_DEVICE);
STR(VK_ERROR_INCOMPATIBLE_DRIVER);
#undef STR
default: return "UNKNOWN_RESULT";
}
if (!extension_found) {
printf("Cannot find extension: %s\n", known_extensions[i]);
- ERR_EXIT(VK_ERROR_INVALID_EXTENSION);
+ ERR_EXIT(VK_ERROR_EXTENSION_NOT_PRESENT);
}
}
}
if (!extension_found) {
printf("Cannot find extension: %s\n", known_extensions[i]);
- ERR_EXIT(VK_ERROR_INVALID_EXTENSION);
+ ERR_EXIT(VK_ERROR_EXTENSION_NOT_PRESENT);
}
}
ERR_EXIT(err);
if (gpu_count > MAX_GPUS) {
printf("Too many GPUS found \n");
- ERR_EXIT(VK_ERROR_UNKNOWN);
+ ERR_EXIT(-1);
}
err = vkEnumeratePhysicalDevices(inst.instance, &gpu_count, objs);
if (err)
info->ppEnabledExtensionNames[i]);
if (ext == NULLDRV_EXT_INVALID)
- return VK_ERROR_INVALID_EXTENSION;
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
dev->exts[ext] = true;
}
*ppData = ptr;
- return (ptr) ? VK_SUCCESS : VK_ERROR_UNKNOWN;
+ return (ptr) ? VK_SUCCESS : VK_ERROR_MEMORY_MAP_FAILED;
}
ICD_EXPORT void VKAPI vkUnmapMemory(
VK_EVENT_SET = 4,
VK_EVENT_RESET = 5,
VK_INCOMPLETE = 6,
- VK_ERROR_UNKNOWN = -1,
- VK_ERROR_OUT_OF_HOST_MEMORY = -2,
- VK_ERROR_OUT_OF_DEVICE_MEMORY = -3,
- VK_ERROR_INITIALIZATION_FAILED = -4,
- VK_ERROR_DEVICE_LOST = -5,
- VK_ERROR_MEMORY_MAP_FAILED = -6,
- VK_ERROR_MEMORY_UNMAP_FAILED = -7,
- VK_ERROR_INCOMPATIBLE_DEVICE = -8,
- VK_ERROR_INCOMPATIBLE_DRIVER = -9,
- VK_ERROR_INVALID_EXTENSION = -10,
- VK_ERROR_INVALID_LAYER = -11,
- VK_RESULT_BEGIN_RANGE = VK_ERROR_INVALID_LAYER,
+ VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
+ VK_ERROR_INITIALIZATION_FAILED = -3,
+ VK_ERROR_DEVICE_LOST = -4,
+ VK_ERROR_MEMORY_MAP_FAILED = -5,
+ VK_ERROR_LAYER_NOT_PRESENT = -6,
+ VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+ VK_ERROR_INCOMPATIBLE_DRIVER = -8,
+ VK_RESULT_BEGIN_RANGE = VK_ERROR_INCOMPATIBLE_DRIVER,
VK_RESULT_END_RANGE = VK_INCOMPLETE,
- VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INVALID_LAYER + 1),
+ VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INCOMPATIBLE_DRIVER + 1),
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
} VkResult;
return "VK_RESULT_MAX_ENUM";
break;
}
- case VK_ERROR_INVALID_LAYER:
+ case VK_ERROR_LAYER_NOT_PRESENT:
{
- return "VK_ERROR_INVALID_LAYER";
+ return "VK_ERROR_LAYER_NOT_PRESENT";
break;
}
case VK_ERROR_INCOMPATIBLE_DRIVER:
return "VK_ERROR_INCOMPATIBLE_DRIVER";
break;
}
- case VK_ERROR_MEMORY_UNMAP_FAILED:
- {
- return "VK_ERROR_MEMORY_UNMAP_FAILED";
- break;
- }
case VK_ERROR_MEMORY_MAP_FAILED:
{
return "VK_ERROR_MEMORY_MAP_FAILED";
return "VK_ERROR_OUT_OF_HOST_MEMORY";
break;
}
- case VK_ERROR_UNKNOWN:
- {
- return "VK_ERROR_UNKNOWN";
- break;
- }
case VK_ERROR_INITIALIZATION_FAILED:
{
return "VK_ERROR_INITIALIZATION_FAILED";
return "VK_UNSUPPORTED";
break;
}
- case VK_ERROR_INCOMPATIBLE_DEVICE:
- {
- return "VK_ERROR_INCOMPATIBLE_DEVICE";
- break;
- }
case VK_SUCCESS:
{
return "VK_SUCCESS";
break;
}
- case VK_ERROR_INVALID_EXTENSION:
+ case VK_ERROR_EXTENSION_NOT_PRESENT:
{
- return "VK_ERROR_INVALID_EXTENSION";
+ return "VK_ERROR_EXTENSION_NOT_PRESENT";
break;
}
case VK_ERROR_DEVICE_LOST:
return get_dispatch_table(shader_checker_device_table_map, device)->CreateGraphicsPipelines(device, pipelineCache, count, pCreateInfos, pPipelines);
}
else {
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_VALIDATION_FAILED;
}
}
layer_prop = loader_get_layer_property(search_target, search_list);
if (!layer_prop) {
loader_log(VK_DBG_REPORT_ERROR_BIT, 0, "Unable to find layer %s", search_target);
- err = VK_ERROR_INVALID_LAYER;
+ err = VK_ERROR_LAYER_NOT_PRESENT;
continue;
}
{
VkResult err;
- if (inst == NULL)
- return VK_ERROR_UNKNOWN;
+ assert(inst && "Cannot have null instance");
if (!loader_init_layer_list(inst, &inst->activated_layer_list)) {
loader_log(VK_DBG_REPORT_ERROR_BIT, 0, "Failed to alloc Instance activated layer list");
{
VkResult err;
- if (dev == NULL)
- return VK_ERROR_UNKNOWN;
+ assert(dev && "Cannot have null device");
if (dev->activated_layer_list.list == NULL || dev->activated_layer_list.capacity == 0) {
loader_init_layer_list(inst, &dev->activated_layer_list);
prop = loader_get_layer_property(ppEnabledLayerNames[i],
list);
if (!prop) {
- return VK_ERROR_INVALID_LAYER;
+ return VK_ERROR_LAYER_NOT_PRESENT;
}
}
if (!extension_prop) {
/* Didn't find extension name in any of the global layers, error out */
- return VK_ERROR_INVALID_EXTENSION;
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
}
}
return VK_SUCCESS;
if (!extension_prop) {
/* Didn't find extension name in any of the device layers, error out */
- return VK_ERROR_INVALID_EXTENSION;
+ return VK_ERROR_EXTENSION_NOT_PRESENT;
}
}
return VK_SUCCESS;
{
struct loader_icd *icd;
uint32_t n, count = 0;
- VkResult res = VK_ERROR_UNKNOWN;
+ VkResult res;
icd = ptr_instance->icds;
while (icd) {
if (global_ext_list == NULL) {
loader_platform_thread_unlock_mutex(&loader_lock);
- return VK_ERROR_INVALID_LAYER;
+ return VK_ERROR_LAYER_NOT_PRESENT;
}
if (pProperties == NULL) {
{
uint32_t gpu_index;
struct loader_icd *icd = loader_get_icd(physicalDevice, &gpu_index);
- VkResult res = VK_ERROR_UNKNOWN;
+
+ assert(pSupported && "GetPhysicalDeviceSurfaceSupportKHR: Error, null pSupported");
*pSupported = false;
- if (icd->GetPhysicalDeviceSurfaceSupportKHR) {
- res = icd->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice,
- queueNodeIndex,
- pSurfaceDescription,
- pSupported);
- }
+ assert(icd->GetPhysicalDeviceSurfaceSupportKHR && "loader: null GetPhysicalDeviceSurfaceSupportKHR ICD pointer");
- return res;
+ return icd->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice,
+ queueNodeIndex,
+ pSurfaceDescription,
+ pSupported);
}