Merge "Add utility for simplifying test group construction" into vulkan
authorPyry Haulos <phaulos@google.com>
Thu, 21 Jan 2016 21:08:32 +0000 (21:08 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 21 Jan 2016 21:08:32 +0000 (21:08 +0000)
external/vulkancts/framework/vulkan/vkQueryUtil.cpp
external/vulkancts/framework/vulkan/vkQueryUtil.hpp

index 6d1fbf4..60e16de 100644 (file)
@@ -108,12 +108,33 @@ VkPhysicalDeviceMemoryProperties getPhysicalDeviceMemoryProperties (const Instan
        return properties;
 }
 
+VkFormatProperties getPhysicalDeviceFormatProperties (const InstanceInterface& vk, VkPhysicalDevice physicalDevice, VkFormat format)
+{
+       VkFormatProperties      properties;
+
+       deMemset(&properties, 0, sizeof(properties));
+
+       vk.getPhysicalDeviceFormatProperties(physicalDevice, format, &properties);
+       return properties;
+}
+
+VkImageFormatProperties getPhysicalDeviceImageFormatProperties (const InstanceInterface& vk, VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags)
+{
+       VkImageFormatProperties properties;
+
+       deMemset(&properties, 0, sizeof(properties));
+
+       vk.getPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, &properties);
+       return properties;
+}
+
 VkMemoryRequirements getBufferMemoryRequirements (const DeviceInterface& vk, VkDevice device, VkBuffer buffer)
 {
        VkMemoryRequirements req;
        vk.getBufferMemoryRequirements(device, buffer, &req);
        return req;
 }
+
 VkMemoryRequirements getImageMemoryRequirements (const DeviceInterface& vk, VkDevice device, VkImage image)
 {
        VkMemoryRequirements req;
index d142f54..a203b8e 100644 (file)
@@ -47,6 +47,8 @@ std::vector<VkQueueFamilyProperties>  getPhysicalDeviceQueueFamilyProperties  (con
 VkPhysicalDeviceFeatures                               getPhysicalDeviceFeatures                               (const InstanceInterface& vk, VkPhysicalDevice physicalDevice);
 VkPhysicalDeviceProperties                             getPhysicalDeviceProperties                             (const InstanceInterface& vk, VkPhysicalDevice physicalDevice);
 VkPhysicalDeviceMemoryProperties               getPhysicalDeviceMemoryProperties               (const InstanceInterface& vk, VkPhysicalDevice physicalDevice);
+VkFormatProperties                                             getPhysicalDeviceFormatProperties               (const InstanceInterface& vk, VkPhysicalDevice physicalDevice, VkFormat format);
+VkImageFormatProperties                                        getPhysicalDeviceImageFormatProperties  (const InstanceInterface& vk, VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags);
 
 VkMemoryRequirements                                   getBufferMemoryRequirements                             (const DeviceInterface& vk, VkDevice device, VkBuffer buffer);
 VkMemoryRequirements                                   getImageMemoryRequirements                              (const DeviceInterface& vk, VkDevice device, VkImage image);