From b708a1acb8404e31bfc9a1495b22f2dea17c21f6 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 2 Jul 2020 11:34:54 +0200 Subject: [PATCH] tu: Enable VK_KHR_multiview Part-of: --- src/freedreno/vulkan/tu_device.c | 4 ++-- src/freedreno/vulkan/tu_extensions.py | 1 + src/freedreno/vulkan/tu_private.h | 2 +- src/freedreno/vulkan/tu_shader.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 9a6085f96d3..4ad383384de 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -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; diff --git a/src/freedreno/vulkan/tu_extensions.py b/src/freedreno/vulkan/tu_extensions.py index 4a2d37f94ed..b51b5aa329d 100644 --- a/src/freedreno/vulkan/tu_extensions.py +++ b/src/freedreno/vulkan/tu_extensions.py @@ -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) diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index b62f5c6c88b..e02290bcbe8 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -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 diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index b85febe6410..ec8e2661e8a 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -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 = -- 2.30.2