diff --git a/README.md b/README.md index 98e7c2e..523d377 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,4 @@ which normatively accepts SPIR-V but does not normatively consume a high-level s - [GL_EXT_fragment_shader_barycentric](https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_fragment_shader_barycentric.txt) - [GL_EXT_mesh_shader](https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_mesh_shader.txt) - [GL_EXT_opacity_micromap](https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_opacity_micromap.txt) +- [GL_ARM_shader_core_builtins](https://github.com/KhronosGroup/GLSL/blob/master/extensions/arm/GLSL_ARM_shader_core_builtins.txt) diff --git a/extensions/arm/GLSL_arm_shader_core_builtins.txt b/extensions/arm/GLSL_arm_shader_core_builtins.txt new file mode 100644 index 0000000..15c58d6 --- /dev/null +++ b/extensions/arm/GLSL_arm_shader_core_builtins.txt @@ -0,0 +1,113 @@ +Name + + ARM_shader_core_builtins + +Name Strings + + GL_ARM_shader_core_builtins + +Contact + + Kevin Petit (kevin.petit 'at' arm.com), Arm + +Contributors + + Kevin Petit, Arm + Christopher Gautier, Arm + +Status + + Complete + +Version + + Last Modified Date: 2022-07-20 + Revision: 1 + +Number + + N/A + +Dependencies + + This extension can be applied to OpenGL GLSL versions 1.40 + (#version 140) and higher. + + This extension can be applied to OpenGL ES ESSL versions 3.0 + (#version 300) and higher. + + This extension is written against revision 7 of the OpenGL Shading Language + version 4.50, dated May 9, 2017. + + This extension interacts with revision 36 of the GL_KHR_vulkan_glsl + extension, dated February 13, 2017. + +Overview + + This extension adds builtin variables that enable shaders to query + information about the cores and warps they are running on. + + Mapping to SPIR-V + ----------------- + + For informational purposes (non-specification), the following is an + expected way for an implementation to map GLSL constructs to SPIR-V + constructs: + + gl_CoreIDARM -> CoreIDARM decorated OpVariable + gl_CoreCountARM -> CoreCountARM decorated OpVariable + gl_CoreMaxIDARM -> CoreMaxIDARM decorated OpVariable + gl_WarpIDARM -> WarpIDARM decorated OpVariable + gl_WarpMaxIDARM -> WarpMaxIDARM decorated OpVariable + +Modifications to The OpenGL Shading Language Specification, Version 4.50 +(Revision 7) + + Including the following line in a shader can be used to control the + language features described in this extension: + + #extension GL_ARM_shader_core_builtins : + + where is as specified in section 3.3. + + New preprocessor #defines are added to the OpenGL Shading Language: + + #define GL_ARM_shader_core_builtins 1 + + Modify Section 7.1, Built-in Languages Variable, p. 122 + + (Add to the list of built-in variables for the compute, vertex, + geometry, tessellation control, tessellation evaluation, fragment, + ray generation, intersection, any-hit, closest-hit, miss, and callable + shading languages) + + highp in uint gl_CoreIDARM; + highp in uint gl_CoreCountARM; + highp in uint gl_CoreMaxIDARM; + highp in uint gl_WarpIDARM; + highp in uint gl_WarpMaxIDARM; + + The variable gl_CoreIDARM holds the ID of the shader core the executing + invocation is running on. + This variable is in the range 0 to gl_CoreMaxIDARM. + + The variable gl_CoreCountARM holds the number of shader cores on the device. + + The variable gl_CoreMaxIDARM holds the max ID of any shader core on the + device. + + The variable gl_WarpIDARM holds the warp ID of the executing invocation. + This variable is in the range 0 to gl_MaxWarpIDARM. + + The variable gl_WarpMaxIDARM holds the max ID that can be assigned to a + warp on the core the executing invocation is running on. + +Issues + + None. + +Revision History + + Rev. Date Author Changes + ---- ---------- -------- ----------------------------------------- + 1 2022-07-20 Kevin Petit Internal revisions.