GLSL 4 50 spec Khronos Group

Glsl 4 50 Spec Khronos Group-PDF Download

  • Date:05 Jan 2020
  • Views:41
  • Downloads:0
  • Pages:213
  • Size:905.43 KB

Share Pdf : Glsl 4 50 Spec Khronos Group

Download and Preview : Glsl 4 50 Spec Khronos Group


Report CopyRight/DMCA Form For : Glsl 4 50 Spec Khronos Group


Transcription:

Copyright c 2008 2017 The Khronos Group Inc All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group. Inc It or any components may not be reproduced republished distributed transmitted displayed. broadcast or otherwise exploited in any manner without the express prior written permission of Khronos. Group You may use this specification for implementing the functionality therein without altering or. removing any trademark copyright or other notice from the specification but the receipt or. possession of this specification does not convey any rights to reproduce disclose or distribute its. contents or to manufacture use or sell anything that it may describe in whole or in part. Khronos Group grants express permission to any current Promoter Contributor or Adopter member of. Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion provided that. NO CHARGE is made for the specification and the latest available update of the specification for any. version of the API is used whenever possible Such distributed specification may be reformatted AS. LONG AS the contents of the specification are not changed in any way The specification may be. incorporated into a product that is sold as long as such product includes significant independent work. developed by the seller A link to the current version of this specification on the Khronos Group website. should be included whenever possible with specification distributions. Khronos Group makes no and expressly disclaims any representations or warranties express or. implied regarding this specification including without limitation any implied warranties of merchantability. or fitness for a particular purpose or noninfringement of any intellectual property Khronos Group makes. no and expressly disclaims any warranties express or implied regarding the correctness accuracy. completeness timeliness and reliability of the specification Under no circumstances will. the Khronos Group or any of its Promoters Contributors or Members or their respective partners. officers directors employees agents or representatives be liable for any damages whether direct. indirect special or consequential damages for lost revenues lost profits or otherwise arising from or in. connection with these materials, Khronos SYCL SPIR WebGL EGL COLLADA StreamInput OpenVX OpenKCam glTF OpenKODE. OpenVG OpenWF OpenSL ES OpenMAX OpenMAX AL OpenMAX IL and OpenMAX DL are. trademarks and WebCL is a certification mark of the Khronos Group Inc OpenCL is a trademark of Apple. Inc and OpenGL and OpenML are registered trademarks and the OpenGL ES and OpenGL SC logos are. trademarks of Silicon Graphics International used under license by Khronos All other product names. trademarks and or company names are used solely for identification and belong to their respective. Table of Contents,1 Introduction 1,1 1 Acknowledgments 2. 1 2 Changes 3, 1 2 1 Changes from Revision 6 of GLSL Version 4 50 3. 1 2 2 Changes from Revision 5 of GLSL Version 4 50 4. 1 2 3 Changes from Revision 3 of GLSL Version 4 50 4. 1 2 4 Summary of Changes from Revision 9 of GLSL Version 4 40 5. 1 3 Overview 6,1 4 Error Handling 6,1 5 Typographical Conventions 7. 1 6 Deprecation 7,2 Overview of OpenGL Shading 8,2 1 Vertex Processor 8.
2 2 Tessellation Control Processor 8,2 3 Tessellation Evaluation Processor 9. 2 4 Geometry Processor 9,2 5 Fragment Processor 9,2 6 Compute Processor 9. 3 Basics 11,3 1 Character Set and Phases of Compilation 11. 3 2 Source Strings 12,3 3 Preprocessor 12,3 4 Comments 18. 3 5 Tokens 19,3 6 Keywords 19,3 7 Identifiers 21,3 8 Definitions 21.
3 8 1 Static Use 22, 3 8 2 Dynamically Uniform Expressions and Uniform Control Flow 22. 4 Variables and Types 24,4 1 Basic Types 24,4 1 1 Void 28. 4 1 2 Booleans 28,4 1 3 Integers 28,4 1 4 Floating Point Variables 30. 4 1 5 Vectors 31,4 1 6 Matrices 31,4 1 7 Opaque Types 32. 4 1 7 1 Samplers 32,4 1 7 2 Images 32,4 1 7 3 Atomic Counters 33.
4 1 8 Structures 33,4 1 9 Arrays 34,4 1 10 Implicit Conversions 38. 4 1 11 Initializers 39,4 2 Scoping 41,4 3 Storage Qualifiers 44. 4 3 1 Default Storage Qualifier 45,4 3 2 Constant Qualifier 45. 4 3 3 Constant Expressions 46,4 3 4 Input Variables 47. 4 3 5 Uniform Variables 50,4 3 6 Output Variables 50.
4 3 7 Buffer Variables 53,4 3 8 Shared Variables 53. 4 3 9 Interface Blocks 54,4 4 Layout Qualifiers 58. 4 4 1 Input Layout Qualifiers 60,4 4 1 1 Tessellation Evaluation Inputs 64. 4 4 1 2 Geometry Shader Inputs 65,4 4 1 3 Fragment Shader Inputs 66. 4 4 1 4 Compute Shader Inputs 67,4 4 2 Output Layout Qualifiers 68.
4 4 2 1 Transform Feedback Layout Qualifiers 70,4 4 2 2 Tessellation Control Outputs 72. 4 4 2 3 Geometry Outputs 73,4 4 2 4 Fragment Outputs 75. 4 4 3 Uniform Variable Layout Qualifiers 76,4 4 4 Subroutine Function Layout Qualifiers 77. 4 4 5 Uniform and Shader Storage Block Layout Qualifiers 77. 4 4 6 Opaque Uniform Layout Qualifiers 80,4 4 6 1 Atomic Counter Layout Qualifiers 81. 4 4 6 2 Format Layout Qualifiers 82,4 5 Interpolation Qualifiers 84.
4 5 1 Redeclaring Built in Interpolation Variables in the Compatibility Profile 85. 4 6 Parameter Qualifiers 86,4 7 Precision and Precision Qualifiers 86. 4 7 1 Range and Precision 86,4 7 2 Precision Qualifiers 87. 4 7 3 Default Precision Qualifiers 88,4 7 4 Available Precision Qualifiers 89. 4 8 Variance and the Invariant Qualifier 89,4 8 1 The Invariant Qualifier 89. 4 8 2 Invariance of Constant Expressions 90,4 9 The Precise Qualifier 90.
4 10 Memory Qualifiers 93,4 11 Order and Repetition of Qualification 96. 4 12 Empty Declarations 96,5 Operators and Expressions 97. 5 1 Operators 97,5 2 Array Operations 98,5 3 Function Calls 98. 5 4 Constructors 98,5 4 1 Conversion and Scalar Constructors 98. 5 4 2 Vector and Matrix Constructors 99,5 4 3 Structure Constructors 101.
5 4 4 Array Constructors 102,5 5 Vector and Scalar Components and Length 102. 5 6 Matrix Components 104,5 7 Structure and Array Operations 104. 5 8 Assignments 105,5 9 Expressions 106,5 10 Vector and Matrix Operations 109. 5 11 Out of Bounds Accesses 110,6 Statements and Structure 112. 6 1 Function Definitions 113,6 1 1 Function Calling Conventions 116.
6 1 2 Subroutines 117,6 2 Selection 119,6 3 Iteration 120. 6 4 Jumps 121,7 Built in Variables 122,7 1 Built In Language Variables 122. 7 1 1 Compatibility Profile Built In Language Variables 132. 7 2 Compatibility Profile Vertex Shader Built In Inputs 135. 7 3 Built In Constants 136, 7 3 1 Compatibility Profile Built In Constants 138. 7 4 Built In Uniform State 138,7 4 1 Compatibility Profile State 138. 8 Built in Functions 142,8 1 Angle and Trigonometry Functions 143.
8 2 Exponential Functions 145,8 3 Common Functions 146. 8 4 Floating Point Pack and Unpack Functions 151,8 5 Geometric Functions 154. 8 6 Matrix Functions 156,8 7 Vector Relational Functions 158. 8 8 Integer Functions 160,8 9 Texture Functions 162. 8 9 1 Texture Query Functions 163,8 9 2 Texel Lookup Functions 166.
8 9 3 Texture Gather Functions 172,8 9 4 Compatibility Profile Texture Functions 175. 8 10 Atomic Counter Functions 177,8 11 Atomic Memory Functions 177. 8 12 Image Functions 178,8 13 Fragment Processing Functions 182. 8 13 1 Derivative Functions 182,8 13 2 Interpolation Functions 184. 8 14 Noise Functions 185,8 15 Geometry Shader Functions 186.
8 16 Shader Invocation Control Functions 188,8 17 Shader Memory Control Functions 189. 9 Shading Language Grammar for Core Profile 191,10 Normative References 207. 1 Introduction, This document specifies only version 4 50 of the OpenGL Shading Language It requires VERSION. to substitute 450 and requires version to accept only 450 If version is declared with a smaller. number the language accepted is a previous version of the shading language which will be supported. depending on the version and type of context in the OpenGL API See the OpenGL Graphics System. Specification Version 4 5 for details on what language versions are supported. Previous versions of the OpenGL Shading Language as well as the OpenGL ES Shading Language are. not strict subsets of the version specified here particularly with respect to precision name hiding rules. and treatment of interface variables See the specification corresponding to a particular language version. for details specific to that version of the language. All OpenGL Graphics System Specification references in this specification are to version 4 5. 1 Introduction,1 1 Acknowledgments, This specification is based on the work of those who contributed to past versions of the OpenGL. Language Specification the OpenGL ES 2 0 Language Specification and the following contributors to. this version,Pat Brown NVIDIA,Jeff Bolz NVIDIA,Frank Chen.
Pierre Boudier AMD,Piers Daniell NVIDIA,Chris Dodd NVIDIA. Nick Haemel NVIDIA,Jason Green TransGaming,Brent Insko Intel. Bill Licea Kane Qualcomm,Daniel Koch TransGaming,Graeme Leese Broadcom. Barthold Lichtenbelt NVIDIA,Bruce Merry ARM,Robert Ohannessian. Tom Olson ARM,Brian Paul VMware,Acorn Pooley NVIDIA.
Daniel Rakos AMD,Christophe Riccio AMD,Kevin Rogovin. Ian Romanick Intel,Greg Roth Nvidia,Graham Sellers AMD. Dave Shreiner ARM,Jeremy Sandmel Apple,Robert Simpson Qualcomm. Eric Werness NVIDIA,Mark Young AMD,1 Introduction,1 2 Changes. 1 2 1 Changes from Revision 6 of GLSL Version 4 50. Public Bug 1448 Cannot reuse the same binding number except if the type of resource is. different or for atomic counters if the offset is different. Public Bug 1460 Denormalized 16 bit floats can be flushed to zero when unpacked but it is. preferred that values are preserved See unpackHalf2x16. Public Bug 1472 The granularity of per patch output access is component level 32 bit. GitHub Issue Include atomic counters as a use of offset in the table in section 4 4 Layout. Qualifiers, Private Bug 16187 Remove run time from the phrase run time flow of control.
Private Bug 11600 Reduce the set of built in functions required to evaluate to compile time. constant expressions See section 4 3 3 for an explicit list of what must be a compile time. Private Bug 16140 Remove the following invariant pragma rule It is a compile time error to. use this pragma in a fragment shader See section 4 8 1. Private Bug 15981 Fix typo in section 4 10 layout qualification is not included in parameter. Private Bug 15973 Don t allow layout local size 0, Private Bug 15951 Don t allow equality comparisons of subroutine uniform variables. Private Bug 16003 Include undefining as well as defining when discussing behavior for reserved. and built in macros in section 3 3, Private Bug 15500 Remove false claim that texture lookup results are restricted to the range. Private Bug 15447 Correct allowed range of xfb buffer See section 4 4 2 1. Private Bug 12006 memoryBarrierShared only works within a compute shader work group. Private Bug 16104 Require support for identifiers and macro names of length 1024 and allow. longer lengths to also be supported, Private Bug 15761 Be more clear that flat is needed for types containing types that need flat. qualification See section 4 3 4, Private Bug 15761 Be clear that precise is inherited applying recursively to structure members. Private Bug 15945 Don t allow unsized arrays of atomic uint See section 4 4 6 1. Private Bug 13549 Use the phrase global scope a bit more precisely in several places. Private Bug 16130 Explicitly state that shared variables must be at global scope. 1 Introduction, Private Bug 15937 Simplify language in textureGatherOffsets to just say offsets require.
constant expressions, Private Bug 8944 Be clear the selection switch grammar in section 6 2 is expository not. normative Also case and default can only occur in a switch statement. Private Bug 15678 Don t allow location on block members where the block needs an array of. 1 2 2 Changes from Revision 5 of GLSL Version 4 50. Updated copyright and license page, Bug 1293 restrict subroutine use to just the places needed. Bug 1294 define and use aggregate consistently, Bug 1310 large set of typographical changes non functional not marked. Bug 1315 for arrays of arrays of block instances each element gets a binding point. Bug 1447 correct the pow inheritance formula, Bug 1405 allow mixed int uint types in bitwise operations. Bug 1461 align values must be greater than 0 align 0 is a compile time error. Bug 1247 Component limits for arrayed interfaces e g gl MaxTessControlInputComponents. are limits per vertex not limits for the entire interface. Bug 14863 Be clear that global non const declarations can call user functions. Bug 14958 clarify in expository grammar for blocks that memory qualifiers can be used as is. normal the grammars shown outside section 9 are expository not normative. Bug 1321 and bug 15276 move to SPIR V s improved definitions for uniform control flow and. dynamically uniform, Bug 15327 layout invocations 0 is a compile time error.
1 2 3 Changes from Revision 3 of GLSL Version 4 50. Bug 12664 The memory qualifier restrict can be added o. Language Version 4 50 Document Revision 7 09 May 2017 Editor John Kessenich Google 1 2 1 Changes from Revision 6 of GLSL Version 4 50

Related Books