translator: Add ES3.1 multisample texture support.
Implement shader objects, [iu]sampler2DMS, textureSize(gsampler2DMS).
as well as texelFetch(gsampler2DMS,P,sample) for the glsl.
BUG=angleproject:1590
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I781023f7bec34ad0264af69f34bb182b50bd1fbd
Reviewed-on: https://chromium-review.googlesource.com/423175
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index b369223..fa767e0 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -373,6 +373,7 @@
const TType *gsamplerCube = TCache::getType(EbtGSamplerCube);
const TType *gsampler3D = TCache::getType(EbtGSampler3D);
const TType *gsampler2DArray = TCache::getType(EbtGSampler2DArray);
+ const TType *gsampler2DMS = TCache::getType(EbtGSampler2DMS);
//
// Texture Functions for GLSL ES 3.0
@@ -452,6 +453,7 @@
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "textureSize", sampler2DShadow, int1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "textureSize", samplerCubeShadow, int1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int3, "textureSize", sampler2DArrayShadow, int1);
+ symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "textureSize", gsampler2DMS);
if (resources.OES_EGL_image_external_essl3)
{
@@ -620,6 +622,8 @@
symbolTable.insertBuiltInFunctionNoParameters(ESSL3_1_BUILTINS, EOpMemoryBarrierImage, voidType,
"memoryBarrierImage");
+ symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, gvec4, "texelFetch", gsampler2DMS, int2, int1);
+
if (type == GL_COMPUTE_SHADER)
{
symbolTable.insertBuiltInFunctionNoParameters(ESSL3_1_BUILTINS, EOpBarrier, voidType,