aboutsummaryrefslogtreecommitdiff
path: root/glslang/MachineIndependent/ParseHelper.cpp
diff options
context:
space:
mode:
authorJohn Kessenich <cepheus@frii.com>2013-11-11 23:29:59 +0000
committerJohn Kessenich <cepheus@frii.com>2013-11-11 23:29:59 +0000
commitbd1a5b7727ea8f7c49c4515576e0e54c53b697bb (patch)
tree0a0d298c24d09dbe4a0358bd909107ef8a89bd44 /glslang/MachineIndependent/ParseHelper.cpp
parent99296369d308f7573966c30de12026b4c7e49983 (diff)
downloadglslang-bd1a5b7727ea8f7c49c4515576e0e54c53b697bb.tar.gz
Add GL_OES_EGL_image_external. Includes new keyword, type, name mangling, built-in function calls, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24007 e7fa87d3-cd2b-0410-9028-fcbf551c1848
Diffstat (limited to 'glslang/MachineIndependent/ParseHelper.cpp')
-rw-r--r--glslang/MachineIndependent/ParseHelper.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index e9dc7b17..29c21129 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -74,6 +74,9 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb,
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
sampler.set(EbtFloat, EsdCube);
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
+ sampler.set(EbtFloat, Esd2D);
+ sampler.external = true;
+ defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
switch (language) {
case EShLangFragment:
@@ -1715,10 +1718,11 @@ void TParseContext::setDefaultPrecision(TSourceLoc loc, TPublicType& publicType,
// correlates with the declaration of defaultSamplerPrecision[]
int TParseContext::computeSamplerTypeIndex(TSampler& sampler)
{
- int arrayIndex = sampler.arrayed ? 1 : 0;
- int shadowIndex = sampler.shadow ? 1 : 0;
+ int arrayIndex = sampler.arrayed ? 1 : 0;
+ int shadowIndex = sampler.shadow ? 1 : 0;
+ int externalIndex = sampler.external ? 1 : 0;
- return EsdNumDims * (EbtNumTypes * (2 * arrayIndex + shadowIndex) + sampler.type) + sampler.dim;
+ return EsdNumDims * (EbtNumTypes * (2 * (2 * arrayIndex + shadowIndex) + externalIndex) + sampler.type) + sampler.dim;
}
TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType)