mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
vk/0.210.0: Rework VkInstanceCreateInfo
This commit is contained in:
parent
c30a021820
commit
9349625d60
2 changed files with 11 additions and 11 deletions
|
|
@ -1078,11 +1078,11 @@ typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
|
|||
|
||||
typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
|
||||
|
||||
typedef struct {
|
||||
typedef struct VkApplicationInfo {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const char* pAppName;
|
||||
uint32_t appVersion;
|
||||
const char* pApplicationName;
|
||||
uint32_t applicationVersion;
|
||||
const char* pEngineName;
|
||||
uint32_t engineVersion;
|
||||
uint32_t apiVersion;
|
||||
|
|
@ -1098,12 +1098,12 @@ typedef struct VkInstanceCreateInfo {
|
|||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkInstanceCreateFlags flags;
|
||||
const VkApplicationInfo* pAppInfo;
|
||||
const VkApplicationInfo* pApplicationInfo;
|
||||
const VkAllocCallbacks* pAllocCb;
|
||||
uint32_t layerCount;
|
||||
const char*const* ppEnabledLayerNames;
|
||||
uint32_t extensionCount;
|
||||
const char*const* ppEnabledExtensionNames;
|
||||
uint32_t enabledLayerNameCount;
|
||||
const char* const* ppEnabledLayerNames;
|
||||
uint32_t enabledExtensionNameCount;
|
||||
const char* const* ppEnabledExtensionNames;
|
||||
} VkInstanceCreateInfo;
|
||||
|
||||
typedef struct VkPhysicalDeviceFeatures {
|
||||
|
|
|
|||
|
|
@ -194,10 +194,10 @@ VkResult anv_CreateInstance(
|
|||
|
||||
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO);
|
||||
|
||||
if (pCreateInfo->pAppInfo->apiVersion != VK_MAKE_VERSION(0, 170, 2))
|
||||
if (pCreateInfo->pApplicationInfo->apiVersion != VK_MAKE_VERSION(0, 170, 2))
|
||||
return vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
|
||||
|
||||
for (uint32_t i = 0; i < pCreateInfo->extensionCount; i++) {
|
||||
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
|
||||
bool found = false;
|
||||
for (uint32_t j = 0; j < ARRAY_SIZE(global_extensions); j++) {
|
||||
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
|
||||
|
|
@ -223,7 +223,7 @@ VkResult anv_CreateInstance(
|
|||
instance->pAllocUserData = alloc_callbacks->pUserData;
|
||||
instance->pfnAlloc = alloc_callbacks->pfnAlloc;
|
||||
instance->pfnFree = alloc_callbacks->pfnFree;
|
||||
instance->apiVersion = pCreateInfo->pAppInfo->apiVersion;
|
||||
instance->apiVersion = pCreateInfo->pApplicationInfo->apiVersion;
|
||||
instance->physicalDeviceCount = -1;
|
||||
|
||||
_mesa_locale_init();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue