tu: Enable VK_KHR_multiview
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 2 Jul 2020 09:34:54 +0000 (11:34 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Aug 2020 19:21:18 +0000 (19:21 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>

src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_extensions.py
src/freedreno/vulkan/tu_private.h
src/freedreno/vulkan/tu_shader.c

index 9a6085f96d36d42a184c5191f866b6485c03472e..4ad383384deadfa5eaa13c16ca89a92e4c88e835 100644 (file)
@@ -432,7 +432,7 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
          features->uniformAndStorageBuffer16BitAccess  = false;
          features->storagePushConstant16               = false;
          features->storageInputOutput16                = false;
-         features->multiview                           = false;
+         features->multiview                           = true;
          features->multiviewGeometryShader             = false;
          features->multiviewTessellationShader         = false;
          features->variablePointersStorageBuffer       = true;
@@ -504,7 +504,7 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
          VkPhysicalDeviceMultiviewFeatures *features =
             (VkPhysicalDeviceMultiviewFeatures *) ext;
-         features->multiview = false;
+         features->multiview = true;
          features->multiviewGeometryShader = false;
          features->multiviewTessellationShader = false;
          break;
index 4a2d37f94ed9c90118c96bb9a80ba78175648b98..b51b5aa329d70fd0ee80d3cc91dc0bcc869d5fa1 100644 (file)
@@ -92,6 +92,7 @@ EXTENSIONS = [
     Extension('VK_EXT_4444_formats',                      1, True),
     Extension('VK_EXT_conditional_rendering',             1, True),
     Extension('VK_EXT_custom_border_color',              12, True),
+    Extension('VK_KHR_multiview',                         1, True),
 ]
 
 MAX_API_VERSION = VkVersion(MAX_API_VERSION)
index b62f5c6c88b73d3a24454321b5f3b85a564ebbbb..e02290bcbe8f1d13b0874d64bd41827c90f88526 100644 (file)
@@ -95,7 +95,7 @@ typedef uint32_t xcb_window_t;
 #define MAX_DYNAMIC_BUFFERS                                                  \
    (MAX_DYNAMIC_UNIFORM_BUFFERS + MAX_DYNAMIC_STORAGE_BUFFERS)
 #define TU_MAX_DRM_DEVICES 8
-#define MAX_VIEWS 8
+#define MAX_VIEWS 16
 #define MAX_BIND_POINTS 2 /* compute + graphics */
 /* The Qualcomm driver exposes 0x20000058 */
 #define MAX_STORAGE_BUFFER_RANGE 0x20000000
index b85febe641071841508df6e1b41abfb2d6e4fe1e..ec8e2661e8a6772037aceea26dbfb4694e833bac 100644 (file)
@@ -67,6 +67,7 @@ tu_spirv_to_nir(struct ir3_compiler *compiler,
          .draw_parameters = true,
          .variable_pointers = true,
          .stencil_export = true,
+         .multiview = true,
       },
    };
    const nir_shader_compiler_options *nir_options =