From 0918095b9a6b2ec8a9794402ad8064bee1e0e687 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 22 Mar 2022 12:33:29 -0400 Subject: [PATCH] lavapipe: EXT_primitives_generated_query Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 9 +++++++++ src/gallium/frontends/lavapipe/lvp_query.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 49c15cbd1e2..757b3512999 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -153,6 +153,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported = .EXT_pipeline_creation_cache_control = true, .EXT_post_depth_coverage = true, .EXT_private_data = true, + .EXT_primitives_generated_query = true, .EXT_primitive_topology_list_restart = true, .EXT_sampler_filter_minmax = true, .EXT_scalar_block_layout = true, @@ -745,6 +746,14 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2( features->pipelineCreationCacheControl = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: { + VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *features = + (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)ext; + features->primitivesGeneratedQuery = true; + features->primitivesGeneratedQueryWithRasterizerDiscard = true; + features->primitivesGeneratedQueryWithNonZeroStreams = true; + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: { VkPhysicalDeviceLineRasterizationFeaturesEXT *features = (VkPhysicalDeviceLineRasterizationFeaturesEXT *)ext; diff --git a/src/gallium/frontends/lavapipe/lvp_query.c b/src/gallium/frontends/lavapipe/lvp_query.c index 9b37b744032..f85afdda762 100644 --- a/src/gallium/frontends/lavapipe/lvp_query.c +++ b/src/gallium/frontends/lavapipe/lvp_query.c @@ -46,6 +46,9 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateQueryPool( case VK_QUERY_TYPE_PIPELINE_STATISTICS: pipeq = PIPE_QUERY_PIPELINE_STATISTICS; break; + case VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT: + pipeq = PIPE_QUERY_PRIMITIVES_GENERATED; + break; default: return VK_ERROR_FEATURE_NOT_PRESENT; }