[gtksourceview] Updated glsl.lang to latest GLSL version (4.0)



commit 7160d89fb797aa08947c13d038c558b6ea5c5dfe
Author: Simon Wenner <simon wenner ch>
Date:   Wed Apr 7 21:47:15 2010 +0200

    Updated glsl.lang to latest GLSL version (4.0)

 gtksourceview/language-specs/glsl.lang |  175 +++++++++++++++++++++++---------
 1 files changed, 125 insertions(+), 50 deletions(-)
---
diff --git a/gtksourceview/language-specs/glsl.lang b/gtksourceview/language-specs/glsl.lang
index a4c59ba..2a21629 100644
--- a/gtksourceview/language-specs/glsl.lang
+++ b/gtksourceview/language-specs/glsl.lang
@@ -3,7 +3,7 @@
 
  Authors:  Chong Kai Xiong, Simon Wenner
  Copyright (C) 2005-2006  Chong Kai Xiong  <descender phreaker net>
- Copyright (C) 2009  Simon Wenner  <simon wenner ch>
+ Copyright (C) 2009-2010  Simon Wenner  <simon wenner ch>
 
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
@@ -23,9 +23,9 @@
 -->
 
 <!--
- Defines all symbols of the OpenGL Shading Language (GLSL) version 1.40.
- Specification (16-Feb-2009):
- http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.40.05.pdf
+ Defines all symbols of the OpenGL Shading Language (GLSL) version 4.0.
+ Specification (February 12, 2010):
+http://www.opengl.org/registry/doc/GLSLangSpec.4.00.7.pdf
 -->
 <language id="glsl" _name="OpenGL Shading Language" version="2.0" _section="Sources">
 
@@ -42,7 +42,7 @@
     <style id="keyword"           _name="Keyword"               map-to="def:keyword"/>
     <style id="builtin-function"  _name="Builtin Function"      map-to="def:builtin"/>
     <style id="builtin-constant"  _name="Builtin Constant"      map-to="def:constant"/>
-    <style id="special-variable"  _name="Special Variable"      map-to="def:identifier"/>
+    <style id="builtin-variable"  _name="Builtin Variable"      map-to="def:identifier"/>
     <style id="future-use"        _name="Reserved Keywords"/>
   </styles>
 
@@ -96,6 +96,9 @@
       <keyword>smooth</keyword>
       <keyword>noperspective</keyword>
       <keyword>layout</keyword>
+      <keyword>patch</keyword>
+      <keyword>sample</keyword>
+      <keyword>subroutine</keyword>
       <!-- precision -->
       <keyword>lowp</keyword>
       <keyword>mediump</keyword>
@@ -106,13 +109,14 @@
     <context id="primitives" style-ref="type">
       <keyword>bool</keyword>
       <keyword>float</keyword>
+      <keyword>double</keyword>
       <keyword>int</keyword>
       <keyword>uint</keyword>
       <keyword>struct</keyword>
       <keyword>void</keyword>
-      <keyword>[biu]?vec[2-4]</keyword>
-      <keyword>mat[2-4]</keyword>
-      <keyword>mat[2-4]x[2-4]</keyword>
+      <keyword>[bdiu]?vec[2-4]</keyword>
+      <keyword>[d]?mat[2-4]</keyword>
+      <keyword>[d]?mat[2-4]x[2-4]</keyword>
       <keyword>[iu]?sampler[1-3]D</keyword>
       <keyword>sampler[1-2]DShadow</keyword>
       <keyword>[iu]?sampler[1-2]DArray</keyword>
@@ -122,6 +126,10 @@
       <keyword>[iu]?sampler2DRect</keyword>
       <keyword>sampler2DRectShadow</keyword>
       <keyword>[iu]?samplerBuffer</keyword>
+      <keyword>[iu]?sampler2DMS</keyword>
+      <keyword>[iu]?sampler2DMSArray</keyword>
+      <keyword>[iu]?sampler2DMSCubeArray</keyword>
+      <keyword>samplerCubeArrayShadow</keyword>
     </context>
 
     <context id="reserved-keywords-for-future-use" style-ref="future-use">
@@ -147,13 +155,12 @@
       <keyword>interface</keyword>
       <keyword>long</keyword>
       <keyword>short</keyword>
-      <keyword>double</keyword>
       <keyword>half</keyword>
       <keyword>fixed</keyword>
       <keyword>unsigned</keyword>
       <keyword>input</keyword>
       <keyword>output</keyword>
-      <keyword>[hdf]vec[2-4]</keyword>
+      <keyword>[hf]vec[2-4]</keyword>
       <keyword>sampler3DRect</keyword>
       <keyword>filter</keyword>
       <keyword>sizeof</keyword>
@@ -164,6 +171,7 @@
     </context>
 
     <context id="builtin-functions" style-ref="builtin-function">
+      <!-- Section 8.1 -->
       <keyword>radians</keyword>
       <keyword>degrees</keyword>
       <keyword>sin</keyword>
@@ -178,6 +186,7 @@
       <keyword>asinh</keyword>
       <keyword>acosh</keyword>
       <keyword>atanh</keyword>
+      <!-- Section 8.2 -->
       <keyword>pow</keyword>
       <keyword>exp</keyword>
       <keyword>log</keyword>
@@ -185,7 +194,7 @@
       <keyword>log2</keyword>
       <keyword>sqrt</keyword>
       <keyword>inversesqrt</keyword>
-
+      <!-- Section 8.3 -->
       <keyword>abs</keyword>
       <keyword>sign</keyword>
       <keyword>floor</keyword>
@@ -204,7 +213,23 @@
       <keyword>smoothstep</keyword>
       <keyword>isnan</keyword>
       <keyword>isinf</keyword>
-
+      <keyword>floatBitsToInt</keyword>
+      <keyword>floatBitsToUint</keyword>
+      <keyword>intBitsToFloat</keyword>
+      <keyword>uintBitsToFloat</keyword>
+      <keyword>fma</keyword>
+      <keyword>frexp</keyword>
+      <keyword>ldexp</keyword>
+      <!-- Section 8.4 -->
+      <keyword>packUnorm2x16</keyword>
+      <keyword>packUnorm4x8</keyword>
+      <keyword>packSnorm4x8</keyword>
+      <keyword>unpackUnorm2x16</keyword>
+      <keyword>unpackUnorm4x8</keyword>
+      <keyword>unpackSnorm4x8</keyword>
+      <keyword>packDouble2x32</keyword>
+      <keyword>unpackDouble2x32</keyword>
+      <!-- Section 8.5 -->
       <keyword>length</keyword>
       <keyword>distance</keyword>
       <keyword>dot</keyword>
@@ -214,10 +239,13 @@
       <keyword>faceforward</keyword>
       <keyword>reflect</keyword>
       <keyword>refract</keyword>
+      <!-- Section 8.6 -->
       <keyword>matrixCompMult</keyword>
       <keyword>outerProduct</keyword>
       <keyword>transpose</keyword>
-
+      <keyword>determinant</keyword>
+      <keyword>inverse</keyword>
+      <!-- Section 8.7 -->
       <keyword>lessThan</keyword>
       <keyword>lessThanEqual</keyword>
       <keyword>greaterThan</keyword>
@@ -227,13 +255,24 @@
       <keyword>any</keyword>
       <keyword>all</keyword>
       <keyword>not</keyword>
-
+      <!-- Section 8.8 -->
+      <keyword>uaddCarry</keyword>
+      <keyword>usubBorrow</keyword>
+      <keyword>umulExtended</keyword>
+      <keyword>imulExtended</keyword>
+      <keyword>bitfieldExtract</keyword>
+      <keyword>bitfildInsert</keyword>
+      <keyword>bitfieldReverse</keyword>
+      <keyword>bitCount</keyword>
+      <keyword>findLSB</keyword>
+      <keyword>findMSB</keyword>
+      <!-- Section 8.9 -->
       <keyword>textureSize</keyword>
+      <keyword>textureQueryLOD</keyword>
       <keyword>texture</keyword>
       <keyword>textureProj</keyword>
       <keyword>textureLod</keyword>
       <keyword>textureOffset</keyword>
-
       <keyword>texelFetch</keyword>
       <keyword>texelFetchOffset</keyword>
       <keyword>textureProjOffset</keyword>
@@ -244,6 +283,8 @@
       <keyword>textureGradOffset</keyword>
       <keyword>textureProjGrad</keyword>
       <keyword>textureProjGradOffset</keyword>
+      <keyword>textureGather</keyword>
+      <keyword>textureGatherOffset</keyword>
 
       <keyword>texture[1-3]D</keyword>
       <keyword>texture[1-3]DProj</keyword>
@@ -257,36 +298,61 @@
       <keyword>shadow[1-2]DProj</keyword>
       <keyword>shadow[1-2]DLod</keyword>
       <keyword>shadow[1-2]DProjLod</keyword>
-
+      <!-- Section 8.10 -->
       <keyword>dFdx</keyword>
       <keyword>dFdy</keyword>
       <keyword>fwidth</keyword>
-
+      <keyword>interpolateAtCentroid</keyword>
+      <keyword>interpolateAtSample</keyword>
+      <keyword>interpolateAtOffset</keyword>
+      <!-- Section 8.11 -->
       <keyword>noise[1-4]</keyword>
+      <!-- Section 8.12 -->
+      <keyword>EmitStreamVertex</keyword>
+      <keyword>EndStreamPrimitive</keyword>
+      <keyword>EmitVertex</keyword>
+      <keyword>EndPrimitive</keyword>
+      <!-- Section 8.13 -->
+      <keyword>barrier</keyword>
     </context>
 
-    <context id="vertex-shader-special-variables" style-ref="special-variable">
-      <!-- Section 7.1 -->
-      <keyword>gl_Position</keyword>
-      <keyword>gl_PointSize</keyword>
+    <context id="builtin-variables" style-ref="builtin-variable">
+      <!-- Section 7.1 (vertex language) -->
       <keyword>gl_VertexID</keyword>
       <keyword>gl_InstanceID</keyword>
+      <keyword>gl_Position</keyword>
+      <keyword>gl_PointSize</keyword>
       <keyword>gl_ClipDistance</keyword>
-      <keyword>gl_ClipVertex</keyword>
-    </context>
-
-    <context id="fragment-shader-special-variables" style-ref="special-variable">
-      <!-- Section 7.2 -->
+      <!-- Section 7.1 (geometry language) -->
+      <keyword>gl_PrimitiveIDIn</keyword>
+      <keyword>gl_InvocationID</keyword>
+      <keyword>gl_PrimitiveID</keyword>
+      <keyword>gl_Layer</keyword>
+      <!-- Section 7.1 (tessellation control language) -->
+      <keyword>gl_PatchVerticesIn</keyword>
+      <keyword>gl_TessLevelOuter</keyword>
+      <keyword>gl_TessLevelInner</keyword>
+      <!-- Section 7.1 (tessellation evaluation language) -->
+      <keyword>gl_TessCoord</keyword>
+      <!-- Section 7.1 (fragment language) -->
       <keyword>gl_FragCoord</keyword>
       <keyword>gl_FrontFacing</keyword>
-      <keyword>gl_ClipDistance</keyword>
+      <keyword>gl_PointCoord</keyword>
+      <keyword>gl_SampleID</keyword>
+      <keyword>gl_SamplePosition</keyword>
       <keyword>gl_FragColor</keyword>
       <keyword>gl_FragData</keyword>
       <keyword>gl_FragDepth</keyword>
-    </context>
-
-    <context id="builtin-vertex-attributes" style-ref="special-variable">
-      <!-- Section 7.3 -->
+      <keyword>gl_SampleMask</keyword>
+      <!-- Section 7.1.1 (compatibility profile) -->
+      <keyword>gl_ClipVertex</keyword>
+      <keyword>gl_FrontColor</keyword>
+      <keyword>gl_BackColor</keyword>
+      <keyword>gl_FrontSecondaryColor</keyword>
+      <keyword>gl_BackSecondaryColor</keyword>
+      <keyword>gl_TexCoord</keyword>
+      <keyword>gl_FogFragCoord</keyword>
+      <!-- Section 7.2 (compatibility profile vertex attributes) -->
       <keyword>gl_Color</keyword>
       <keyword>gl_SecondaryColor</keyword>
       <keyword>gl_Normal</keyword>
@@ -296,22 +362,46 @@
     </context>
 
     <context id="builtin-constants" style-ref="builtin-constant">
-      <!-- Section 7.4 -->
-      <keyword>gl_MaxTextureUnits</keyword>
+      <!-- Section 7.3 -->
       <keyword>gl_MaxVertexAttribs</keyword>
       <keyword>gl_MaxVertexUniformComponents</keyword>
       <keyword>gl_MaxVaryingFloats</keyword>
       <keyword>gl_MaxVaryingComponents</keyword>
+      <keyword>gl_MaxVertexOutputComponents</keyword>
+      <keyword>gl_MaxGeometryInputComponents</keyword>
+      <keyword>gl_MaxGeometryOutputComponents</keyword>
+      <keyword>gl_MaxFragmentInputComponents</keyword>
       <keyword>gl_MaxVertexTextureImageUnits</keyword>
       <keyword>gl_MaxCombinedTextureImageUnits</keyword>
       <keyword>gl_MaxTextureImageUnits</keyword>
       <keyword>gl_MaxFragmentUniformComponents</keyword>
       <keyword>gl_MaxDrawBuffers</keyword>
       <keyword>gl_MaxClipDistances</keyword>
+      <keyword>gl_MaxGeometryTextureImageUnits</keyword>
+      <keyword>gl_MaxGeometryOutputVertices</keyword>
+      <keyword>gl_MaxGeometryTotalOutputComponents</keyword>
+      <keyword>gl_MaxGeometryUniformComponents</keyword>
+      <keyword>gl_MaxGeometryVaryingComponents</keyword>
+      <keyword>gl_MaxTessControlInputComponents</keyword>
+      <keyword>gl_MaxTessControlOutputComponents</keyword>
+      <keyword>gl_MaxTessControlTextureImageUnits</keyword>
+      <keyword>gl_MaxTessControlUniformComponents</keyword>
+      <keyword>gl_MaxTessControlTotalOutputComponents</keyword>
+      <keyword>gl_MaxTessEvaluationInputComponents</keyword>
+      <keyword>gl_MaxTessEvaluationOutputComponents</keyword>
+      <keyword>gl_MaxTessEvaluationTextureImageUnits</keyword>
+      <keyword>gl_MaxTessEvaluationUniformComponents</keyword>
+      <keyword>gl_MaxTessPatchComponents</keyword>
+      <keyword>gl_MaxPatchVertices</keyword>
+      <keyword>gl_MaxTessGenLevel</keyword>
+      <!-- Section 7.3.1 (compatibility profile) -->
+      <keyword>gl_MaxTextureUnits</keyword>
+      <keyword>gl_MaxTextureCoords</keyword>
+      <keyword>gl_MaxClipPlanes</keyword>
     </context>
 
     <context id="builtin-uniform-states" style-ref="builtin-constant">
-      <!-- Section 7.5 -->
+      <!-- Section 7.4 -->
       <keyword>gl_DepthRange</keyword>
 
       <keyword>gl_ModelViewMatrix</keyword>
@@ -365,18 +455,6 @@
       <keyword>gl_Fog</keyword>
     </context>
 
-    <context id="builtin-varyings" style-ref="special-variable">
-      <!-- Section 7.6 -->
-      <keyword>gl_PointCoord</keyword>
-
-      <keyword>gl_FrontColor</keyword>
-      <keyword>gl_BackColor</keyword>
-      <keyword>gl_FrontSecondaryColor</keyword>
-      <keyword>gl_BackSecondaryColor</keyword>
-      <keyword>gl_TexCoord</keyword>
-      <keyword>gl_FogFragCoord</keyword>
-    </context>
-
     <context id="glsl">
       <include>
         <context ref="c:comment"/>
@@ -393,12 +471,9 @@
         <context ref="c:hexadecimal"/>
         <context ref="c:float"/>
         <context ref="builtin-functions"/>
-        <context ref="vertex-shader-special-variables"/>
-        <context ref="fragment-shader-special-variables"/>
-        <context ref="builtin-vertex-attributes"/>
+        <context ref="builtin-variables"/>
         <context ref="builtin-constants"/>
         <context ref="builtin-uniform-states"/>
-        <context ref="builtin-varyings"/>
         <context ref="reserved-keywords-for-future-use"/>
       </include>
     </context>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]