summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-10-07 10:26:22 +0200
committerSamuel Pitoiset <[email protected]>2019-10-09 08:43:14 +0200
commitcbd6f0a0c2d04b4621f8d9002f7f28e5521d18c1 (patch)
tree5d7334b660e7ebaf74b7d85cb5533897bdeef5d3 /src/amd/vulkan
parent0b7ecfdda5900135c26e8b94285b8addc1055f09 (diff)
radv: implement VK_KHR_shader_clock
NIR->LLVM and ACO already support nir_intrinsic_shader_clock. Signed-off-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_device.c7
-rw-r--r--src/amd/vulkan/radv_extensions.py1
-rw-r--r--src/amd/vulkan/radv_shader.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 8965530ef28..efd3eb39417 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1063,6 +1063,13 @@ void radv_GetPhysicalDeviceFeatures2(
features->pipelineExecutableInfo = true;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: {
+ VkPhysicalDeviceShaderClockFeaturesKHR *features =
+ (VkPhysicalDeviceShaderClockFeaturesKHR *)ext;
+ features->shaderSubgroupClock = true;
+ features->shaderDeviceClock = false;
+ break;
+ }
default:
break;
}
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
index 068ca89ade9..14d139d60b4 100644
--- a/src/amd/vulkan/radv_extensions.py
+++ b/src/amd/vulkan/radv_extensions.py
@@ -86,6 +86,7 @@ EXTENSIONS = [
Extension('VK_KHR_sampler_mirror_clamp_to_edge', 1, True),
Extension('VK_KHR_sampler_ycbcr_conversion', 1, True),
Extension('VK_KHR_shader_atomic_int64', 1, 'LLVM_VERSION_MAJOR >= 9'),
+ Extension('VK_KHR_shader_clock', 1, True),
Extension('VK_KHR_shader_draw_parameters', 1, True),
Extension('VK_KHR_shader_float16_int8', 1, '!device->use_aco'),
Extension('VK_KHR_storage_buffer_storage_class', 1, True),
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index ee37c06b8ca..91e22c9d68f 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -357,6 +357,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
.physical_storage_buffer_address = true,
.post_depth_coverage = true,
.runtime_descriptor_array = true,
+ .shader_clock = true,
.shader_viewport_index_layer = true,
.stencil_export = true,
.storage_8bit = !device->physical_device->use_aco,