From: Caio Marcelo de Oliveira Filho Date: Thu, 28 Mar 2019 17:36:43 +0000 (-0700) Subject: anv: Implement VK_NV_compute_shader_derivatives X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45a4129392c8acc07807ae2bd38f1869e797142e;p=mesa.git anv: Implement VK_NV_compute_shader_derivatives Reviewed-by: Ian Romanick Reviewed-by: Jason Ekstrand --- 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,