Commit 7dcae6d1 authored by apatole's avatar apatole Committed by Commit bot

Remove ShaderTranslatorTest.BuiltInFunctionEmulation

This test becomes invalid with the upcoming angle changes. This test
expects webgle_dot_emu to be always there in translated shader source
but with the constant folding implemented in ANGLE for built-in
'dot', 'dot' function call will be replaced by actual result when all
the arguments are constant expressions and webgl_dot_emu will no
longer be there in translated shader source.

R=zmo

Review URL: https://codereview.chromium.org/1161463013

Cr-Commit-Position: refs/heads/master@{#333093}
parent 3193742f
...@@ -282,39 +282,6 @@ TEST_F(ShaderTranslatorTest, GetUniforms) { ...@@ -282,39 +282,6 @@ TEST_F(ShaderTranslatorTest, GetUniforms) {
EXPECT_STREQ("bar[1].foo.color[0]", original_name.c_str()); EXPECT_STREQ("bar[1].foo.color[0]", original_name.c_str());
} }
#if defined(OS_MACOSX)
TEST_F(ShaderTranslatorTest, BuiltInFunctionEmulation) {
// This test might become invalid in the future when ANGLE Translator is no
// longer emulate dot(float, float) in Mac, or the emulated function name is
// no longer webgl_dot_emu.
const char* shader =
"void main() {\n"
" gl_Position = vec4(dot(1.0, 1.0), 1.0, 1.0, 1.0);\n"
"}";
std::string info_log, translated_source;
int shader_version;
AttributeMap attrib_map;
UniformMap uniform_map;
VaryingMap varying_map;
NameMap name_map;
EXPECT_TRUE(vertex_translator_->Translate(shader,
&info_log,
&translated_source,
&shader_version,
&attrib_map,
&uniform_map,
&varying_map,
&name_map));
// Info log must be NULL.
EXPECT_TRUE(info_log.empty());
// Translated shader must be valid and non-empty.
ASSERT_FALSE(translated_source.empty());
EXPECT_TRUE(strstr(translated_source.c_str(),
"webgl_dot_emu") != NULL);
}
#endif
TEST_F(ShaderTranslatorTest, OptionsString) { TEST_F(ShaderTranslatorTest, OptionsString) {
scoped_refptr<ShaderTranslator> translator_1 = new ShaderTranslator(); scoped_refptr<ShaderTranslator> translator_1 = new ShaderTranslator();
scoped_refptr<ShaderTranslator> translator_2 = new ShaderTranslator(); scoped_refptr<ShaderTranslator> translator_2 = new ShaderTranslator();
......
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