tu: Enable KHR_variable_pointers
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 29 Jun 2020 17:33:50 +0000 (19:33 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 6 Jul 2020 22:48:57 +0000 (22:48 +0000)
Passes dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.*
and dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5684>

src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_extensions.py
src/freedreno/vulkan/tu_shader.c

index 760e3b71a94c7d8ba6ce0a14d014e0119e7a74ed..1a0b42fbfcc6aff9ff8579b86bef9eafd63c1d48 100644 (file)
@@ -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: {
index ebdcbd3a52d83fff9f575fe935a90a6aec84432f..5bdc791be147c36b840cf458d4be56f3767df95c 100644 (file)
@@ -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)
index 4636b2db02389e2b5a3196cddd72c57b1b15a463..f0957a33a903990dcd403d1d83bbe1e6d6036414 100644 (file)
@@ -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 =