anv: Enable VK_KHR_16bit_storage for SSBO and UBO
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Mon, 20 Nov 2017 22:28:45 +0000 (23:28 +0100)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 1 Mar 2018 05:37:40 +0000 (21:37 -0800)
Enables storageBuffer16BitAccess and uniformAndStorageBuffer16BitAccesss
features of VK_KHR_16bit_storage for Gen8+.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_extensions.py

index 41f9e00c4e7093a1faec532a4dab71bd54f678c6..e42b05d4fa76b307cb775c280f17046574724801 100644 (file)
@@ -793,9 +793,10 @@ void anv_GetPhysicalDeviceFeatures2KHR(
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR: {
          VkPhysicalDevice16BitStorageFeaturesKHR *features =
             (VkPhysicalDevice16BitStorageFeaturesKHR *)ext;
+         ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
 
-         features->storageBuffer16BitAccess = false;
-         features->uniformAndStorageBuffer16BitAccess = false;
+         features->storageBuffer16BitAccess = pdevice->info.gen >= 8;
+         features->uniformAndStorageBuffer16BitAccess = pdevice->info.gen >= 8;
          features->storagePushConstant16 = false;
          features->storageInputOutput16 = false;
          break;
index 6194eb0ad621823cc3a487f4065e7c73d682507b..8d39038c43a41086f02cad2d5f895e0ea69c2a09 100644 (file)
@@ -49,7 +49,7 @@ class Extension:
 # and dEQP-VK.api.info.device fail due to the duplicated strings.
 EXTENSIONS = [
     Extension('VK_ANDROID_native_buffer',                 5, 'ANDROID'),
-    Extension('VK_KHR_16bit_storage',                     1, False),
+    Extension('VK_KHR_16bit_storage',                     1, 'device->info.gen >= 8'),
     Extension('VK_KHR_bind_memory2',                      1, True),
     Extension('VK_KHR_dedicated_allocation',              1, True),
     Extension('VK_KHR_descriptor_update_template',        1, True),