summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp')
-rwxr-xr-xgfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp b/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp
index 53dd93fe4..6b90f1f5d 100755
--- a/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp
+++ b/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp
@@ -229,10 +229,10 @@ TEST(ShaderVariableTest, IsSameVaryingWithDifferentInvariance)
TEST(ShaderVariableTest, InvariantDoubleDeleteBug)
{
ShBuiltInResources resources;
- sh::InitBuiltInResources(&resources);
+ ShInitBuiltInResources(&resources);
- ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
- SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
+ ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
+ SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
EXPECT_NE(static_cast<ShHandle>(0), compiler);
const char *program[] =
@@ -246,18 +246,18 @@ TEST(ShaderVariableTest, InvariantDoubleDeleteBug)
"}"
};
- EXPECT_TRUE(sh::Compile(compiler, program, 1, SH_OBJECT_CODE));
- EXPECT_TRUE(sh::Compile(compiler, program, 1, SH_OBJECT_CODE));
- sh::Destruct(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program, 1, SH_OBJECT_CODE));
+ EXPECT_TRUE(ShCompile(compiler, program, 1, SH_OBJECT_CODE));
+ ShDestruct(compiler);
}
TEST(ShaderVariableTest, IllegalInvariantVarying)
{
ShBuiltInResources resources;
- sh::InitBuiltInResources(&resources);
+ ShInitBuiltInResources(&resources);
- ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
- SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
+ ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
+ SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
EXPECT_NE(static_cast<ShHandle>(0), compiler);
const char *program1[] =
@@ -284,17 +284,17 @@ TEST(ShaderVariableTest, IllegalInvariantVarying)
"}"
};
- EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES));
- EXPECT_FALSE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
+ EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES));
+ EXPECT_FALSE(ShCompile(compiler, program2, 1, SH_VARIABLES));
}
TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
{
ShBuiltInResources resources;
- sh::InitBuiltInResources(&resources);
+ ShInitBuiltInResources(&resources);
- ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
- SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
+ ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
+ SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
EXPECT_NE(static_cast<ShHandle>(0), compiler);
const char *program1[] =
@@ -313,15 +313,15 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
"}"
};
- EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES));
- const std::vector<sh::Varying> *varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES));
+ const std::vector<sh::Varying> *varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "v_varying")
EXPECT_TRUE(varying.isInvariant);
}
- EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
- varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES));
+ varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "v_varying")
@@ -332,10 +332,10 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders)
{
ShBuiltInResources resources;
- sh::InitBuiltInResources(&resources);
+ ShInitBuiltInResources(&resources);
- ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
- SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
+ ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
+ SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
EXPECT_NE(static_cast<ShHandle>(0), compiler);
const char *program1[] =
@@ -354,15 +354,15 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders)
"}"
};
- EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES));
- const std::vector<sh::Varying> *varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES));
+ const std::vector<sh::Varying> *varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "v_varying")
EXPECT_TRUE(varying.isInvariant);
}
- EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
- varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES));
+ varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "v_varying")
@@ -374,10 +374,10 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying)
{
ShBuiltInResources resources;
- sh::InitBuiltInResources(&resources);
+ ShInitBuiltInResources(&resources);
- ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
- SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
+ ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC,
+ SH_GLSL_COMPATIBILITY_OUTPUT, &resources);
EXPECT_NE(static_cast<ShHandle>(0), compiler);
const char *program1[] =
@@ -401,21 +401,21 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying)
"}"
};
- EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES));
- const std::vector<sh::Varying> *varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES));
+ const std::vector<sh::Varying> *varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "gl_Position")
EXPECT_TRUE(varying.isInvariant);
}
- EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
- varyings = sh::GetVaryings(compiler);
+ EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES));
+ varyings = ShGetVaryings(compiler);
for (const sh::Varying &varying : *varyings)
{
if (varying.name == "gl_Position")
EXPECT_FALSE(varying.isInvariant);
}
- EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES));
+ EXPECT_FALSE(ShCompile(compiler, program3, 1, SH_VARIABLES));
}
} // namespace sh