/ appendices / VK_NV_shader_sm_builtins.txt
VK_NV_shader_sm_builtins.txt
 1  include::meta/VK_NV_shader_sm_builtins.txt[]
 2  
 3  *Last Modified Date*::
 4      2019-05-28
 5  
 6  *Interactions and External Dependencies*::
 7   - This extension requires
 8     http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_shader_sm_builtins.html[+SPV_NV_shader_sm_builtins+].
 9   - This extension enables
10     https://github.com/KhronosGroup/GLSL/blob/master/extensions/nv/GLSL_NV_shader_sm_builtins.txt[+GL_NV_shader_sm_builtins+]
11     for GLSL source languages.
12  
13  *Contributors*::
14    - Jeff Bolz, NVIDIA
15    - Eric Werness, NVIDIA
16  
17  === Description
18  
19  This extension provides the ability to determine device-specific properties
20  on NVIDIA GPUs.
21  It provides the number of streaming multiprocessors (SMs), the maximum
22  number of warps (subgroups) that can run on an SM, and shader builtins to
23  enable invocations to identify which SM and warp a shader invocation is
24  executing on.
25  
26  This extension enables support for the SPIR-V code:ShaderSMBuiltinsNV
27  capability.
28  
29  These properties and built-ins should: typically only be used for debugging
30  purposes.
31  
32  
33  === New Object Types
34  
35  None.
36  
37  === New Enum Constants
38  
39    * Extending elink:VkStructureType:
40    ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV
41    ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV
42  
43  === New Enums
44  
45  None.
46  
47  === New Structures
48  
49    * slink:VkPhysicalDeviceShaderSMBuiltinsFeaturesNV
50    * slink:VkPhysicalDeviceShaderSMBuiltinsPropertiesNV
51  
52  === New Functions
53  
54  None.
55  
56  === New or Modified Built-In Variables
57  
58   * <<interfaces-builtin-variables-warpspersmnv,code:WarpsPerSMNV>>
59   * <<interfaces-builtin-variables-smcountnv,code:SMCountNV>>
60   * <<interfaces-builtin-variables-warpidnv,code:WarpIDNV>>
61   * <<interfaces-builtin-variables-smidnv,code:SMIDNV>>
62  
63  === New SPIR-V Capabilities
64  
65   * <<spirvenv-capabilities-table-shadersmbuiltins,code:ShaderSMBuiltinsNV>>
66  
67  === Issues
68  . What should we call this extension?
69  +
70  --
71  RESOLVED: Using NV_shader_sm_builtins.
72  Other options considered included:
73  
74    * NV_shader_smid - but SMID is really easy to typo/confuse as SIMD.
75    * NV_shader_sm_info - but *Info* is typically reserved for input
76      structures
77  
78  --
79  
80  
81  === Version History
82  
83    * Revision 1, 2019-05-28 (Daniel Koch)
84      - Internal revisions
85  
86