Commit 0e74e059 by Frank Henigman Committed by Commit Bot

Fix gcc builds.

Remove unused function and fix dangling else's that gcc complains about. In the gyp build specify -std=c++14. BUG=none Change-Id: I552942ccc574104a5424a9add00e6e72d6efa28a Reviewed-on: https://chromium-review.googlesource.com/830750 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent a2d98141
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
], ],
'cflags_cc': 'cflags_cc':
[ [
'-std=c++0x', '-std=c++14',
], ],
}, },
}], }],
......
...@@ -82,7 +82,6 @@ class ValidateLimitationsTraverser : public TLValueTrackingTraverser ...@@ -82,7 +82,6 @@ class ValidateLimitationsTraverser : public TLValueTrackingTraverser
private: private:
void error(TSourceLoc loc, const char *reason, const char *token); void error(TSourceLoc loc, const char *reason, const char *token);
bool withinLoopBody() const;
bool isLoopIndex(TIntermSymbol *symbol); bool isLoopIndex(TIntermSymbol *symbol);
bool validateLoopType(TIntermLoop *node); bool validateLoopType(TIntermLoop *node);
...@@ -164,11 +163,6 @@ void ValidateLimitationsTraverser::error(TSourceLoc loc, const char *reason, con ...@@ -164,11 +163,6 @@ void ValidateLimitationsTraverser::error(TSourceLoc loc, const char *reason, con
mDiagnostics->error(loc, reason, token); mDiagnostics->error(loc, reason, token);
} }
bool ValidateLimitationsTraverser::withinLoopBody() const
{
return !mLoopSymbolIds.empty();
}
bool ValidateLimitationsTraverser::isLoopIndex(TIntermSymbol *symbol) bool ValidateLimitationsTraverser::isLoopIndex(TIntermSymbol *symbol)
{ {
return std::find(mLoopSymbolIds.begin(), mLoopSymbolIds.end(), symbol->getId()) != return std::find(mLoopSymbolIds.begin(), mLoopSymbolIds.end(), symbol->getId()) !=
......
...@@ -310,14 +310,18 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders) ...@@ -310,14 +310,18 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "v_varying") if (varying.name == "v_varying")
{
EXPECT_TRUE(varying.isInvariant); EXPECT_TRUE(varying.isInvariant);
}
} }
EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
varyings = sh::GetOutputVaryings(compiler); varyings = sh::GetOutputVaryings(compiler);
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "v_varying") if (varying.name == "v_varying")
{
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
}
} }
sh::Destruct(compiler); sh::Destruct(compiler);
} }
...@@ -352,14 +356,18 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders) ...@@ -352,14 +356,18 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders)
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "v_varying") if (varying.name == "v_varying")
{
EXPECT_TRUE(varying.isInvariant); EXPECT_TRUE(varying.isInvariant);
}
} }
EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
varyings = sh::GetOutputVaryings(compiler); varyings = sh::GetOutputVaryings(compiler);
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "v_varying") if (varying.name == "v_varying")
{
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
}
} }
sh::Destruct(compiler); sh::Destruct(compiler);
} }
...@@ -400,14 +408,18 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying) ...@@ -400,14 +408,18 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying)
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "gl_Position") if (varying.name == "gl_Position")
{
EXPECT_TRUE(varying.isInvariant); EXPECT_TRUE(varying.isInvariant);
}
} }
EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
varyings = sh::GetOutputVaryings(compiler); varyings = sh::GetOutputVaryings(compiler);
for (const sh::Varying &varying : *varyings) for (const sh::Varying &varying : *varyings)
{ {
if (varying.name == "gl_Position") if (varying.name == "gl_Position")
{
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
}
} }
EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES)); EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES));
sh::Destruct(compiler); sh::Destruct(compiler);
......
...@@ -353,9 +353,13 @@ void WebGLFramebufferTest::testDepthStencilRenderbuffer(GLint width, ...@@ -353,9 +353,13 @@ void WebGLFramebufferTest::testDepthStencilRenderbuffer(GLint width,
// OpenGL itself doesn't seem to guarantee that e.g. a 2 x 0 // OpenGL itself doesn't seem to guarantee that e.g. a 2 x 0
// renderbuffer will report 2 for its width when queried. // renderbuffer will report 2 for its width when queried.
if (!(height == 0 && width > 0)) if (!(height == 0 && width > 0))
{
EXPECT_EQ(width, getRenderbufferParameter(GL_RENDERBUFFER_WIDTH)); EXPECT_EQ(width, getRenderbufferParameter(GL_RENDERBUFFER_WIDTH));
}
if (!(width == 0 && height > 0)) if (!(width == 0 && height > 0))
{
EXPECT_EQ(height, getRenderbufferParameter(GL_RENDERBUFFER_HEIGHT)); EXPECT_EQ(height, getRenderbufferParameter(GL_RENDERBUFFER_HEIGHT));
}
EXPECT_EQ(GL_DEPTH_STENCIL, getRenderbufferParameter(GL_RENDERBUFFER_INTERNAL_FORMAT)); EXPECT_EQ(GL_DEPTH_STENCIL, getRenderbufferParameter(GL_RENDERBUFFER_INTERNAL_FORMAT));
EXPECT_EQ(0, getRenderbufferParameter(GL_RENDERBUFFER_RED_SIZE)); EXPECT_EQ(0, getRenderbufferParameter(GL_RENDERBUFFER_RED_SIZE));
EXPECT_EQ(0, getRenderbufferParameter(GL_RENDERBUFFER_GREEN_SIZE)); EXPECT_EQ(0, getRenderbufferParameter(GL_RENDERBUFFER_GREEN_SIZE));
......
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