Do not generate constructor utils if API creates multiple objects
authorPyry Haulos <phaulos@google.com>
Thu, 1 Dec 2016 23:23:12 +0000 (15:23 -0800)
committerPyry Haulos <phaulos@google.com>
Thu, 1 Dec 2016 23:23:12 +0000 (15:23 -0800)
See #541

Change-Id: I1aa9ddae3bb758a70f6a72d1eb31e58c524ca9f4

external/vulkancts/framework/vulkan/vkRefUtil.inl
external/vulkancts/framework/vulkan/vkRefUtilImpl.inl
external/vulkancts/scripts/gen_framework.py

index ba08754..77a72a7 100644 (file)
@@ -14,8 +14,6 @@ Move<VkImage>                                         createImage                                             (const DeviceInterface& vk, VkDevice device,
 Move<VkImageView>                                      createImageView                                 (const DeviceInterface& vk, VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
 Move<VkShaderModule>                           createShaderModule                              (const DeviceInterface& vk, VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
 Move<VkPipelineCache>                          createPipelineCache                             (const DeviceInterface& vk, VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
-Move<VkPipeline>                                       createGraphicsPipelines                 (const DeviceInterface& vk, VkDevice device, VkPipelineCache pipelineCache, deUint32 createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator = DE_NULL);
-Move<VkPipeline>                                       createComputePipelines                  (const DeviceInterface& vk, VkDevice device, VkPipelineCache pipelineCache, deUint32 createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator = DE_NULL);
 Move<VkPipelineLayout>                         createPipelineLayout                    (const DeviceInterface& vk, VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
 Move<VkSampler>                                                createSampler                                   (const DeviceInterface& vk, VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
 Move<VkDescriptorSetLayout>                    createDescriptorSetLayout               (const DeviceInterface& vk, VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator = DE_NULL);
index 5a51b31..35a2ac4 100644 (file)
@@ -229,20 +229,6 @@ Move<VkPipelineCache> createPipelineCache (const DeviceInterface& vk, VkDevice d
        return Move<VkPipelineCache>(check<VkPipelineCache>(object), Deleter<VkPipelineCache>(vk, device, pAllocator));
 }
 
-Move<VkPipeline> createGraphicsPipelines (const DeviceInterface& vk, VkDevice device, VkPipelineCache pipelineCache, deUint32 createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator)
-{
-       VkPipeline object = 0;
-       VK_CHECK(vk.createGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, &object));
-       return Move<VkPipeline>(check<VkPipeline>(object), Deleter<VkPipeline>(vk, device, pAllocator));
-}
-
-Move<VkPipeline> createComputePipelines (const DeviceInterface& vk, VkDevice device, VkPipelineCache pipelineCache, deUint32 createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator)
-{
-       VkPipeline object = 0;
-       VK_CHECK(vk.createComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, &object));
-       return Move<VkPipeline>(check<VkPipeline>(object), Deleter<VkPipeline>(vk, device, pAllocator));
-}
-
 Move<VkPipelineLayout> createPipelineLayout (const DeviceInterface& vk, VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator)
 {
        VkPipelineLayout object = 0;
index af60022..eb6aa23 100644 (file)
@@ -672,7 +672,7 @@ class ConstructorFunction:
 def getConstructorFunctions (api):
        funcs = []
        for function in api.functions:
-               if (function.name[:8] == "vkCreate" or function.name == "vkAllocateMemory") and not "count" in [a.name for a in function.arguments]:
+               if (function.name[:8] == "vkCreate" or function.name == "vkAllocateMemory") and not "createInfoCount" in [a.name for a in function.arguments]:
                        if function.name == "vkCreateDisplayModeKHR":
                                continue # No way to delete display modes (bug?)