vk/0.170.2: Update to the new queue family properties query
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 04:17:12 +0000 (21:17 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 04:17:12 +0000 (21:17 -0700)
include/vulkan/vulkan.h
src/vulkan/anv_device.c

index 9cee1c545b6493677d3ad1c32ce0a523fbe72d4f..69decf94ce6bf408de617ee7dae030c14e9c19a7 100644 (file)
@@ -1294,7 +1294,7 @@ typedef struct {
     VkQueueFlags                                queueFlags;
     uint32_t                                    queueCount;
     VkBool32                                    supportsTimestamps;
-} VkPhysicalDeviceQueueProperties;
+} VkQueueFamilyProperties;
 
 typedef struct {
     VkMemoryPropertyFlags                       propertyFlags;
@@ -2074,8 +2074,7 @@ typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevi
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties);
+typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
 typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName);
 typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName);
@@ -2257,14 +2256,10 @@ VkResult VKAPI vkGetPhysicalDeviceProperties(
     VkPhysicalDevice                            physicalDevice,
     VkPhysicalDeviceProperties*                 pProperties);
 
-VkResult VKAPI vkGetPhysicalDeviceQueueCount(
+VkResult VKAPI vkGetPhysicalDeviceQueueFamilyProperties(
     VkPhysicalDevice                            physicalDevice,
-    uint32_t*                                   pCount);
-
-VkResult VKAPI vkGetPhysicalDeviceQueueProperties(
-    VkPhysicalDevice                            physicalDevice,
-    uint32_t                                    count,
-    VkPhysicalDeviceQueueProperties*            pQueueProperties);
+    uint32_t*                                   pCount,
+    VkQueueFamilyProperties*                    pQueueFamilyProperties);
 
 VkResult VKAPI vkGetPhysicalDeviceMemoryProperties(
     VkPhysicalDevice                            physicalDevice,
index dd8e3ffa0af9b5eacfade577f82facc448f6d24d..31b7565b984bd72c576f71eabff7e9304e531549 100644 (file)
@@ -451,23 +451,18 @@ VkResult anv_GetPhysicalDeviceProperties(
    return VK_SUCCESS;
 }
 
-VkResult anv_GetPhysicalDeviceQueueCount(
+VkResult anv_GetPhysicalDeviceQueueFamilyProperties(
     VkPhysicalDevice                            physicalDevice,
-    uint32_t*                                   pCount)
+    uint32_t*                                   pCount,
+    VkQueueFamilyProperties*                    pQueueFamilyProperties)
 {
-   *pCount = 1;
-
-   return VK_SUCCESS;
-}
+   if (pQueueFamilyProperties == NULL) {
+      *pCount = 1;
+   }
 
-VkResult anv_GetPhysicalDeviceQueueProperties(
-    VkPhysicalDevice                            physicalDevice,
-    uint32_t                                    count,
-    VkPhysicalDeviceQueueProperties*            pQueueProperties)
-{
-   assert(count == 1);
+   assert(*pCount >= 1);
 
-   *pQueueProperties = (VkPhysicalDeviceQueueProperties) {
+   *pQueueFamilyProperties = (VkQueueFamilyProperties) {
       .queueFlags = VK_QUEUE_GRAPHICS_BIT |
                     VK_QUEUE_COMPUTE_BIT |
                     VK_QUEUE_DMA_BIT,