Mesa (master): anv: Implement VK_NV_compute_shader_derivatives
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 9 03:29:09 UTC 2019
Module: Mesa
Branch: master
Commit: 45a4129392c8acc07807ae2bd38f1869e797142e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=45a4129392c8acc07807ae2bd38f1869e797142e
Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date: Thu Mar 28 10:36:43 2019 -0700
anv: Implement VK_NV_compute_shader_derivatives
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/anv_device.c | 8 ++++++++
src/intel/vulkan/anv_extensions.py | 1 +
src/intel/vulkan/anv_pipeline.c | 1 +
3 files changed, 10 insertions(+)
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,
More information about the mesa-commit
mailing list