bug 14921 part 1: sed renames
Workaround header bug (ALLOC_INFO vs AllocateInfo) in vk_helper.py. This
affects the debug extensions as well.
s/NONDISP/NON_DISPATCHABLE/g
s/CmdBuffer/CommandBuffer/g
s/cmdBuffer/commandBuffer/g
s/CMD_BUFFER/COMMAND_BUFFER/g
s/AllocMemory/AllocateMemory/g
s/AllocDescriptorSets/AllocateDescriptorSets/g
s/AllocCommandBuffers/AllocateCommandBuffers/g
s/VkAllocCallbacks/VkAllocationCallbacks/g
s/VkSystemAllocScope/VkSystemAllocationScope/g
s/allocScope/allocationScope/g
s/allocType/allocationType/g
s/pfnAlloc\b/pfnAllocation/g
s/pfnRealloc\b/pfnReallocation/g
s/VK_SYSTEM_ALLOC_/VK_SYSTEM_ALLOCATION_/g
s/extName/extensionName/g
s/implVersion/implementationVersion/g
s/pAppInfo/pApplicationInfo/g
s/pMem\b/pMemory/g
s/VkMemoryAllocInfo/VkMemoryAllocateInfo/g
s/VkDescriptorSetAllocInfo/VkDescriptorSetAllocateInfo/g
s/CmdPool/CommandPool/g
s/cmdPool/commandPool/g
s/CMD_POOL/COMMAND_POOL/g
s/VkCommandBufferAllocInfo/VkCommandBufferAllocateInfo/g
s/maxTessellationGenLevel/maxTessellationGenerationLevel/g
s/maxFragmentDualSourceAttachments/maxFragmentDualSrcAttachments/g
s/destSubpass/dstSubpass/g
s/destStageMask/dstStageMask/g
s/dualSourceBlend/dualSrcBlend/g
s/destBlendColor/dstBlendColor/g
s/destBlendAlpha/dstBlendAlpha/g
s/VK_FORMAT_NUM/VK_FORMAT_RANGE_SIZE/g
s/VK_DYNAMIC_STATE_NUM/VK_DYNAMIC_STATE_RANGE_SIZE/g
s/pAppName/pApplicationName/g
s/appVersion/applicationVersion/g
s/numLevels/levelCount/g
s/numLayers/layerCount/g
s/destOffset/dstOffset/g
s/destSubresource/dstSubresource/g
s/VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL/g
s/VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL/g
s/VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT/VK_IMAGE_USAGE_TRANSFER_SRC_BIT/g
s/VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT/VK_IMAGE_USAGE_TRANSFER_DST_BIT/g
s/destBuffer/dstBuffer/g
s/destQueueFamilyIndex/dstQueueFamilyIndex/g
s/destSet/dstSet/g
s/destBinding/dstBinding/g
s/destArrayElement/dstArrayElement/g
s/VK_BLEND_DEST_COLOR/VK_BLEND_DST_COLOR/g
s/VK_BLEND_ONE_MINUS_DEST_COLOR/VK_BLEND_ONE_MINUS_DST_COLOR/g
s/VK_BLEND_DEST_ALPHA/VK_BLEND_DST_ALPHA/g
s/VK_BLEND_ONE_MINUS_DEST_ALPHA/VK_BLEND_ONE_MINUS_DST_ALPHA/g
s/VK_FORMAT_FEATURE_BLIT_SOURCE_BIT/VK_FORMAT_FEATURE_BLIT_SRC_BIT/g
s/VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT/VK_FORMAT_FEATURE_BLIT_DST_BIT/g
s/VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT/VK_BUFFER_USAGE_TRANSFER_SRC_BIT/g
s/VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT/VK_BUFFER_USAGE_TRANSFER_DST_BIT/g
s/VK_COMPARE_OP_LESS_EQUAL/VK_COMPARE_OP_LESS_OR_EQUAL/g
s/VK_COMPARE_OP_GREATER_EQUAL/VK_COMPARE_OP_GREATER_OR_EQUAL/g
s/VkPipelineRasterStateCreateInfo/VkPipelineRasterizationStateCreateInfo/g
s/rasterSamples/rasterizationSamples/g
s/pRasterState/pRasterizationState/g
s/VK_FRONT_FACE_CCW/VK_FRONT_FACE_COUNTER_CLOCKWISE/g
s/VK_FRONT_FACE_CW/VK_FRONT_FACE_CLOCKWISE/g
s/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY/g
s/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY/g
s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY/g
s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY/g
s/VK_STENCIL_OP_INC_CLAMP/VK_STENCIL_OP_INCREMENT_AND_CLAMP/g
s/VK_STENCIL_OP_DEC_CLAMP/VK_STENCIL_OP_DECREMENT_AND_CLAMP/g
s/VK_STENCIL_OP_INC_WRAP/VK_STENCIL_OP_INCREMENT_AND_WRAP/g
s/VK_STENCIL_OP_DEC_WRAP/VK_STENCIL_OP_DECREMENT_AND_WRAP/g
s/VK_LOGIC_OP_NOOP/VK_LOGIC_OP_NO_OP/g
s/VK_LOGIC_OP_EQUIV\b/VK_LOGIC_OP_EQUIVALENT/g
s/memBarrierCount/memoryBarrierCount/g
s/ppMemBarriers/ppMemoryBarriers/g
s/destImage/dstImage/g
s/destImageLayout/dstImageLayout/g
s/destCache/dstCache/g
s/memOffset/memoryOffset/g
s/vk_print_vkmemoryallocinfo/vk_print_vkmemoryallocateinfo/g
s/pAllocInfo/pAllocateInfo/g
s/memRangeCount/memoryRangeCount/g
s/pMemRanges/pMemoryRanges/g
s/VK_IMAGE_TYPE_NUM/VK_IMAGE_TYPE_RANGE_SIZE/g
s/VK_PIPELINE_BIND_POINT_NUM/VK_PIPELINE_BIND_POINT_RANGE_SIZE/g
s/vk_size_vkdescriptorsetallocinfo/vk_size_vkdescriptorsetallocateinfo/g
s/remap_cmdbuffers/remap_commandbuffers/g
s/remap_cmdpool/remap_commandpool/g
s/add_to_cmdbuffers_map/add_to_commandbuffers_map/g
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14921
a
diff --git a/tests/vktestbinding.cpp b/tests/vktestbinding.cpp
index 90944de..610374a 100644
--- a/tests/vktestbinding.cpp
+++ b/tests/vktestbinding.cpp
@@ -70,9 +70,9 @@
return handles;
}
-VkMemoryAllocInfo get_resource_alloc_info(const vk_testing::Device &dev, const VkMemoryRequirements &reqs, VkMemoryPropertyFlags mem_props)
+VkMemoryAllocateInfo get_resource_alloc_info(const vk_testing::Device &dev, const VkMemoryRequirements &reqs, VkMemoryPropertyFlags mem_props)
{
- VkMemoryAllocInfo info = vk_testing::DeviceMemory::alloc_info(reqs.size, 0);
+ VkMemoryAllocateInfo info = vk_testing::DeviceMemory::alloc_info(reqs.size, 0);
dev.phy().set_memory_type(reqs.memoryTypeBits, &info, mem_props);
return info;
@@ -207,7 +207,7 @@
return exts;
}
-bool PhysicalDevice::set_memory_type(const uint32_t type_bits, VkMemoryAllocInfo *info, const VkFlags properties, const VkFlags forbid) const
+bool PhysicalDevice::set_memory_type(const uint32_t type_bits, VkMemoryAllocateInfo *info, const VkFlags properties, const VkFlags forbid) const
{
uint32_t type_mask = type_bits;
// Search memtypes to find first index with those properties
@@ -392,9 +392,9 @@
vkUpdateDescriptorSets(handle(), writes.size(), writes.data(), copies.size(), copies.data());
}
-void Queue::submit(const std::vector<const CmdBuffer *> &cmds, Fence &fence)
+void Queue::submit(const std::vector<const CommandBuffer *> &cmds, Fence &fence)
{
- const std::vector<VkCmdBuffer> cmd_handles = make_handles<VkCmdBuffer>(cmds);
+ const std::vector<VkCommandBuffer> cmd_handles = make_handles<VkCommandBuffer>(cmds);
VkSubmitInfo submit_info;
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit_info.pNext = NULL;
@@ -408,12 +408,12 @@
EXPECT(vkQueueSubmit(handle(), 1, &submit_info, fence.handle()) == VK_SUCCESS);
}
-void Queue::submit(const CmdBuffer &cmd, Fence &fence)
+void Queue::submit(const CommandBuffer &cmd, Fence &fence)
{
- submit(std::vector<const CmdBuffer*>(1, &cmd), fence);
+ submit(std::vector<const CommandBuffer*>(1, &cmd), fence);
}
-void Queue::submit(const CmdBuffer &cmd)
+void Queue::submit(const CommandBuffer &cmd)
{
Fence fence;
submit(cmd, fence);
@@ -430,9 +430,9 @@
vkFreeMemory(device(), handle(), NULL);
}
-void DeviceMemory::init(const Device &dev, const VkMemoryAllocInfo &info)
+void DeviceMemory::init(const Device &dev, const VkMemoryAllocateInfo &info)
{
- NON_DISPATCHABLE_HANDLE_INIT(vkAllocMemory, dev, &info);
+ NON_DISPATCHABLE_HANDLE_INIT(vkAllocateMemory, dev, &info);
}
const void *DeviceMemory::map(VkFlags flags) const
@@ -749,12 +749,12 @@
std::vector<VkDescriptorSet> set_handles;
set_handles.resize(layout_handles.size());
- VkDescriptorSetAllocInfo alloc_info = {};
+ VkDescriptorSetAllocateInfo alloc_info = {};
alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOC_INFO;
alloc_info.setLayoutCount = layout_handles.size();
alloc_info.descriptorPool = handle();
alloc_info.pSetLayouts = layout_handles.data();
- VkResult err = vkAllocDescriptorSets(device(), &alloc_info, set_handles.data());
+ VkResult err = vkAllocateDescriptorSets(device(), &alloc_info, set_handles.data());
EXPECT(err == VK_SUCCESS);
std::vector<DescriptorSet *> sets;
@@ -788,46 +788,46 @@
}
}
-NON_DISPATCHABLE_HANDLE_DTOR(CmdPool, vkDestroyCommandPool)
+NON_DISPATCHABLE_HANDLE_DTOR(CommandPool, vkDestroyCommandPool)
-void CmdPool::init(const Device &dev, const VkCmdPoolCreateInfo &info)
+void CommandPool::init(const Device &dev, const VkCommandPoolCreateInfo &info)
{
NON_DISPATCHABLE_HANDLE_INIT(vkCreateCommandPool, dev, &info);
}
-CmdBuffer::~CmdBuffer()
+CommandBuffer::~CommandBuffer()
{
if (initialized()) {
- VkCmdBuffer cmds[] = { handle() };
+ VkCommandBuffer cmds[] = { handle() };
vkFreeCommandBuffers(dev_handle_, cmd_pool_, 1, cmds);
}
}
-void CmdBuffer::init(const Device &dev, const VkCmdBufferAllocInfo &info)
+void CommandBuffer::init(const Device &dev, const VkCommandBufferAllocateInfo &info)
{
- VkCmdBuffer cmd;
+ VkCommandBuffer cmd;
- // Make sure cmdPool is set
- assert(info.cmdPool);
+ // Make sure commandPool is set
+ assert(info.commandPool);
- if (EXPECT(vkAllocCommandBuffers(dev.handle(), &info, &cmd) == VK_SUCCESS)) {
+ if (EXPECT(vkAllocateCommandBuffers(dev.handle(), &info, &cmd) == VK_SUCCESS)) {
Handle::init(cmd);
dev_handle_ = dev.handle();
- cmd_pool_ = info.cmdPool;
+ cmd_pool_ = info.commandPool;
}
}
-void CmdBuffer::begin(const VkCmdBufferBeginInfo *info)
+void CommandBuffer::begin(const VkCommandBufferBeginInfo *info)
{
EXPECT(vkBeginCommandBuffer(handle(), info) == VK_SUCCESS);
}
-void CmdBuffer::begin()
+void CommandBuffer::begin()
{
- VkCmdBufferBeginInfo info = {};
- info.flags = VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
- info.sType = VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO;
+ VkCommandBufferBeginInfo info = {};
+ info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
info.renderPass = VK_NULL_HANDLE;
info.subpass = 0;
info.framebuffer = VK_NULL_HANDLE;
@@ -835,12 +835,12 @@
begin(&info);
}
-void CmdBuffer::end()
+void CommandBuffer::end()
{
EXPECT(vkEndCommandBuffer(handle()) == VK_SUCCESS);
}
-void CmdBuffer::reset(VkCmdBufferResetFlags flags)
+void CommandBuffer::reset(VkCommandBufferResetFlags flags)
{
EXPECT(vkResetCommandBuffer(handle(), flags) == VK_SUCCESS);
}