From e4f1697b54453e3ecf132049feff60c518fd7c7c Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 20 Feb 2020 14:41:55 +0900 Subject: [PATCH] turnip: Enable VK_EXT_transform_feedback Signed-off-by: Hyunjun Ko Reviewed-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_device.c | 24 ++++++++++++++++++++++++ src/freedreno/vulkan/tu_extensions.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 8c0459f4680..72a0050d430 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -712,6 +712,13 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, features->inheritedConditionalRendering = false; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: { + VkPhysicalDeviceTransformFeedbackFeaturesEXT *features = + (VkPhysicalDeviceTransformFeedbackFeaturesEXT *) ext; + features->transformFeedback = true; + features->geometryStreams = false; + break; + } default: break; } @@ -911,6 +918,23 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, properties->maxMemoryAllocationSize = 0xFFFFFFFFull; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: { + VkPhysicalDeviceTransformFeedbackPropertiesEXT *properties = + (VkPhysicalDeviceTransformFeedbackPropertiesEXT *)ext; + + properties->maxTransformFeedbackStreams = IR3_MAX_SO_STREAMS; + properties->maxTransformFeedbackBuffers = IR3_MAX_SO_BUFFERS; + properties->maxTransformFeedbackBufferSize = UINT32_MAX; + properties->maxTransformFeedbackStreamDataSize = 512; + properties->maxTransformFeedbackBufferDataSize = 512; + properties->maxTransformFeedbackBufferDataStride = 512; + /* TODO: enable xfb query */ + properties->transformFeedbackQueries = false; + properties->transformFeedbackStreamsLinesTriangles = false; + properties->transformFeedbackRasterizationStreamSelect = false; + properties->transformFeedbackDraw = true; + break; + } default: break; } diff --git a/src/freedreno/vulkan/tu_extensions.py b/src/freedreno/vulkan/tu_extensions.py index efeb8dc0c89..ea549967105 100644 --- a/src/freedreno/vulkan/tu_extensions.py +++ b/src/freedreno/vulkan/tu_extensions.py @@ -77,7 +77,7 @@ EXTENSIONS = [ Extension('VK_KHR_external_memory_fd', 1, True), Extension('VK_EXT_external_memory_dma_buf', 1, True), Extension('VK_EXT_image_drm_format_modifier', 1, False), - Extension('VK_EXT_transform_feedback', 1, False), + Extension('VK_EXT_transform_feedback', 1, True), ] class VkVersion: -- 2.30.2