Mesa (master): radv/llvm: expose VK_EXT_shader_demote_to_helper_invocation with LLVM 9+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 06:24:21 UTC 2020
Module: Mesa
Branch: master
Commit: d7923c74d42d4d745e6e5b2b572ac558f2b9a1ed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7923c74d42d4d745e6e5b2b572ac558f2b9a1ed
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Jun 5 15:58:36 2020 +0200
radv/llvm: expose VK_EXT_shader_demote_to_helper_invocation with LLVM 9+
It should already work with the LLVM backend.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5361>
---
docs/relnotes/new_features.txt | 1 +
src/amd/vulkan/radv_device.c | 2 +-
src/amd/vulkan/radv_extensions.py | 2 +-
src/amd/vulkan/radv_shader.c | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index 8ad3ed9e5e6..13e179456e4 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -3,6 +3,7 @@ VK_AMD_texture_gather_bias_lod on RADV.
VK_EXT_private_data on ANV and RADV.
VK_EXT_custom_border_color on RADV.
VK_EXT_pipeline_creation_cache_control on RADV.
+VK_EXT_shader_demote_to_helper_invocation on RADV/LLVM.
VK_EXT_subgroup_size_control on RADV/ACO.
VK_GOOGLE_user_type on ANV and RADV.
VK_KHR_shader_subgroup_extended_types on RADV/ACO.
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 9c5c6f90ed5..2efa549f2a3 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1200,7 +1200,7 @@ void radv_GetPhysicalDeviceFeatures2(
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT: {
VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT *features =
(VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT *)ext;
- features->shaderDemoteToHelperInvocation = pdevice->use_aco;
+ features->shaderDemoteToHelperInvocation = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT: {
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
index 7db4aa39907..ace0ee7024e 100644
--- a/src/amd/vulkan/radv_extensions.py
+++ b/src/amd/vulkan/radv_extensions.py
@@ -151,7 +151,7 @@ EXTENSIONS = [
Extension('VK_EXT_sample_locations', 1, 'device->rad_info.chip_class < GFX10'),
Extension('VK_EXT_sampler_filter_minmax', 1, True),
Extension('VK_EXT_scalar_block_layout', 1, 'device->rad_info.chip_class >= GFX7'),
- Extension('VK_EXT_shader_demote_to_helper_invocation',1, 'device->use_aco'),
+ Extension('VK_EXT_shader_demote_to_helper_invocation',1, 'LLVM_VERSION_MAJOR >= 9 || device->use_aco'),
Extension('VK_EXT_shader_viewport_index_layer', 1, True),
Extension('VK_EXT_shader_stencil_export', 1, True),
Extension('VK_EXT_shader_subgroup_ballot', 1, True),
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index a23af0f7f9f..dbce0d75aee 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -363,7 +363,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
.amd_shader_ballot = device->physical_device->use_shader_ballot,
.amd_shader_explicit_vertex_parameter = true,
.amd_trinary_minmax = true,
- .demote_to_helper_invocation = device->physical_device->use_aco,
+ .demote_to_helper_invocation = true,
.derivative_group = true,
.descriptor_array_dynamic_indexing = true,
.descriptor_array_non_uniform_indexing = true,
More information about the mesa-commit
mailing list