diff --git a/src/compiler/builtin_types.py b/src/compiler/builtin_types.py index f0293a120ab..a8530e9aeeb 100644 --- a/src/compiler/builtin_types.py +++ b/src/compiler/builtin_types.py @@ -174,12 +174,14 @@ sampler_type("utexture2DMSArray", "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY" sampler_type("textureExternalOES", "GL_SAMPLER_EXTERNAL_OES", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_EXTERNAL", 0, 0, "GLSL_TYPE_FLOAT") # OpenCL image types -sampler_type("vtexture1D", "GL_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vtexture2D", "GL_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vtexture3D", "GL_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vtexture1DArray", "GL_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") -sampler_type("vtexture2DArray", "GL_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") -sampler_type("vtextureBuffer", "GL_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vtexture1D", "GL_SAMPLER_1D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vtexture2D", "GL_SAMPLER_2D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vtexture3D", "GL_SAMPLER_3D", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vtexture2DMS", "GL_SAMPLER_2D_MULTISAMPLE", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vtexture2DMSArray", "GL_SAMPLER_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vtexture1DArray", "GL_SAMPLER_1D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vtexture2DArray", "GL_SAMPLER_2D_ARRAY", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vtextureBuffer", "GL_SAMPLER_BUFFER", "GLSL_TYPE_TEXTURE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") sampler_type("image1D", "GL_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_FLOAT") sampler_type("image2D", "GL_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_FLOAT") @@ -238,12 +240,14 @@ sampler_type("u64image2DMS", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE", "G sampler_type("u64image2DMSArray", "GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_UINT64") # OpenCL image types -sampler_type("vbuffer", "GL_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vimage1D", "GL_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vimage2D", "GL_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vimage3D", "GL_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") -sampler_type("vimage1DArray", "GL_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") -sampler_type("vimage2DArray", "GL_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vbuffer", "GL_IMAGE_BUFFER", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_BUF", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vimage1D", "GL_IMAGE_1D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vimage2D", "GL_IMAGE_2D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vimage3D", "GL_IMAGE_3D", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_3D", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vimage2DMS", "GL_IMAGE_2D_MULTISAMPLE", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 0, "GLSL_TYPE_VOID") +sampler_type("vimage2DMSArray", "GL_IMAGE_2D_MULTISAMPLE_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_MS", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vimage1DArray", "GL_IMAGE_1D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_1D", 0, 1, "GLSL_TYPE_VOID") +sampler_type("vimage2DArray", "GL_IMAGE_2D_ARRAY", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_2D", 0, 1, "GLSL_TYPE_VOID") sampler_type("subpassInput", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS", 0, 0, "GLSL_TYPE_FLOAT") sampler_type("subpassInputMS", "0", "GLSL_TYPE_IMAGE", "GLSL_SAMPLER_DIM_SUBPASS_MS", 0, 0, "GLSL_TYPE_FLOAT") diff --git a/src/compiler/glsl_types.c b/src/compiler/glsl_types.c index 808a3cb40f2..ef4b3698a4e 100644 --- a/src/compiler/glsl_types.c +++ b/src/compiler/glsl_types.c @@ -1053,6 +1053,8 @@ glsl_texture_type(enum glsl_sampler_dim dim, bool array, enum glsl_base_type typ return (array ? &glsl_type_builtin_error : &glsl_type_builtin_vtexture3D); case GLSL_SAMPLER_DIM_BUF: return (array ? &glsl_type_builtin_error : &glsl_type_builtin_vtextureBuffer); + case GLSL_SAMPLER_DIM_MS: + return (array ? &glsl_type_builtin_vtexture2DMSArray : &glsl_type_builtin_vtexture2DMS); default: return &glsl_type_builtin_error; } @@ -1223,6 +1225,8 @@ glsl_image_type(enum glsl_sampler_dim dim, bool array, enum glsl_base_type type) return (array ? &glsl_type_builtin_error : &glsl_type_builtin_vimage3D); case GLSL_SAMPLER_DIM_BUF: return (array ? &glsl_type_builtin_error : &glsl_type_builtin_vbuffer); + case GLSL_SAMPLER_DIM_MS: + return (array ? &glsl_type_builtin_vimage2DMSArray : &glsl_type_builtin_vimage2DMS); default: return &glsl_type_builtin_error; }