From: Jason Ekstrand Date: Thu, 9 Jul 2015 23:11:24 +0000 (-0700) Subject: vk: Add the new PhysicalDeviceQueue queries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f907011a344d7e05fa54933cb17942ecd990602;p=mesa.git vk: Add the new PhysicalDeviceQueue queries --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 1fec157a054..d21c56bd191 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2013,6 +2013,8 @@ typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceInfo)(VkPhysicalDevice physicalD typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatInfo)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatInfo); 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 PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice); @@ -2156,6 +2158,15 @@ VkResult VKAPI vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); +VkResult VKAPI vkGetPhysicalDeviceQueueCount( + VkPhysicalDevice physicalDevice, + uint32_t* pCount); + +VkResult VKAPI vkGetPhysicalDeviceQueueProperties( + VkPhysicalDevice physicalDevice, + uint32_t count, + VkPhysicalDeviceQueueProperties* pQueueProperties); + PFN_vkVoidFunction VKAPI vkGetInstanceProcAddr( VkInstance instance, const char* pName); diff --git a/src/vulkan/device.c b/src/vulkan/device.c index c5e35bcc049..3cb04a1d4c2 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -389,6 +389,33 @@ VkResult anv_GetPhysicalDeviceProperties( return VK_SUCCESS; } +VkResult anv_GetPhysicalDeviceQueueCount( + VkPhysicalDevice physicalDevice, + uint32_t* pCount) +{ + *pCount = 1; + + return VK_SUCCESS; +} + +VkResult anv_GetPhysicalDeviceQueueProperties( + VkPhysicalDevice physicalDevice, + uint32_t count, + VkPhysicalDeviceQueueProperties* pQueueProperties) +{ + assert(count == 1); + + *pQueueProperties = (VkPhysicalDeviceQueueProperties) { + .queueFlags = VK_QUEUE_GRAPHICS_BIT | + VK_QUEUE_COMPUTE_BIT | + VK_QUEUE_DMA_BIT, + .queueCount = 1, + .supportsTimestamps = true, + }; + + return VK_SUCCESS; +} + VkResult anv_GetPhysicalDeviceInfo( VkPhysicalDevice physicalDevice, VkPhysicalDeviceInfoType infoType,