Commit 66e5dda7 by Zhenyao Mo

Fix a bug in init_varyings_without_static_use workaround.

The TType constrcuted is using es2 signature, which is different from the es3 signature. BUG=angle:568 TEST=webgl conformance tests with --init_varyings_without_static_use commandline switch Change-Id: I15347c7a6fe67e9214e4c96b156a50806a90c97c Reviewed-on: https://chromium-review.googlesource.com/197294Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent c41e42d4
......@@ -479,38 +479,36 @@ void TCompiler::initializeVaryingsWithoutStaticUse(TIntermNode* root)
const TVariableInfo& varying = varyings[ii];
if (varying.staticUse)
continue;
unsigned char size = 0;
bool matrix = false;
unsigned char primarySize = 1, secondarySize = 1;
switch (varying.type)
{
case SH_FLOAT:
size = 1;
break;
case SH_FLOAT_VEC2:
size = 2;
primarySize = 2;
break;
case SH_FLOAT_VEC3:
size = 3;
primarySize = 3;
break;
case SH_FLOAT_VEC4:
size = 4;
primarySize = 4;
break;
case SH_FLOAT_MAT2:
size = 2;
matrix = true;
primarySize = 2;
secondarySize = 2;
break;
case SH_FLOAT_MAT3:
size = 3;
matrix = true;
primarySize = 3;
secondarySize = 3;
break;
case SH_FLOAT_MAT4:
size = 4;
matrix = true;
primarySize = 4;
secondarySize = 4;
break;
default:
ASSERT(false);
}
TType type(EbtFloat, EbpUndefined, EvqVaryingOut, size, matrix, varying.isArray);
TType type(EbtFloat, EbpUndefined, EvqVaryingOut, primarySize, secondarySize, varying.isArray);
TString name = varying.name.c_str();
if (varying.isArray)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment