From 7682c887b3258813733b9b82c823afe60cb99914 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 29 Jun 2020 19:33:50 +0200 Subject: [PATCH] tu: Enable KHR_variable_pointers Passes dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.* and dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.* Part-of: --- src/freedreno/vulkan/tu_device.c | 8 ++++---- src/freedreno/vulkan/tu_extensions.py | 1 + src/freedreno/vulkan/tu_shader.c | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 760e3b71a94..1a0b42fbfcc 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -656,8 +656,8 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, features->multiview = false; features->multiviewGeometryShader = false; features->multiviewTessellationShader = false; - features->variablePointersStorageBuffer = false; - features->variablePointers = false; + features->variablePointersStorageBuffer = true; + features->variablePointers = true; features->protectedMemory = false; features->samplerYcbcrConversion = true; features->shaderDrawParameters = true; @@ -665,8 +665,8 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: { VkPhysicalDeviceVariablePointersFeatures *features = (void *) ext; - features->variablePointersStorageBuffer = false; - features->variablePointers = false; + features->variablePointersStorageBuffer = true; + features->variablePointers = true; break; } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: { diff --git a/src/freedreno/vulkan/tu_extensions.py b/src/freedreno/vulkan/tu_extensions.py index ebdcbd3a52d..5bdc791be14 100644 --- a/src/freedreno/vulkan/tu_extensions.py +++ b/src/freedreno/vulkan/tu_extensions.py @@ -84,6 +84,7 @@ EXTENSIONS = [ Extension('VK_EXT_index_type_uint8', 1, True), Extension('VK_EXT_vertex_attribute_divisor', 1, True), Extension('VK_KHR_shader_draw_parameters', 1, True), + Extension('VK_KHR_variable_pointers', 1, True), ] MAX_API_VERSION = VkVersion(MAX_API_VERSION) diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 4636b2db023..f0957a33a90 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -63,6 +63,7 @@ tu_spirv_to_nir(struct ir3_compiler *compiler, .transform_feedback = true, .tessellation = true, .draw_parameters = true, + .variable_pointers = true, }, }; const nir_shader_compiler_options *nir_options = -- 2.30.2