vk/0.170.2: Update VkPhysicalDeviceProperties
authorChad Versace <chad.versace@intel.com>
Wed, 7 Oct 2015 17:36:46 +0000 (10:36 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 7 Oct 2015 17:36:46 +0000 (10:36 -0700)
include/vulkan/vulkan.h
src/vulkan/anv_device.c

index 26827b6847f518fb4af506f75420c7feeac889d9..c4ed1ec0cd1d12262f4595055d80c287c523ce2b 100644 (file)
@@ -1316,6 +1316,15 @@ typedef struct {
     float                                       lineWidthGranularity;
 } VkPhysicalDeviceLimits;
 
+typedef struct {
+    VkBool32                                    residencyStandard2DBlockShape;
+    VkBool32                                    residencyStandard2DMSBlockShape;
+    VkBool32                                    residencyStandard3DBlockShape;
+    VkBool32                                    residencyAlignedMipSize;
+    VkBool32                                    residencyNonResident;
+    VkBool32                                    residencyNonResidentStrict;
+} VkPhysicalDeviceSparseProperties;
+
 typedef struct {
     uint32_t                                    apiVersion;
     uint32_t                                    driverVersion;
@@ -1324,6 +1333,8 @@ typedef struct {
     VkPhysicalDeviceType                        deviceType;
     char                                        deviceName[VK_MAX_PHYSICAL_DEVICE_NAME];
     uint8_t                                     pipelineCacheUUID[VK_UUID_LENGTH];
+    VkPhysicalDeviceLimits                      limits;
+    VkPhysicalDeviceSparseProperties            sparseProperties;
 } VkPhysicalDeviceProperties;
 
 typedef struct {
@@ -2082,7 +2093,6 @@ typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, ui
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
-typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties);
 typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
@@ -2254,10 +2264,6 @@ VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties(
     VkImageCreateFlags                          flags,
     VkImageFormatProperties*                    pImageFormatProperties);
 
-VkResult VKAPI vkGetPhysicalDeviceLimits(
-    VkPhysicalDevice                            physicalDevice,
-    VkPhysicalDeviceLimits*                     pLimits);
-
 VkResult VKAPI vkGetPhysicalDeviceProperties(
     VkPhysicalDevice                            physicalDevice,
     VkPhysicalDeviceProperties*                 pProperties);
index 6473765cebc3d84f870859e1addc7b1c8e7137d8..310a5b9113155ac57f9f9776fd4fb203fb37dac0 100644 (file)
@@ -314,16 +314,16 @@ VkResult anv_GetPhysicalDeviceFeatures(
    return VK_SUCCESS;
 }
 
-VkResult anv_GetPhysicalDeviceLimits(
+VkResult anv_GetPhysicalDeviceProperties(
     VkPhysicalDevice                            physicalDevice,
-    VkPhysicalDeviceLimits*                     pLimits)
+    VkPhysicalDeviceProperties*                 pProperties)
 {
-   ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
-   const struct brw_device_info *devinfo = physical_device->info;
+   ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
+   const struct brw_device_info *devinfo = pdevice->info;
 
-   anv_finishme("Get correct values for PhysicalDeviceLimits");
+   anv_finishme("Get correct values for VkPhysicalDeviceLimits");
 
-   *pLimits = (VkPhysicalDeviceLimits) {
+   VkPhysicalDeviceLimits limits = {
       .maxImageDimension1D                      = (1 << 14),
       .maxImageDimension2D                      = (1 << 14),
       .maxImageDimension3D                      = (1 << 10),
@@ -433,21 +433,14 @@ VkResult anv_GetPhysicalDeviceLimits(
       .lineWidthGranularity                     = (1.0 / 128.0),
    };
 
-   return VK_SUCCESS;
-}
-
-VkResult anv_GetPhysicalDeviceProperties(
-    VkPhysicalDevice                            physicalDevice,
-    VkPhysicalDeviceProperties*                 pProperties)
-{
-   ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
-
    *pProperties = (VkPhysicalDeviceProperties) {
       .apiVersion = VK_MAKE_VERSION(0, 138, 1),
       .driverVersion = 1,
       .vendorId = 0x8086,
       .deviceId = pdevice->chipset_id,
       .deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
+      .limits = limits,
+      .sparseProperties = {0}, /* Broadwell doesn't do sparse. */
    };
 
    strcpy(pProperties->deviceName, pdevice->name);