From 1fb43ae9bff45646f49ee968d0d3553873d052e3 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 5 Mar 2021 03:53:10 +1000 Subject: [PATCH] lavapipe: enable KHR_multiview Reviewed-by: Roland Scheidegger Reviewed-by: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 17 +++++++++++++++++ src/gallium/frontends/lavapipe/lvp_pipeline.c | 1 + 2 files changed, 18 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 9cacade..5468c30 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -105,6 +105,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported = .KHR_maintenance1 = true, .KHR_maintenance2 = true, .KHR_maintenance3 = true, + .KHR_multiview = true, .KHR_push_descriptor = true, .KHR_relaxed_block_layout = true, .KHR_sampler_mirror_clamp_to_edge = true, @@ -492,6 +493,14 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2( features->extendedDynamicState = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: { + VkPhysicalDeviceMultiviewFeatures *features = + (VkPhysicalDeviceMultiviewFeatures*)ext; + features->multiview = true; + features->multiviewGeometryShader = true; + features->multiviewTessellationShader = true; + break; + } default: break; } @@ -718,6 +727,14 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties2( properties->transformFeedbackStreamsLinesTriangles = false; properties->transformFeedbackRasterizationStreamSelect = false; properties->transformFeedbackDraw = true; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: { + VkPhysicalDeviceMultiviewProperties *properties = + (VkPhysicalDeviceMultiviewProperties *)ext; + properties->maxMultiviewViewCount = 6; + properties->maxMultiviewInstanceIndex = INT_MAX; + break; } default: break; diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 44b8c85..d10bb4b 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -511,6 +511,7 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline, .device_group = true, .draw_parameters = true, .shader_viewport_index_layer = true, + .multiview = true, }, .ubo_addr_format = nir_address_format_32bit_index_offset, .ssbo_addr_format = nir_address_format_32bit_index_offset, -- 2.7.4