diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2017-10-19 11:04:14 -0700 |
---|---|---|
committer | Chad Versace <chadversary@chromium.org> | 2017-11-30 23:39:51 +0000 |
commit | 838e746fc9b54acc284d8c0812a57cb6469cc245 (patch) | |
tree | 9aeab5436c3995e0349f36902fc9f43691f4f517 /src | |
parent | d1d6bf7605c6f3a727b8a87e6d318f636b46d524 (diff) |
FROMLIST: anv: Add support for the variablePointers feature
Not to be confused with variablePointersStorageBuffer which is the
subset of VK_KHR_variable_pointers required to enable the extension.
This means we now have "full" support for variable pointers.
Archived-At: https://lists.freedesktop.org/archives/mesa-dev/2017-October/173537.html
(am from https://patchwork.freedesktop.org/patch/183830/)
Needed for SPIR-V VariablePointers capability.
Testing:
Tests for this feature were released in Vulkan CTS 1.0.2.4 on
2017-07-11, and were later merged into the oreo branches of deqp. But
in that release some testcases were buggy, causing some drivers to
crash. In particular, the bugs crashed Anvil. All but one of the
required fixes have landed in vk-gl-cts master@e52de55c. The last
fix is still under review in Khronos's internal Gerrit as
https://gerrit.khronos.org/#/c/1864/. I've pushed a public vk-gl-cts
branch[1] containing the remaining fix, and tagged[2] the vk-gl-cts
commit I tested against. Likewise for Mesa, I tagged[3] the commit
I tested, based on branch cros/arc-17.3.
Android is hard. Running the Oreo CTS on Nougat is even harder.
I confirmed that some testcases for this feature passed when running
the Oreo CTS on ARC++ Nougat, though the CTS eventually crashed due to
the reasons explained above.
I verified everything on Fedora instead. All 949 of the following
tests passed:
dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.*
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.*
[1]: http://git.kiwitree.net/cgit/~chadv/vk-gl-cts/log/?h=fixes/spirv-variable-pointers
[2]: http://git.kiwitree.net/cgit/~chadv/vk-gl-cts/log/?h=chadv/test/spirv-variable-pointers-2017-11-29
[3]: http://git.kiwitree.net/cgit/~chadv/mesa/log/?h=chadv/test/arc-17.3-anv-variable-pointers-2017-11-29
BUG=b:68708929
TEST=No regressions on Eve in `cts-tradefed run cts -m CtsDeqpTestCases`.
Change-Id: I93f94a0d5f976575826397d60b42d3b11a919269
Reviewed-on: https://chromium-review.googlesource.com/799681
Tested-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 67028e8da9f..4d0fcae3ddd 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -701,7 +701,7 @@ void anv_GetPhysicalDeviceFeatures2KHR( case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: { VkPhysicalDeviceVariablePointerFeaturesKHR *features = (void *)ext; features->variablePointersStorageBuffer = true; - features->variablePointers = false; + features->variablePointers = true; break; } diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index e19325cab2d..9a79986c7b9 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -124,6 +124,7 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline, } struct spirv_to_nir_options spirv_options = { + .lower_workgroup_access_to_offsets = true, .caps = { .float64 = device->instance->physicalDevice.info.gen >= 8, .int64 = device->instance->physicalDevice.info.gen >= 8, @@ -387,10 +388,8 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, if (stage != MESA_SHADER_COMPUTE) NIR_PASS_V(nir, anv_nir_lower_multiview, pipeline->subpass->view_mask); - if (stage == MESA_SHADER_COMPUTE) { - NIR_PASS_V(nir, brw_nir_lower_cs_shared); + if (stage == MESA_SHADER_COMPUTE) prog_data->total_shared = nir->num_shared; - } nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); |