diff options
| author | Chia-I Wu <olv@lunarg.com> | 2015-11-06 06:42:02 +0800 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2015-11-06 15:34:07 -0700 |
| commit | 8b4974426523e356ef4fae9088ca157092e80d06 (patch) | |
| tree | 9e8672286ea9e65343caa58ba2741ebd92374c19 | |
| parent | 242c24fae2b831e63a076151880119f52aed408d (diff) | |
| download | usermoji-8b4974426523e356ef4fae9088ca157092e80d06.tar.xz | |
bug 15085: queue creation naming issues
Manually rename arraySize and
s/queuePriorityCount/queueCount/g
s/requestedQueueCount/queueCreateInfoCount/g
s/pRequestedQueues/pQueueCreateInfos/g
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15085
Conflicts:
layers/draw_state.cpp
| -rw-r--r-- | demos/cube.c | 10 | ||||
| -rw-r--r-- | demos/tri.c | 8 | ||||
| -rw-r--r-- | demos/vulkaninfo.c | 10 | ||||
| -rw-r--r-- | icd/nulldrv/nulldrv.c | 6 | ||||
| -rw-r--r-- | include/vulkan/vulkan.h | 8 | ||||
| -rw-r--r-- | layers/device_limits.cpp | 8 | ||||
| -rw-r--r-- | layers/draw_state.cpp | 16 | ||||
| -rw-r--r-- | loader/loader.c | 2 |
8 files changed, 34 insertions, 34 deletions
diff --git a/demos/cube.c b/demos/cube.c index 25ca9b23..9cb5666e 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1301,14 +1301,14 @@ static void demo_prepare_descriptor_layout(struct demo *demo) [0] = { .binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, - .arraySize = 1, + .descriptorCount = 1, .stageFlags = VK_SHADER_STAGE_VERTEX_BIT, .pImmutableSamplers = NULL, }, [1] = { .binding = 1, .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, - .arraySize = DEMO_TEXTURE_COUNT, + .descriptorCount = DEMO_TEXTURE_COUNT, .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT, .pImmutableSamplers = NULL, }, @@ -2352,15 +2352,15 @@ static void demo_init_vk(struct demo *demo) .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, .pNext = NULL, .queueFamilyIndex = gfx_queue_idx, - .queuePriorityCount = 1, + .queueCount = 1, .pQueuePriorities = queue_priorities }; VkDeviceCreateInfo device = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .pNext = NULL, - .requestedQueueCount = 1, - .pRequestedQueues = &queue, + .queueCreateInfoCount = 1, + .pQueueCreateInfos = &queue, .enabledLayerNameCount = enabled_layer_count, .ppEnabledLayerNames = (const char *const*) ((demo->validate) ? device_validation_layers : NULL), .enabledExtensionNameCount = enabled_extension_count, diff --git a/demos/tri.c b/demos/tri.c index 201c973a..f51f9378 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -1061,7 +1061,7 @@ static void demo_prepare_descriptor_layout(struct demo *demo) const VkDescriptorSetLayoutBinding layout_binding = { .binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, - .arraySize = DEMO_TEXTURE_COUNT, + .descriptorCount = DEMO_TEXTURE_COUNT, .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT, .pImmutableSamplers = NULL, }; @@ -1791,7 +1791,7 @@ static void demo_init_vk(struct demo *demo) .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, .pNext = NULL, .queueFamilyIndex = 0, - .queuePriorityCount = 1, + .queueCount = 1, .pQueuePriorities = queue_priorities }; uint32_t gpu_count; @@ -1886,8 +1886,8 @@ static void demo_init_vk(struct demo *demo) VkDeviceCreateInfo device = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .pNext = NULL, - .requestedQueueCount = 1, - .pRequestedQueues = &queue, + .queueCreateInfoCount = 1, + .pQueueCreateInfos = &queue, .enabledLayerNameCount = enabled_layer_count, .ppEnabledLayerNames = (const char *const*) ((demo->validate) ? device_validation_layers : NULL), .enabledExtensionNameCount = enabled_extension_count, diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c index 640ccab7..995c1bda 100644 --- a/demos/vulkaninfo.c +++ b/demos/vulkaninfo.c @@ -391,8 +391,8 @@ static void app_dev_init(struct app_dev *dev, struct app_gpu *gpu) VkDeviceCreateInfo info = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .pNext = NULL, - .requestedQueueCount = 0, - .pRequestedQueues = NULL, + .queueCreateInfoCount = 0, + .pQueueCreateInfos = NULL, .enabledLayerNameCount = 0, .ppEnabledLayerNames = NULL, .enabledExtensionNameCount = 0, @@ -475,8 +475,8 @@ static void app_dev_init(struct app_dev *dev, struct app_gpu *gpu) } /* request all queues */ - info.requestedQueueCount = gpu->queue_count; - info.pRequestedQueues = gpu->queue_reqs; + info.queueCreateInfoCount = gpu->queue_count; + info.pQueueCreateInfos = gpu->queue_reqs; info.enabledLayerNameCount = 0; info.ppEnabledLayerNames = NULL; @@ -662,7 +662,7 @@ static void app_gpu_init(struct app_gpu *gpu, uint32_t id, VkPhysicalDevice obj) gpu->queue_reqs[i].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; gpu->queue_reqs[i].pNext = NULL; gpu->queue_reqs[i].queueFamilyIndex = i; - gpu->queue_reqs[i].queuePriorityCount = gpu->queue_props[i].queueCount; + gpu->queue_reqs[i].queueCount = gpu->queue_props[i].queueCount; gpu->queue_reqs[i].pQueuePriorities = queue_priorities; } diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 86fbfbc0..d03169c0 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -139,7 +139,7 @@ static VkResult dev_create_queues(struct nulldrv_dev *dev, const VkDeviceQueueCreateInfo *q = &queues[i]; VkResult ret = VK_SUCCESS; - if (q->queuePriorityCount == 1 && !dev->queues[q->queueFamilyIndex]) { + if (q->queueCount == 1 && !dev->queues[q->queueFamilyIndex]) { ret = nulldrv_queue_create(dev, q->queueFamilyIndex, &dev->queues[q->queueFamilyIndex]); } @@ -216,8 +216,8 @@ static VkResult nulldrv_dev_create(struct nulldrv_gpu *gpu, return ret; } - ret = dev_create_queues(dev, info->pRequestedQueues, - info->requestedQueueCount); + ret = dev_create_queues(dev, info->pQueueCreateInfos, + info->queueCreateInfoCount); if (ret != VK_SUCCESS) { return ret; } diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 4eb7e96a..792d02ae 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1340,7 +1340,7 @@ typedef struct VkDeviceQueueCreateInfo { const void* pNext; VkDeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; - uint32_t queuePriorityCount; + uint32_t queueCount; const float* pQueuePriorities; } VkDeviceQueueCreateInfo; @@ -1348,8 +1348,8 @@ typedef struct VkDeviceCreateInfo { VkStructureType sType; const void* pNext; VkDeviceCreateFlags flags; - uint32_t requestedQueueCount; - const VkDeviceQueueCreateInfo* pRequestedQueues; + uint32_t queueCreateInfoCount; + const VkDeviceQueueCreateInfo* pQueueCreateInfos; uint32_t enabledLayerNameCount; const char*const* ppEnabledLayerNames; uint32_t enabledExtensionNameCount; @@ -1841,7 +1841,7 @@ typedef struct VkSamplerCreateInfo { typedef struct VkDescriptorSetLayoutBinding { uint32_t binding; VkDescriptorType descriptorType; - uint32_t arraySize; + uint32_t descriptorCount; VkShaderStageFlags stageFlags; const VkSampler* pImmutableSamplers; } VkDescriptorSetLayoutBinding; diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index c54bf233..a08fb26a 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -403,14 +403,14 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice g "Invalid call to vkCreateDevice() w/o first calling vkGetPhysicalDeviceQueueFamilyProperties()."); } else { // Check that the requested queue properties are valid - for (uint32_t i=0; i<pCreateInfo->requestedQueueCount; i++) { - uint32_t requestedIndex = pCreateInfo->pRequestedQueues[i].queueFamilyIndex; + for (uint32_t i=0; i<pCreateInfo->queueCreateInfoCount; i++) { + uint32_t requestedIndex = pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex; if (phy_dev_data->queueFamilyProperties.size() <= requestedIndex) { // requested index is out of bounds for this physical device skipCall |= log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_PHYSICAL_DEVICE, 0, 0, DEVLIMITS_INVALID_QUEUE_CREATE_REQUEST, "DL", "Invalid queue create request in vkCreateDevice(). Invalid queueFamilyIndex %u requested.", requestedIndex); - } else if (pCreateInfo->pRequestedQueues[i].queuePriorityCount > phy_dev_data->queueFamilyProperties[requestedIndex]->queueCount) { + } else if (pCreateInfo->pQueueCreateInfos[i].queueCount > phy_dev_data->queueFamilyProperties[requestedIndex]->queueCount) { skipCall |= log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_PHYSICAL_DEVICE, 0, 0, DEVLIMITS_INVALID_QUEUE_CREATE_REQUEST, "DL", - "Invalid queue create request in vkCreateDevice(). QueueFamilyIndex %u only has %u queues, but requested queuePriorityCount is %u.", requestedIndex, phy_dev_data->queueFamilyProperties[requestedIndex]->queueCount, pCreateInfo->pRequestedQueues[i].queuePriorityCount); + "Invalid queue create request in vkCreateDevice(). QueueFamilyIndex %u only has %u queues, but requested queueCount is %u.", requestedIndex, phy_dev_data->queueFamilyProperties[requestedIndex]->queueCount, pCreateInfo->pQueueCreateInfos[i].queueCount); } } } diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index f8245663..fa1cbfaa 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -710,7 +710,7 @@ static uint32_t getBindingStartIndex(const LAYOUT_NODE* pLayout, const uint32_t for (uint32_t i = 0; i < pLayout->createInfo.bindingCount; i++) { if (pLayout->createInfo.pBinding[i].binding == binding) break; - offsetIndex += pLayout->createInfo.pBinding[i].arraySize; + offsetIndex += pLayout->createInfo.pBinding[i].descriptorCount; } return offsetIndex; } @@ -719,7 +719,7 @@ static uint32_t getBindingEndIndex(const LAYOUT_NODE* pLayout, const uint32_t bi { uint32_t offsetIndex = 0; for (uint32_t i = 0; i < pLayout->createInfo.bindingCount; i++) { - offsetIndex += pLayout->createInfo.pBinding[i].arraySize; + offsetIndex += pLayout->createInfo.pBinding[i].descriptorCount; if (pLayout->createInfo.pBinding[i].binding == binding) break; } @@ -1145,7 +1145,7 @@ static VkBool32 validate_descriptor_availability_in_pool(layer_data* dev_data, P uint32_t typeIndex = 0, poolSizeCount = 0; for (j=0; j<pLayout->createInfo.bindingCount; ++j) { typeIndex = static_cast<uint32_t>(pLayout->createInfo.pBinding[j].descriptorType); - poolSizeCount = pLayout->createInfo.pBinding[j].arraySize; + poolSizeCount = pLayout->createInfo.pBinding[j].descriptorCount; if (poolSizeCount > pPoolNode->availableDescriptorTypeCount[typeIndex]) { skipCall |= log_msg(dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, (uint64_t) pLayout->layout, 0, DRAWSTATE_DESCRIPTOR_POOL_EMPTY, "DS", "Unable to allocate %u descriptors of type %s from pool %#" PRIxLEAST64 ". This pool only has %u descriptors of this type remaining.", @@ -2139,11 +2139,11 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDev return VK_ERROR_VALIDATION_FAILED; } - totalCount += pCreateInfo->pBinding[i].arraySize; + totalCount += pCreateInfo->pBinding[i].descriptorCount; if (pCreateInfo->pBinding[i].pImmutableSamplers) { VkSampler** ppIS = (VkSampler**)&pNewNode->createInfo.pBinding[i].pImmutableSamplers; - *ppIS = new VkSampler[pCreateInfo->pBinding[i].arraySize]; - memcpy(*ppIS, pCreateInfo->pBinding[i].pImmutableSamplers, pCreateInfo->pBinding[i].arraySize*sizeof(VkSampler)); + *ppIS = new VkSampler[pCreateInfo->pBinding[i].descriptorCount]; + memcpy(*ppIS, pCreateInfo->pBinding[i].pImmutableSamplers, pCreateInfo->pBinding[i].descriptorCount*sizeof(VkSampler)); } } if (totalCount > 0) { @@ -2154,7 +2154,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDev VkDescriptorType dType; for (uint32_t i=0; i<pCreateInfo->bindingCount; i++) { dType = pCreateInfo->pBinding[i].descriptorType; - for (j = 0; j < pCreateInfo->pBinding[i].arraySize; j++) { + for (j = 0; j < pCreateInfo->pBinding[i].descriptorCount; j++) { pNewNode->descriptorTypes[offset + j] = dType; pNewNode->stageFlags[offset + j] = pCreateInfo->pBinding[i].stageFlags; if ((dType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || @@ -2314,7 +2314,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(VkDevice dev uint32_t typeIndex = 0, poolSizeCount = 0; for (uint32_t j=0; j<pLayout->createInfo.bindingCount; ++j) { typeIndex = static_cast<uint32_t>(pLayout->createInfo.pBinding[j].descriptorType); - poolSizeCount = pLayout->createInfo.pBinding[j].arraySize; + poolSizeCount = pLayout->createInfo.pBinding[j].descriptorCount; pPoolNode->availableDescriptorTypeCount[typeIndex] += poolSizeCount; } } diff --git a/loader/loader.c b/loader/loader.c index e8a1210c..459f0e10 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -2966,7 +2966,7 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDevice( char **filtered_extension_names = NULL; VkResult res; - assert(pCreateInfo->requestedQueueCount >= 1); + assert(pCreateInfo->queueCreateInfoCount >= 1); if (!icd) return VK_ERROR_INITIALIZATION_FAILED; |
