aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-30 21:10:14 -0800
committerJason Ekstrand <[email protected]>2015-12-03 13:43:52 -0800
commitaadb7dce9b5dfc16878638580dc80759a45ca773 (patch)
tree640ff27b2bee146248eb19bf8799061a8dab9108
parent607fe31598b45db6082945172403992ee2f073a6 (diff)
vk/0.210.0: Update to the new instance/device create structs
-rw-r--r--include/vulkan/vulkan.h37
-rw-r--r--src/vulkan/anv_device.c16
2 files changed, 27 insertions, 26 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h
index e110be63ced..860df312735 100644
--- a/include/vulkan/vulkan.h
+++ b/include/vulkan/vulkan.h
@@ -100,12 +100,12 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
#define VK_FALSE 0
#define VK_QUEUE_FAMILY_IGNORED (~0U)
#define VK_SUBPASS_EXTERNAL (~0U)
-#define VK_MAX_PHYSICAL_DEVICE_NAME 256
-#define VK_UUID_LENGTH 16
+#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
+#define VK_UUID_SIZE 16
#define VK_MAX_MEMORY_TYPES 32
#define VK_MAX_MEMORY_HEAPS 16
-#define VK_MAX_EXTENSION_NAME 256
-#define VK_MAX_DESCRIPTION 256
+#define VK_MAX_EXTENSION_NAME_SIZE 256
+#define VK_MAX_DESCRIPTION_SIZE 256
typedef enum VkResult {
@@ -1315,11 +1315,11 @@ typedef struct VkPhysicalDeviceSparseProperties {
typedef struct VkPhysicalDeviceProperties {
uint32_t apiVersion;
uint32_t driverVersion;
- uint32_t vendorId;
- uint32_t deviceId;
+ uint32_t vendorID;
+ uint32_t deviceID;
VkPhysicalDeviceType deviceType;
- char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
- uint8_t pipelineCacheUUID[VK_UUID_LENGTH];
+ char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
+ uint8_t pipelineCacheUUID[VK_UUID_SIZE];
VkPhysicalDeviceLimits limits;
VkPhysicalDeviceSparseProperties sparseProperties;
} VkPhysicalDeviceProperties;
@@ -1353,31 +1353,32 @@ typedef struct VkDeviceQueueCreateInfo {
VkDeviceQueueCreateFlags flags;
uint32_t queueFamilyIndex;
uint32_t queueCount;
+ const float* pQueuePriorities;
} VkDeviceQueueCreateInfo;
typedef struct VkDeviceCreateInfo {
VkStructureType sType;
const void* pNext;
VkDeviceCreateFlags flags;
- uint32_t queueRecordCount;
- const VkDeviceQueueCreateInfo* pRequestedQueues;
- uint32_t layerCount;
- const char*const* ppEnabledLayerNames;
- uint32_t extensionCount;
- const char*const* ppEnabledExtensionNames;
+ uint32_t queueCreateInfoCount;
+ const VkDeviceQueueCreateInfo* pQueueCreateInfos;
+ uint32_t enabledLayerNameCount;
+ const char* const* ppEnabledLayerNames;
+ uint32_t enabledExtensionNameCount;
+ const char* const* ppEnabledExtensionNames;
const VkPhysicalDeviceFeatures* pEnabledFeatures;
} VkDeviceCreateInfo;
typedef struct VkExtensionProperties {
- char extName[VK_MAX_EXTENSION_NAME];
+ char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
uint32_t specVersion;
} VkExtensionProperties;
typedef struct VkLayerProperties {
- char layerName[VK_MAX_EXTENSION_NAME];
+ char layerName[VK_MAX_EXTENSION_NAME_SIZE];
uint32_t specVersion;
- uint32_t implVersion;
- char description[VK_MAX_DESCRIPTION];
+ uint32_t implementationVersion;
+ char description[VK_MAX_DESCRIPTION_SIZE];
} VkLayerProperties;
typedef struct {
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c
index f0e26433eed..e0a6ed62ebd 100644
--- a/src/vulkan/anv_device.c
+++ b/src/vulkan/anv_device.c
@@ -172,14 +172,14 @@ static const VkAllocCallbacks default_alloc_callbacks = {
static const VkExtensionProperties global_extensions[] = {
{
- .extName = VK_EXT_KHR_SWAPCHAIN_EXTENSION_NAME,
+ .extensionName = VK_EXT_KHR_SWAPCHAIN_EXTENSION_NAME,
.specVersion = 17,
},
};
static const VkExtensionProperties device_extensions[] = {
{
- .extName = VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME,
+ .extensionName = VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME,
.specVersion = 53,
},
};
@@ -201,7 +201,7 @@ VkResult anv_CreateInstance(
bool found = false;
for (uint32_t j = 0; j < ARRAY_SIZE(global_extensions); j++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
- global_extensions[j].extName) == 0) {
+ global_extensions[j].extensionName) == 0) {
found = true;
break;
}
@@ -502,15 +502,15 @@ void anv_GetPhysicalDeviceProperties(
*pProperties = (VkPhysicalDeviceProperties) {
.apiVersion = VK_MAKE_VERSION(0, 170, 2),
.driverVersion = 1,
- .vendorId = 0x8086,
- .deviceId = pdevice->chipset_id,
+ .vendorID = 0x8086,
+ .deviceID = pdevice->chipset_id,
.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
.limits = limits,
.sparseProperties = {0}, /* Broadwell doesn't do sparse. */
};
strcpy(pProperties->deviceName, pdevice->name);
- snprintf((char *)pProperties->pipelineCacheUUID, VK_UUID_LENGTH,
+ snprintf((char *)pProperties->pipelineCacheUUID, VK_UUID_SIZE,
"anv-%s", MESA_GIT_SHA1 + 4);
}
@@ -619,11 +619,11 @@ VkResult anv_CreateDevice(
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
- 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(device_extensions); j++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
- device_extensions[j].extName) == 0) {
+ device_extensions[j].extensionName) == 0) {
found = true;
break;
}