anv: Add the KHX_multiview boilerplate
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 21 Mar 2017 21:40:46 +0000 (14:40 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 May 2017 18:25:46 +0000 (11:25 -0700)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py

index 6b3202de3031b7d3cd42d4575acfee62609224af..d9fbfefe3177487c6c14b1fffc42491bb4c724b8 100644 (file)
@@ -612,6 +612,15 @@ void anv_GetPhysicalDeviceFeatures2KHR(
 
    vk_foreach_struct(ext, pFeatures->pNext) {
       switch (ext->sType) {
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX: {
+         VkPhysicalDeviceMultiviewFeaturesKHX *features =
+            (VkPhysicalDeviceMultiviewFeaturesKHX *)ext;
+         features->multiview = true;
+         features->multiviewGeometryShader = true;
+         features->multiviewTessellationShader = true;
+         break;
+      }
+
       default:
          anv_debug_ignored_stype(ext->sType);
          break;
@@ -789,6 +798,14 @@ void anv_GetPhysicalDeviceProperties2KHR(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX: {
+         VkPhysicalDeviceMultiviewPropertiesKHX *properties =
+            (VkPhysicalDeviceMultiviewPropertiesKHX *)ext;
+         properties->maxMultiviewViewCount = 16;
+         properties->maxMultiviewInstanceIndex = UINT32_MAX / 16;
+         break;
+      }
+
       default:
          anv_debug_ignored_stype(ext->sType);
          break;
index b4395c03b45a4e899a195c9cd491f2b76008b6f4..61a20e2cd5a2a24d54a479e5664395d4cabb31bc 100644 (file)
@@ -48,6 +48,7 @@ SUPPORTED_EXTENSIONS = [
     'VK_KHX_external_memory',
     'VK_KHX_external_memory_capabilities',
     'VK_KHX_external_memory_fd',
+    'VK_KHX_multiview',
 ]
 
 # We generate a static hash table for entry point lookup