1// Copyright (c) 2018-2020 NVIDIA Corporation 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_NV_compute_shader_derivatives.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2018-07-19 11*IP Status*:: 12 No known IP claims. 13*Interactions and External Dependencies*:: 14 - This extension provides API support for 15 {GLSLregistry}/nv/GLSL_NV_compute_shader_derivatives.txt[`GL_NV_compute_shader_derivatives`] 16*Contributors*:: 17 - Pat Brown, NVIDIA 18 19=== Description 20 21This extension adds Vulkan support for the 22{spirv}/NV/SPV_NV_compute_shader_derivatives.html[`SPV_NV_compute_shader_derivatives`] 23SPIR-V extension. 24 25The SPIR-V extension provides two new execution modes, both of which allow 26compute shaders to use built-ins that evaluate compute derivatives 27explicitly or implicitly. 28Derivatives will be computed via differencing over a 2x2 group of shader 29invocations. 30The code:DerivativeGroupQuadsNV execution mode assembles shader invocations 31into 2x2 groups, where each group has x and y coordinates of the local 32invocation ID of the form (2m+{0,1}, 2n+{0,1}). 33The code:DerivativeGroupLinearNV execution mode assembles shader invocations 34into 2x2 groups, where each group has local invocation index values of the 35form 4m+{0,1,2,3}. 36 37include::{generated}/interfaces/VK_NV_compute_shader_derivatives.adoc[] 38 39=== New SPIR-V Capability 40 41 * <<spirvenv-capabilities-table-ComputeDerivativeGroupQuadsNV, 42 code:ComputeDerivativeGroupQuadsNV>> 43 * <<spirvenv-capabilities-table-ComputeDerivativeGroupLinearNV, 44 code:ComputeDerivativeGroupLinearNV>> 45 46=== Issues 47 48(1) Should we specify that the groups of four shader invocations used for 49derivatives in a compute shader are the same groups of four invocations that 50form a "`quad`" in shader subgroups? 51 52*RESOLVED*: Yes. 53 54 55=== Examples 56 57None. 58 59=== Version History 60 61 * Revision 1, 2018-07-19 (Pat Brown) 62 ** Initial draft 63