15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_compute_shader_derivatives
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_compute_shader_derivatives
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown, NVIDIA (pbrown 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Ashwin Lele, NVIDIA
165bd8deadSopenharmony_ci    Jeff Bolz, NVIDIA
175bd8deadSopenharmony_ci    Michael Chock, NVIDIA
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciStatus
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    Shipping
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciVersion
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    Last Modified:      September 4, 2019
265bd8deadSopenharmony_ci    Revision:           3
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciNumber
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    OpenGL Extension #525
315bd8deadSopenharmony_ci    OpenGL ES Extension #308
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciDependencies
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    This extension is written against the OpenGL 4.6 Specification
365bd8deadSopenharmony_ci    (Compatibility Profile), dated October 24, 2016.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    OpenGL 4.5 or OpenGL ES 3.2 is required.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension interacts with ARB_compute_variable_group_size.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    This extension requires support for the OpenGL Shading Language (GLSL)
435bd8deadSopenharmony_ci    extension "NV_compute_shader_derivatives", which can be found at the
445bd8deadSopenharmony_ci    Khronos Group Github site here:
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci        https://github.com/KhronosGroup/GLSL
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciOverview
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    This extension adds OpenGL and OpenGL ES API support for the OpenGL
515bd8deadSopenharmony_ci    Shading Language (GLSL) extension "NV_compute_shader_derivatives".
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    That extension, when enabled, allows applications to use derivatives in
545bd8deadSopenharmony_ci    compute shaders.  It adds compute shader support for explicit derivative
555bd8deadSopenharmony_ci    built-in functions like dFdx(), automatic derivative computation in
565bd8deadSopenharmony_ci    texture lookup functions like texture(), use of the optional LOD bias
575bd8deadSopenharmony_ci    parameter to adjust the computed level of detail values in texture lookup
585bd8deadSopenharmony_ci    functions, and the texture level of detail query function
595bd8deadSopenharmony_ci    textureQueryLod().
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciNew Procedures and Functions
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    None
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciNew Tokens
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    None
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciModifications to the OpenGL 4.6 Specification (Compatibility Profile)
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    None
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ciModifications to the OpenGL ES 3.2 Specification
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    None
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    None
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ciErrors
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    None
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ciNew State
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    None
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ciNew Implementation Dependent State
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci    None
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ciDependencies on ARB_compute_variable_group_size
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci    If ARB_compute_variable_group_size is supported, the GLSL compiler/linker is
965bd8deadSopenharmony_ci    unable to enforce the following restrictions:
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    * Compute shaders using the "derivative_group_quadsNV" mode must have a
995bd8deadSopenharmony_ci      local workgroup size whose width and height are both multiples of two.
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    * Compute shaders using the "derivative_group_linearNV" mode must have a
1025bd8deadSopenharmony_ci      local workgroup size whose total number of invocations is a multiple of four.
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    Instead, we need to enforce this restriction at run time.
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci    Add the following to the list of errors under the heading of "insert at the
1075bd8deadSopenharmony_ci    end of the first error block, shared between DispatchCompute and
1085bd8deadSopenharmony_ci    DispatchComputeGroupSizeARB, p. 586" in ARB_compute_variable_group_size:
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    * An INVALID_VALUE error is generated by DispatchComputeGroupSizeARB if the
1115bd8deadSopenharmony_ci      active program for the compute shader stage has a compute shader using the
1125bd8deadSopenharmony_ci      "derivative_group_quadsNV" layout qualifier and <group_size_x> or
1135bd8deadSopenharmony_ci      <group_size_y> is not a multiple of two.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    * An INVALID_VALUE error is generated by DispatchComputeGroupSizeARB if the
1165bd8deadSopenharmony_ci      active program for the compute shader stage has a compute shader using the
1175bd8deadSopenharmony_ci      "derivative_group_linearNV" layout qualifier and the product of
1185bd8deadSopenharmony_ci      <group_size_x>, <group_size_y>, and <group_size_z> is not a multiple of
1195bd8deadSopenharmony_ci      four.
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    Note that as of September 2019, this issue does not apply to SPIR-V compute
1225bd8deadSopenharmony_ci    shaders because SPIR-V does not provide a mechanism to specify variable
1235bd8deadSopenharmony_ci    local group sizes.  If this changes in the future, the INVALID_VALUE error
1245bd8deadSopenharmony_ci    above would apply both to GLSL and SPIR-V compute shaders.
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ciIssues
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    (1) How does this extension interact with ARB_compute_variable_group_size?
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci      RESOLVED:  For compute shaders with fixed group size, the GLSL
1325bd8deadSopenharmony_ci      specification calls for a compile- or link-time error if the local group
1335bd8deadSopenharmony_ci      size is inconsistent with the derivative mode specified using the
1345bd8deadSopenharmony_ci      "derivative_group_quadsNV" or "derivative_group_linearNV" layout
1355bd8deadSopenharmony_ci      qualifiers.  However, this sort of error can not be generated if
1365bd8deadSopenharmony_ci      "local_size_variable" is also specified because the local group size is
1375bd8deadSopenharmony_ci      not known until DispatchComputeGroupSizeARB is called.  To deal with this,
1385bd8deadSopenharmony_ci      we specify an INVALID_VALUE error if DispatchComputeGroupSizeARB is called
1395bd8deadSopenharmony_ci      with a bad local group size.
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ciRevision History
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci    Revision 3 (pbrown), 2019/09/04
1445bd8deadSopenharmony_ci    - Add an interaction with ARB_compute_variable_group_size, specifying
1455bd8deadSopenharmony_ci      that INVALID_VALUE is generated by DispatchComputeGroupSizeARB if the
1465bd8deadSopenharmony_ci      derivative mode is inconsistent with the local group size specified in the
1475bd8deadSopenharmony_ci      dispatch command.
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    Revision 2 (mchock)
1505bd8deadSopenharmony_ci    - Added OpenGL ES support.
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    Revision 1 (pbrown)
1535bd8deadSopenharmony_ci    - Internal revisions.
154