From 591a922085b1f503c6b72fd1262e79296ef185ab Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 26 Oct 2015 17:20:32 +0800 Subject: [PATCH] bug 14892 part 2: rename more "count" (WIP) https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14892 --- icd/nulldrv/nulldrv.c | 6 +++--- include/vulkan.h | 12 ++++++------ layers/draw_state.cpp | 18 +++++++++--------- layers/mem_tracker.cpp | 8 ++++---- layers/param_checker.cpp | 18 +++++++++--------- loader/trampoline.c | 8 ++++---- vulkan.py | 6 +++--- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 4a7df70..445a207 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -1827,7 +1827,7 @@ ICD_EXPORT VkResult VKAPI vkQueueWaitIdle( ICD_EXPORT VkResult VKAPI vkQueueSubmit( VkQueue queue_, uint32_t submitCount, - const VkSubmitInfo* pSubmitInfo, + const VkSubmitInfo* pSubmits, VkFence fence_) { NULLDRV_LOG_FUNC; @@ -2064,9 +2064,9 @@ ICD_EXPORT VkResult VKAPI vkFreeDescriptorSets( ICD_EXPORT void VKAPI vkUpdateDescriptorSets( VkDevice device, - uint32_t writeCount, + uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t copyCount, + uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { NULLDRV_LOG_FUNC; diff --git a/include/vulkan.h b/include/vulkan.h index 03db3cc..89d7edc 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -1606,7 +1606,7 @@ typedef struct { typedef struct { uint32_t mapEntryCount; - const VkSpecializationMapEntry* pMap; + const VkSpecializationMapEntry* pMapEntries; size_t dataSize; const void* pData; } VkSpecializationInfo; @@ -2167,7 +2167,7 @@ typedef VkResult (VKAPI *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDev typedef VkResult (VKAPI *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties); typedef VkResult (VKAPI *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); typedef void (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); -typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmitInfo, VkFence fence); +typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue); typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device); typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, const VkAllocCallbacks* pAllocator, VkDeviceMemory* pMem); @@ -2230,7 +2230,7 @@ typedef void (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorP typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, const VkDescriptorSetAllocInfo* pAllocInfo, VkDescriptorSet* pDescriptorSets); typedef VkResult (VKAPI *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets); -typedef void (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); +typedef void (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocCallbacks* pAllocator, VkFramebuffer* pFramebuffer); typedef void (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocCallbacks* pAllocator); typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocCallbacks* pAllocator, VkRenderPass* pRenderPass); @@ -2382,7 +2382,7 @@ void VKAPI vkGetDeviceQueue( VkResult VKAPI vkQueueSubmit( VkQueue queue, uint32_t submitCount, - const VkSubmitInfo* pSubmitInfo, + const VkSubmitInfo* pSubmits, VkFence fence); VkResult VKAPI vkQueueWaitIdle( @@ -2733,9 +2733,9 @@ VkResult VKAPI vkFreeDescriptorSets( void VKAPI vkUpdateDescriptorSets( VkDevice device, - uint32_t writeCount, + uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t copyCount, + uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); VkResult VKAPI vkCreateFramebuffer( diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index b80b9b4..f1f08e2 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -1008,7 +1008,7 @@ static VkBool32 validateUpdateContents(const layer_data* my_data, const VkWriteD return skipCall; } // update DS mappings based on write and copy update arrays -static VkBool32 dsUpdate(layer_data* my_data, VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pWDS, uint32_t copyCount, const VkCopyDescriptorSet* pCDS) +static VkBool32 dsUpdate(layer_data* my_data, VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pWDS, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pCDS) { VkBool32 skipCall = VK_FALSE; @@ -1017,7 +1017,7 @@ static VkBool32 dsUpdate(layer_data* my_data, VkDevice device, uint32_t writeCou VkDescriptorSetLayoutCreateInfo* pLayoutCI = NULL; // Validate Write updates uint32_t i = 0; - for (i=0; i < writeCount; i++) { + for (i=0; i < descriptorWriteCount; i++) { VkDescriptorSet ds = pWDS[i].destSet; SET_NODE* pSet = my_data->setMap[ds]; GENERIC_HEADER* pUpdate = (GENERIC_HEADER*) &pWDS[i]; @@ -1070,7 +1070,7 @@ static VkBool32 dsUpdate(layer_data* my_data, VkDevice device, uint32_t writeCou } } // Now validate copy updates - for (i=0; i < copyCount; ++i) { + for (i=0; i < descriptorCopyCount; ++i) { SET_NODE *pSrcSet = NULL, *pDstSet = NULL; LAYOUT_NODE *pSrcLayout = NULL, *pDstLayout = NULL; uint32_t srcStartIndex = 0, srcEndIndex = 0, dstStartIndex = 0, dstEndIndex = 0; @@ -1725,13 +1725,13 @@ VK_LAYER_EXPORT VkResult VKAPI vkEnumerateDeviceLayerProperties( pCount, pProperties); } -VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmitInfo, VkFence fence) +VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { VkBool32 skipCall = VK_FALSE; GLOBAL_CB_NODE* pCB = NULL; layer_data* dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); for (uint32_t submit_idx = 0; submit_idx < submitCount; submit_idx++) { - const VkSubmitInfo *submit = &pSubmitInfo[submit_idx]; + const VkSubmitInfo *submit = &pSubmits[submit_idx]; for (uint32_t i=0; i < submit->commandBufferCount; i++) { // Validate that cmd buffers have been updated pCB = getCBNode(dev_data, submit->pCommandBuffers[i]); @@ -1753,7 +1753,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t submitCount } } if (VK_FALSE == skipCall) - return dev_data->device_dispatch_table->QueueSubmit(queue, submitCount, pSubmitInfo, fence); + return dev_data->device_dispatch_table->QueueSubmit(queue, submitCount, pSubmits, fence); return VK_ERROR_VALIDATION_FAILED; } @@ -2228,12 +2228,12 @@ VK_LAYER_EXPORT VkResult VKAPI vkFreeDescriptorSets(VkDevice device, VkDescripto return result; } -VK_LAYER_EXPORT void VKAPI vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) +VK_LAYER_EXPORT void VKAPI vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { // dsUpdate will return VK_TRUE only if a bailout error occurs, so we want to call down tree when update returns VK_FALSE layer_data* dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - if (!dsUpdate(dev_data, device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies)) { - dev_data->device_dispatch_table->UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); + if (!dsUpdate(dev_data, device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies)) { + dev_data->device_dispatch_table->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); } } diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index 7860486..914495e 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -1124,7 +1124,7 @@ VK_LAYER_EXPORT void VKAPI vkGetDeviceQueue( VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit( VkQueue queue, uint32_t submitCount, - const VkSubmitInfo *pSubmitInfo, + const VkSubmitInfo *pSubmits, VkFence fence) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); @@ -1139,7 +1139,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit( print_mem_list(my_data, queue); printCBList(my_data, queue); for (uint32_t submit_idx = 0; submit_idx < submitCount; submit_idx++) { - const VkSubmitInfo *submit = &pSubmitInfo[submit_idx]; + const VkSubmitInfo *submit = &pSubmits[submit_idx]; for (uint32_t i = 0; i < submit->commandBufferCount; i++) { pCBInfo = get_cmd_buf_info(my_data, submit->pCommandBuffers[i]); pCBInfo->fenceId = fenceId; @@ -1176,12 +1176,12 @@ VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit( loader_platform_thread_unlock_mutex(&globalLock); if (VK_FALSE == skipCall) { result = my_data->device_dispatch_table->QueueSubmit( - queue, submitCount, pSubmitInfo, fence); + queue, submitCount, pSubmits, fence); } loader_platform_thread_lock_mutex(&globalLock); for (uint32_t submit_idx = 0; submit_idx < submitCount; submit_idx++) { - const VkSubmitInfo *submit = &pSubmitInfo[submit_idx]; + const VkSubmitInfo *submit = &pSubmits[submit_idx]; for (uint32_t i = 0; i < submit->waitSemaphoreCount; i++) { VkSemaphore sem = submit->pWaitSemaphores[i]; diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index fa8b5e3..84093a7 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -2113,7 +2113,7 @@ bool PreQueueSubmit( { if(submit->sType != VK_STRUCTURE_TYPE_SUBMIT_INFO) { log_msg(mdd(queue), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK", - "vkQueueSubmit parameter, VkStructureType pSubmitInfo->sType, is an invalid enumerator"); + "vkQueueSubmit parameter, VkStructureType pSubmits->sType, is an invalid enumerator"); return false; } @@ -2146,14 +2146,14 @@ bool PostQueueSubmit( VK_LAYER_EXPORT VkResult VKAPI vkQueueSubmit( VkQueue queue, uint32_t submitCount, - const VkSubmitInfo* pSubmitInfo, + const VkSubmitInfo* pSubmits, VkFence fence) { for (uint32_t i = 0; i < submitCount; i++) { - PreQueueSubmit(queue, &pSubmitInfo[i]); + PreQueueSubmit(queue, &pSubmits[i]); } - VkResult result = get_dispatch_table(pc_device_table_map, queue)->QueueSubmit(queue, submitCount, pSubmitInfo, fence); + VkResult result = get_dispatch_table(pc_device_table_map, queue)->QueueSubmit(queue, submitCount, pSubmits, fence); PostQueueSubmit(queue, submitCount, fence, result); @@ -3769,7 +3769,7 @@ bool PreCreateGraphicsPipelines( } if(pCreateInfos->pStages->pSpecializationInfo != nullptr) { - if(pCreateInfos->pStages->pSpecializationInfo->pMap != nullptr) + if(pCreateInfos->pStages->pSpecializationInfo->pMapEntries != nullptr) { } if(pCreateInfos->pStages->pSpecializationInfo->pData != nullptr) @@ -4084,7 +4084,7 @@ bool PreCreateComputePipelines( } if(pCreateInfos->stage.pSpecializationInfo != nullptr) { - if(pCreateInfos->stage.pSpecializationInfo->pMap != nullptr) + if(pCreateInfos->stage.pSpecializationInfo->pMapEntries != nullptr) { } if(pCreateInfos->stage.pSpecializationInfo->pData != nullptr) @@ -4604,14 +4604,14 @@ bool PreUpdateDescriptorSets( VK_LAYER_EXPORT void VKAPI vkUpdateDescriptorSets( VkDevice device, - uint32_t writeCount, + uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t copyCount, + uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { PreUpdateDescriptorSets(device, pDescriptorWrites, pDescriptorCopies); - get_dispatch_table(pc_device_table_map, device)->UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); + get_dispatch_table(pc_device_table_map, device)->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); } bool PreCreateFramebuffer( diff --git a/loader/trampoline.c b/loader/trampoline.c index cd9ed9d..cb2cafa 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -339,13 +339,13 @@ LOADER_EXPORT void VKAPI vkGetDeviceQueue(VkDevice device, uint32_t queueNodeInd loader_set_dispatch(*pQueue, disp); } -LOADER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmitInfo, VkFence fence) +LOADER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { const VkLayerDispatchTable *disp; disp = loader_get_dispatch(queue); - return disp->QueueSubmit(queue, submitCount, pSubmitInfo, fence); + return disp->QueueSubmit(queue, submitCount, pSubmits, fence); } LOADER_EXPORT VkResult VKAPI vkQueueWaitIdle(VkQueue queue) @@ -908,13 +908,13 @@ LOADER_EXPORT VkResult VKAPI vkFreeDescriptorSets(VkDevice device, VkDescriptorP return disp->FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); } -LOADER_EXPORT void VKAPI vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) +LOADER_EXPORT void VKAPI vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { const VkLayerDispatchTable *disp; disp = loader_get_dispatch(device); - disp->UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); + disp->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); } LOADER_EXPORT VkResult VKAPI vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocCallbacks* pAllocator, VkFramebuffer* pFramebuffer) diff --git a/vulkan.py b/vulkan.py index 1790160..7ae15c3 100755 --- a/vulkan.py +++ b/vulkan.py @@ -303,7 +303,7 @@ core = Extension( Proto("VkResult", "QueueSubmit", [Param("VkQueue", "queue"), Param("uint32_t", "submitCount"), - Param("const VkSubmitInfo*", "pSubmitInfo"), + Param("const VkSubmitInfo*", "pSubmits"), Param("VkFence", "fence")]), Proto("VkResult", "QueueWaitIdle", @@ -654,9 +654,9 @@ core = Extension( Proto("void", "UpdateDescriptorSets", [Param("VkDevice", "device"), - Param("uint32_t", "writeCount"), + Param("uint32_t", "descriptorWriteCount"), Param("const VkWriteDescriptorSet*", "pDescriptorWrites"), - Param("uint32_t", "copyCount"), + Param("uint32_t", "descriptorCopyCount"), Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]), Proto("VkResult", "CreateFramebuffer", -- 2.7.4