1# Copyright © 2013 Intel Corporation 2# SPDX-License-Identifier: MIT 3 4BUILTIN_TYPES = [] 5 6def simple_type(name, gl_type, base_type, rows, cols): 7 BUILTIN_TYPES.append({ 8 "name": name, 9 "gl_type": gl_type, 10 "base_type": base_type, 11 "vector_elements": rows, 12 "matrix_columns": cols, 13 }) 14 15def sampler_type(name, gl_type, base_type, dim, shadow, array, sampled_type): 16 BUILTIN_TYPES.append({ 17 "name": name, 18 "gl_type": gl_type, 19 "base_type": base_type, 20 "sampler_dimensionality": dim, 21 "sampler_shadow": shadow, 22 "sampler_array": array, 23 "sampled_type": sampled_type, 24 "vector_elements": 1, 25 "matrix_columns": 1, 26 }) 27 28def vector_type(base_name, vec_name, base_type, gl_type, extra_gl_type=None): 29 if extra_gl_type is None: 30 extra_gl_type = "" 31 simple_type(base_name, gl_type + extra_gl_type, base_type, 1, 1) 32 simple_type(vec_name + "2", gl_type + "_VEC2" + extra_gl_type, base_type, 2, 1) 33 simple_type(vec_name + "3", gl_type + "_VEC3" + extra_gl_type, base_type, 3, 1) 34 simple_type(vec_name + "4", gl_type + "_VEC4" + extra_gl_type, base_type, 4, 1) 35 simple_type(vec_name + "5", None, base_type, 5, 1) 36 simple_type(vec_name + "8", None, base_type, 8, 1) 37 simple_type(vec_name + "16", None, base_type, 16, 1) 38 39simple_type("error", "GL_INVALID_ENUM", "GLSL_TYPE_ERROR", 0, 0) 40simple_type("void", "GL_INVALID_ENUM", "GLSL_TYPE_VOID", 0, 0) 41 42vector_type("bool", "bvec", "GLSL_TYPE_BOOL", "GL_BOOL") 43vector_type("int", "ivec", "GLSL_TYPE_INT", "GL_INT") 44vector_type("uint", "uvec", "GLSL_TYPE_UINT", "GL_UNSIGNED_INT") 45vector_type("float", "vec", "GLSL_TYPE_FLOAT", "GL_FLOAT") 46vector_type("float16_t", "f16vec", "GLSL_TYPE_FLOAT16", "GL_FLOAT16", "_NV") 47vector_type("double", "dvec", "GLSL_TYPE_DOUBLE", "GL_DOUBLE") 48vector_type("int64_t", "i64vec", "GLSL_TYPE_INT64", "GL_INT64", "_ARB") 49vector_type("uint64_t", "u64vec", "GLSL_TYPE_UINT64", "GL_UNSIGNED_INT64", "_ARB") 50vector_type("int16_t", "i16vec", "GLSL_TYPE_INT16", "GL_INT16", "_NV") 51vector_type("uint16_t", "u16vec", "GLSL_TYPE_UINT16", "GL_UNSIGNED_INT16", "_NV") 52vector_type("int8_t", "i8vec", "GLSL_TYPE_INT8", "GL_INT8", "_NV") 53vector_type("uint8_t", "u8vec", "GLSL_TYPE_UINT8", "GL_UNSIGNED_INT8", "_NV") 54 55simple_type("mat2", "GL_FLOAT_MAT2", "GLSL_TYPE_FLOAT", 2, 2) 56simple_type("mat3", "GL_FLOAT_MAT3", "GLSL_TYPE_FLOAT", 3, 3) 57simple_type("mat4", "GL_FLOAT_MAT4", "GLSL_TYPE_FLOAT", 4, 4) 58 59simple_type("mat2x3", "GL_FLOAT_MAT2x3", "GLSL_TYPE_FLOAT", 3, 2) 60simple_type("mat2x4", "GL_FLOAT_MAT2x4", "GLSL_TYPE_FLOAT", 4, 2) 61simple_type("mat3x2", "GL_FLOAT_MAT3x2", "GLSL_TYPE_FLOAT", 2, 3) 62simple_type("mat3x4", "GL_FLOAT_MAT3x4", "GLSL_TYPE_FLOAT", 4, 3) 63simple_type("mat4x2", "GL_FLOAT_MAT4x2", "GLSL_TYPE_FLOAT", 2, 4) 64simple_type("mat4x3", "GL_FLOAT_MAT4x3", "GLSL_TYPE_FLOAT", 3, 4) 65 66simple_type("f16mat2", "GL_FLOAT16_MAT2_AMD", "GLSL_TYPE_FLOAT16", 2, 2) 67simple_type("f16mat3", "GL_FLOAT16_MAT3_AMD", "GLSL_TYPE_FLOAT16", 3, 3) 68simple_type("f16mat4", "GL_FLOAT16_MAT4_AMD", "GLSL_TYPE_FLOAT16", 4, 4) 69 70simple_type("f16mat2x3", "GL_FLOAT16_MAT2x3_AMD", "GLSL_TYPE_FLOAT16", 3, 2) 71simple_type("f16mat2x4", "GL_FLOAT16_MAT2x4_AMD", "GLSL_TYPE_FLOAT16", 4, 2) 72simple_type("f16mat3x2", "GL_FLOAT16_MAT3x2_AMD", "GLSL_TYPE_FLOAT16", 2, 3) 73simple_type("f16mat3x4", "GL_FLOAT16_MAT3x4_AMD", "GLSL_TYPE_FLOAT16", 4, 3) 74simple_type("f16mat4x2", "GL_FLOAT16_MAT4x2_AMD", "GLSL_TYPE_FLOAT16", 2, 4) 75simple_type("f16mat4x3", "GL_FLOAT16_MAT4x3_AMD", "GLSL_TYPE_FLOAT16", 3, 4) 76 77simple_type("dmat2", "GL_DOUBLE_MAT2", "GLSL_TYPE_DOUBLE", 2, 2) 78simple_type("dmat3", "GL_DOUBLE_MAT3", "GLSL_TYPE_DOUBLE", 3, 3) 79simple_type("dmat4", "GL_DOUBLE_MAT4", "GLSL_TYPE_DOUBLE", 4, 4) 80 81simple_type("dmat2x3", "GL_DOUBLE_MAT2x3", "GLSL_TYPE_DOUBLE", 3, 2) 82simple_type("dmat2x4", "GL_DOUBLE_MAT2x4", "GLSL_TYPE_DOUBLE", 4, 2) 83simple_type("dmat3x2", "GL_DOUBLE_MAT3x2", "GLSL_TYPE_DOUBLE", 2, 3) 84simple_type("dmat3x4", "GL_DOUBLE_MAT3x4", "GLSL_TYPE_DOUBLE", 4, 3) 85simple_type("dmat4x2", "GL_DOUBLE_MAT4x2", "GLSL_TYPE_DOUBLE", 2, 4) 86simple_type("dmat4x3", "GL_DOUBLE_MAT4x3", "GLSL_TYPE_DOUBLE", 3, 4) 87 88simple_type("atomic_uint", "GL_UNSIGNED_INT_ATOMIC_COUNTER", "GLSL_TYPE_ATOMIC_UINT", 1, 1) 89 90sampler_type("sampler", "GL_SAMPLER_1D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") 91sampler_type("sampler1D", "GL_SAMPLER_1D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_FLOAT") 92sampler_type("sampler2D", "GL_SAMPLER_2D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_FLOAT") 93sampler_type("sampler3D", "GL_SAMPLER_3D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_FLOAT") 94sampler_type("samplerCube", "GL_SAMPLER_CUBE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_FLOAT") 95sampler_type("sampler1DArray", "GL_SAMPLER_1D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_FLOAT") 96sampler_type("sampler2DArray", "GL_SAMPLER_2D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_FLOAT") 97sampler_type("samplerCubeArray", "GL_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_FLOAT") 98sampler_type("sampler2DRect", "GL_SAMPLER_2D_RECT", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_FLOAT") 99sampler_type("samplerBuffer", "GL_SAMPLER_BUFFER", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_FLOAT") 100sampler_type("sampler2DMS", "GL_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_FLOAT") 101sampler_type("sampler2DMSArray", "GL_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_FLOAT") 102 103sampler_type("isampler1D", "GL_INT_SAMPLER_1D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_INT") 104sampler_type("isampler2D", "GL_INT_SAMPLER_2D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_INT") 105sampler_type("isampler3D", "GL_INT_SAMPLER_3D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_INT") 106sampler_type("isamplerCube", "GL_INT_SAMPLER_CUBE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_INT") 107sampler_type("isampler1DArray", "GL_INT_SAMPLER_1D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_INT") 108sampler_type("isampler2DArray", "GL_INT_SAMPLER_2D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_INT") 109sampler_type("isamplerCubeArray", "GL_INT_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_INT") 110sampler_type("isampler2DRect", "GL_INT_SAMPLER_2D_RECT", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_INT") 111sampler_type("isamplerBuffer", "GL_INT_SAMPLER_BUFFER", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_INT") 112sampler_type("isampler2DMS", "GL_INT_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_INT") 113sampler_type("isampler2DMSArray", "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_INT") 114 115sampler_type("usampler1D", "GL_UNSIGNED_INT_SAMPLER_1D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_UINT") 116sampler_type("usampler2D", "GL_UNSIGNED_INT_SAMPLER_2D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_UINT") 117sampler_type("usampler3D", "GL_UNSIGNED_INT_SAMPLER_3D", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_UINT") 118sampler_type("usamplerCube", "GL_UNSIGNED_INT_SAMPLER_CUBE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_UINT") 119sampler_type("usampler1DArray", "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_UINT") 120sampler_type("usampler2DArray", "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_UINT") 121sampler_type("usamplerCubeArray", "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_UINT") 122sampler_type("usampler2DRect", "GL_UNSIGNED_INT_SAMPLER_2D_RECT", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_UINT") 123sampler_type("usamplerBuffer", "GL_UNSIGNED_INT_SAMPLER_BUFFER", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_UINT") 124sampler_type("usampler2DMS", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_UINT") 125sampler_type("usampler2DMSArray", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_UINT") 126 127sampler_type("samplerShadow", "GL_SAMPLER_1D_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 1, 0, "GLSL_TYPE_VOID") 128sampler_type("sampler1DShadow", "GL_SAMPLER_1D_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 1, 0, "GLSL_TYPE_FLOAT") 129sampler_type("sampler2DShadow", "GL_SAMPLER_2D_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 1, 0, "GLSL_TYPE_FLOAT") 130sampler_type("samplerCubeShadow", "GL_SAMPLER_CUBE_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 1, 0, "GLSL_TYPE_FLOAT") 131sampler_type("sampler1DArrayShadow", "GL_SAMPLER_1D_ARRAY_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_1D", 1, 1, "GLSL_TYPE_FLOAT") 132sampler_type("sampler2DArrayShadow", "GL_SAMPLER_2D_ARRAY_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_2D", 1, 1, "GLSL_TYPE_FLOAT") 133sampler_type("samplerCubeArrayShadow", "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_CUBE", 1, 1, "GLSL_TYPE_FLOAT") 134sampler_type("sampler2DRectShadow", "GL_SAMPLER_2D_RECT_SHADOW", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_RECT", 1, 0, "GLSL_TYPE_FLOAT") 135 136sampler_type("samplerExternalOES", "GL_SAMPLER_EXTERNAL_OES", "GLSL_TYPE_SAMPLER", "GLSL_SAMPLER_DIM_EXTERNAL", 0, 0, "GLSL_TYPE_FLOAT") 137 138sampler_type("texture1D", "GL_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_FLOAT") 139sampler_type("texture2D", "GL_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_FLOAT") 140sampler_type("texture3D", "GL_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_FLOAT") 141sampler_type("textureCube", "GL_SAMPLER_CUBE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_FLOAT") 142sampler_type("texture1DArray", "GL_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_FLOAT") 143sampler_type("texture2DArray", "GL_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_FLOAT") 144sampler_type("textureCubeArray", "GL_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_FLOAT") 145sampler_type("texture2DRect", "GL_SAMPLER_2D_RECT", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_FLOAT") 146sampler_type("textureBuffer", "GL_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_FLOAT") 147sampler_type("texture2DMS", "GL_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_FLOAT") 148sampler_type("texture2DMSArray", "GL_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_FLOAT") 149 150sampler_type("itexture1D", "GL_INT_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_INT") 151sampler_type("itexture2D", "GL_INT_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_INT") 152sampler_type("itexture3D", "GL_INT_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_INT") 153sampler_type("itextureCube", "GL_INT_SAMPLER_CUBE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_INT") 154sampler_type("itexture1DArray", "GL_INT_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_INT") 155sampler_type("itexture2DArray", "GL_INT_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_INT") 156sampler_type("itextureCubeArray", "GL_INT_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_INT") 157sampler_type("itexture2DRect", "GL_INT_SAMPLER_2D_RECT", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_INT") 158sampler_type("itextureBuffer", "GL_INT_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_INT") 159sampler_type("itexture2DMS", "GL_INT_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_INT") 160sampler_type("itexture2DMSArray", "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_INT") 161 162sampler_type("utexture1D", "GL_UNSIGNED_INT_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_UINT") 163sampler_type("utexture2D", "GL_UNSIGNED_INT_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_UINT") 164sampler_type("utexture3D", "GL_UNSIGNED_INT_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_UINT") 165sampler_type("utextureCube", "GL_UNSIGNED_INT_SAMPLER_CUBE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_UINT") 166sampler_type("utexture1DArray", "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_UINT") 167sampler_type("utexture2DArray", "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_UINT") 168sampler_type("utextureCubeArray", "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_UINT") 169sampler_type("utexture2DRect", "GL_UNSIGNED_INT_SAMPLER_2D_RECT", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_UINT") 170sampler_type("utextureBuffer", "GL_UNSIGNED_INT_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_UINT") 171sampler_type("utexture2DMS", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_UINT") 172sampler_type("utexture2DMSArray", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_UINT") 173 174sampler_type("textureExternalOES", "GL_SAMPLER_EXTERNAL_OES", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_EXTERNAL", 0, 0, "GLSL_TYPE_FLOAT") 175 176# OpenCL image types 177sampler_type("vtexture1D", "GL_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") 178sampler_type("vtexture2D", "GL_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") 179sampler_type("vtexture3D", "GL_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") 180sampler_type("vtexture2DMS", "GL_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_VOID") 181sampler_type("vtexture2DMSArray", "GL_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_VOID") 182sampler_type("vtexture1DArray", "GL_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") 183sampler_type("vtexture2DArray", "GL_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") 184sampler_type("vtextureBuffer", "GL_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") 185 186sampler_type("image1D", "GL_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_FLOAT") 187sampler_type("image2D", "GL_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_FLOAT") 188sampler_type("image3D", "GL_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_FLOAT") 189sampler_type("image2DRect", "GL_IMAGE_2D_RECT", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_FLOAT") 190sampler_type("imageCube", "GL_IMAGE_CUBE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_FLOAT") 191sampler_type("imageBuffer", "GL_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_FLOAT") 192sampler_type("image1DArray", "GL_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_FLOAT") 193sampler_type("image2DArray", "GL_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_FLOAT") 194sampler_type("imageCubeArray", "GL_IMAGE_CUBE_MAP_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_FLOAT") 195sampler_type("image2DMS", "GL_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_FLOAT") 196sampler_type("image2DMSArray", "GL_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_FLOAT") 197sampler_type("iimage1D", "GL_INT_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_INT") 198sampler_type("iimage2D", "GL_INT_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_INT") 199sampler_type("iimage3D", "GL_INT_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_INT") 200sampler_type("iimage2DRect", "GL_INT_IMAGE_2D_RECT", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_INT") 201sampler_type("iimageCube", "GL_INT_IMAGE_CUBE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_INT") 202sampler_type("iimageBuffer", "GL_INT_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_INT") 203sampler_type("iimage1DArray", "GL_INT_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_INT") 204sampler_type("iimage2DArray", "GL_INT_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_INT") 205sampler_type("iimageCubeArray", "GL_INT_IMAGE_CUBE_MAP_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_INT") 206sampler_type("iimage2DMS", "GL_INT_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_INT") 207sampler_type("iimage2DMSArray", "GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_INT") 208sampler_type("uimage1D", "GL_UNSIGNED_INT_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_UINT") 209sampler_type("uimage2D", "GL_UNSIGNED_INT_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_UINT") 210sampler_type("uimage3D", "GL_UNSIGNED_INT_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_UINT") 211sampler_type("uimage2DRect", "GL_UNSIGNED_INT_IMAGE_2D_RECT", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_UINT") 212sampler_type("uimageCube", "GL_UNSIGNED_INT_IMAGE_CUBE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_UINT") 213sampler_type("uimageBuffer", "GL_UNSIGNED_INT_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_UINT") 214sampler_type("uimage1DArray", "GL_UNSIGNED_INT_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_UINT") 215sampler_type("uimage2DArray", "GL_UNSIGNED_INT_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_UINT") 216sampler_type("uimageCubeArray", "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_UINT") 217sampler_type("uimage2DMS", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_UINT") 218sampler_type("uimage2DMSArray", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_UINT") 219sampler_type("i64image1D", "GL_INT_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_INT64") 220sampler_type("i64image2D", "GL_INT_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_INT64") 221sampler_type("i64image3D", "GL_INT_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_INT64") 222sampler_type("i64image2DRect", "GL_INT_IMAGE_2D_RECT", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_INT64") 223sampler_type("i64imageCube", "GL_INT_IMAGE_CUBE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_INT64") 224sampler_type("i64imageBuffer", "GL_INT_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_INT64") 225sampler_type("i64image1DArray", "GL_INT_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_INT64") 226sampler_type("i64image2DArray", "GL_INT_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_INT64") 227sampler_type("i64imageCubeArray", "GL_INT_IMAGE_CUBE_MAP_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_INT64") 228sampler_type("i64image2DMS", "GL_INT_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_INT64") 229sampler_type("i64image2DMSArray", "GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_INT64") 230sampler_type("u64image1D", "GL_UNSIGNED_INT_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_UINT64") 231sampler_type("u64image2D", "GL_UNSIGNED_INT_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_UINT64") 232sampler_type("u64image3D", "GL_UNSIGNED_INT_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_UINT64") 233sampler_type("u64image2DRect", "GL_UNSIGNED_INT_IMAGE_2D_RECT", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_RECT", 0, 0, "GLSL_TYPE_UINT64") 234sampler_type("u64imageCube", "GL_UNSIGNED_INT_IMAGE_CUBE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 0, "GLSL_TYPE_UINT64") 235sampler_type("u64imageBuffer", "GL_UNSIGNED_INT_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_UINT64") 236sampler_type("u64image1DArray", "GL_UNSIGNED_INT_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_UINT64") 237sampler_type("u64image2DArray", "GL_UNSIGNED_INT_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_UINT64") 238sampler_type("u64imageCubeArray", "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_CUBE", 0, 1, "GLSL_TYPE_UINT64") 239sampler_type("u64image2DMS", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_UINT64") 240sampler_type("u64image2DMSArray", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_UINT64") 241 242# OpenCL image types 243sampler_type("vbuffer", "GL_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") 244sampler_type("vimage1D", "GL_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") 245sampler_type("vimage2D", "GL_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") 246sampler_type("vimage3D", "GL_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") 247sampler_type("vimage2DMS", "GL_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_VOID") 248sampler_type("vimage2DMSArray", "GL_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_VOID") 249sampler_type("vimage1DArray", "GL_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") 250sampler_type("vimage2DArray", "GL_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") 251 252sampler_type("subpassInput", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_FLOAT") 253sampler_type("subpassInputMS", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_FLOAT") 254sampler_type("isubpassInput", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_INT") 255sampler_type("isubpassInputMS", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_INT") 256sampler_type("usubpassInput", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_UINT") 257sampler_type("usubpassInputMS", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_UINT") 258sampler_type("textureSubpassInput", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_FLOAT") 259sampler_type("textureSubpassInputMS", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_FLOAT") 260sampler_type("itextureSubpassInput", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_INT") 261sampler_type("itextureSubpassInputMS", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_INT") 262sampler_type("utextureSubpassInput", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_UINT") 263sampler_type("utextureSubpassInputMS", "0", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_UINT") 264