diff --git a/src/compiler/builtin_type_macros.h b/src/compiler/builtin_type_macros.h index 630600e09fb..aa929d4f500 100644 --- a/src/compiler/builtin_type_macros.h +++ b/src/compiler/builtin_type_macros.h @@ -169,6 +169,8 @@ DECL_TYPE(utextureBuffer, GL_UNSIGNED_INT_SAMPLER_BUFFER, GLSL_ DECL_TYPE(utexture2DMS, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_MS, 0, 0, GLSL_TYPE_UINT) DECL_TYPE(utexture2DMSArray, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_MS, 0, 1, GLSL_TYPE_UINT) +DECL_TYPE(textureExternalOES, GL_SAMPLER_EXTERNAL_OES, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_EXTERNAL, 0, 0, GLSL_TYPE_FLOAT) + /* OpenCL image types */ DECL_TYPE(vtexture1D, GL_SAMPLER_1D, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_VOID) DECL_TYPE(vtexture2D, GL_SAMPLER_2D, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_VOID) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index de98b80354d..8c827a5f28f 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -983,7 +983,10 @@ glsl_type::get_texture_instance(enum glsl_sampler_dim dim, case GLSL_SAMPLER_DIM_SUBPASS_MS: return subpassInputMS_type; case GLSL_SAMPLER_DIM_EXTERNAL: - return error_type; + if (array) + return error_type; + else + return textureExternalOES_type; } case GLSL_TYPE_INT: switch (dim) {