summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-03-28 10:36:43 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-04-08 19:29:33 -0700
commit45a4129392c8acc07807ae2bd38f1869e797142e (patch)
treeec69419bc9a7285e481f5eb26000fbc3335838ca
parentbd73531677f45b4ab1bebb910ab2b0e24c349643 (diff)
anv: Implement VK_NV_compute_shader_derivatives
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/intel/vulkan/anv_device.c8
-rw-r--r--src/intel/vulkan/anv_extensions.py1
-rw-r--r--src/intel/vulkan/anv_pipeline.c1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index b0a6e10cabc..9d4f93c910f 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1051,6 +1051,14 @@ void anv_GetPhysicalDeviceFeatures2(
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: {
+ VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *features =
+ (VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *)ext;
+ features->computeDerivativeGroupQuads = true;
+ features->computeDerivativeGroupLinear = true;
+ break;
+ }
+
default:
anv_debug_ignored_stype(ext->sType);
break;
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index 37c1203416e..db6b0217f4d 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -143,6 +143,7 @@ EXTENSIONS = [
Extension('VK_ANDROID_native_buffer', 5, 'ANDROID'),
Extension('VK_GOOGLE_decorate_string', 1, True),
Extension('VK_GOOGLE_hlsl_functionality1', 1, True),
+ Extension('VK_NV_compute_shader_derivatives', 1, True),
]
# Sort the extension list the way we expect: KHR, then EXT, then vendors
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 1c51b83b5ba..b0fef540e45 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -137,6 +137,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
struct spirv_to_nir_options spirv_options = {
.lower_workgroup_access_to_offsets = true,
.caps = {
+ .derivative_group = true,
.device_group = true,
.draw_parameters = true,
.float64 = pdevice->info.gen >= 8,