aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2015-11-06 06:42:02 +0800
committerJon Ashburn <jon@lunarg.com>2015-11-06 15:34:07 -0700
commit8b4974426523e356ef4fae9088ca157092e80d06 (patch)
tree9e8672286ea9e65343caa58ba2741ebd92374c19 /layers/draw_state.cpp
parent242c24fae2b831e63a076151880119f52aed408d (diff)
downloadusermoji-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
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp16
1 files changed, 8 insertions, 8 deletions
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;
}
}