glsl: Add missing semicolon in the grammar
[mesa.git] / src / glsl / builtin_types.h
index 8ccbf6e312f7b61b7cbcd1af8aca7bc7e4d6ae31..a4c995fd15a05b40a7140f956e22bb492d4a7327 100644 (file)
@@ -27,6 +27,15 @@ const glsl_type glsl_type::_error_type =
 const glsl_type glsl_type::_void_type =
    glsl_type(GL_INVALID_ENUM, GLSL_TYPE_VOID, 0, 0, "void");
 
+const glsl_type glsl_type::_sampler3D_type =
+   glsl_type(GL_SAMPLER_3D, GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
+            "sampler3D");
+
+const glsl_type glsl_type::_samplerCubeShadow_type =
+   glsl_type(GL_SAMPLER_CUBE_SHADOW,
+            GLSL_SAMPLER_DIM_CUBE, 1, 0, GLSL_TYPE_FLOAT,
+             "samplerCubeShadow");
+
 const glsl_type *const glsl_type::error_type = & glsl_type::_error_type;
 const glsl_type *const glsl_type::void_type = & glsl_type::_void_type;
 
@@ -59,7 +68,12 @@ const glsl_type glsl_type::builtin_core_types[] = {
 };
 
 const glsl_type *const glsl_type::bool_type  = & builtin_core_types[0];
+const glsl_type *const glsl_type::bvec2_type = & builtin_core_types[1];
+const glsl_type *const glsl_type::bvec3_type = & builtin_core_types[2];
+const glsl_type *const glsl_type::bvec4_type = & builtin_core_types[3];
 const glsl_type *const glsl_type::int_type   = & builtin_core_types[4];
+const glsl_type *const glsl_type::ivec2_type = & builtin_core_types[5];
+const glsl_type *const glsl_type::ivec3_type = & builtin_core_types[6];
 const glsl_type *const glsl_type::ivec4_type = & builtin_core_types[7];
 const glsl_type *const glsl_type::float_type = & builtin_core_types[8];
 const glsl_type *const glsl_type::vec2_type = & builtin_core_types[9];
@@ -181,8 +195,6 @@ const glsl_type glsl_type::builtin_110_types[] = {
             "sampler1DShadow"),
    glsl_type(GL_SAMPLER_2D_SHADOW, GLSL_SAMPLER_DIM_2D, 1, 0, GLSL_TYPE_FLOAT,
             "sampler2DShadow"),
-   glsl_type(GL_SAMPLER_3D,   GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
-            "sampler3D"),
 };
 /*@}*/
 
@@ -257,6 +269,18 @@ const glsl_type *const glsl_type::uvec3_type = & builtin_130_types[2];
 const glsl_type *const glsl_type::uvec4_type = & builtin_130_types[3];
 /*@}*/
 
+
+/** \name Types added in GLSL 1.40
+ */
+/*@{*/
+const glsl_type glsl_type::builtin_140_types[] = {
+   glsl_type(GL_INT_SAMPLER_2D_RECT,
+            GLSL_SAMPLER_DIM_RECT, 0, 0, GLSL_TYPE_INT, "isampler2DRect"),
+   glsl_type(GL_UNSIGNED_INT_SAMPLER_2D_RECT,
+            GLSL_SAMPLER_DIM_RECT, 0, 0, GLSL_TYPE_UINT, "usampler2DRect"),
+};
+/*@}*/
+
 /** \name Sampler types added by GL_ARB_texture_rectangle
  */
 /*@{*/
@@ -298,3 +322,28 @@ const glsl_type glsl_type::builtin_EXT_texture_buffer_object_types[] = {
             GLSL_SAMPLER_DIM_BUF, 0, 0,  GLSL_TYPE_UINT, "usamplerBuffer"),
 };
 /*@}*/
+
+/** \name Sampler types added by GL_OES_EGL_image_external
+ */
+/*@{*/
+
+const glsl_type glsl_type::builtin_OES_EGL_image_external_types[] = {
+   glsl_type(GL_SAMPLER_EXTERNAL_OES,
+            GLSL_SAMPLER_DIM_EXTERNAL, 0, 0, GLSL_TYPE_FLOAT, "samplerExternalOES"),
+};
+/*@}*/
+
+/** \name Sampler types added by GL_ARB_texture_cube_map_array
+ */
+/*@{*/
+const glsl_type glsl_type::builtin_ARB_texture_cube_map_array_types[] = {
+   glsl_type(GL_SAMPLER_CUBE_MAP_ARRAY,
+            GLSL_SAMPLER_DIM_CUBE, 0, 1, GLSL_TYPE_FLOAT, "samplerCubeArray"),
+   glsl_type(GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW,
+            GLSL_SAMPLER_DIM_CUBE, 1, 1, GLSL_TYPE_FLOAT, "samplerCubeArrayShadow"),
+   glsl_type(GL_INT_SAMPLER_CUBE_MAP_ARRAY,
+            GLSL_SAMPLER_DIM_CUBE, 0, 1, GLSL_TYPE_INT, "isamplerCubeArray"),
+   glsl_type(GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY,
+            GLSL_SAMPLER_DIM_CUBE, 0, 1, GLSL_TYPE_UINT, "usamplerCubeArray"),
+};
+/*@}*/