anv: Implement VK_NV_compute_shader_derivatives

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Caio Marcelo de Oliveira Filho 2019-03-28 10:36:43 -07:00
parent bd73531677
commit 45a4129392
3 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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,