Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: gpu/command_buffer/service/shader_manager_unittest.cc

Issue 6969100: Hook up shader long variable name mapping with GPU command buffer port. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/shader_manager_unittest.cc
===================================================================
--- gpu/command_buffer/service/shader_manager_unittest.cc (revision 87329)
+++ gpu/command_buffer/service/shader_manager_unittest.cc (working copy)
@@ -142,14 +142,14 @@
MockShaderTranslator shader_translator;
ShaderTranslator::VariableMap attrib_map;
attrib_map[kAttrib1Name] = ShaderTranslatorInterface::VariableInfo(
- kAttrib1Type, kAttrib1Size);
+ kAttrib1Type, kAttrib1Size, kAttrib1Name);
attrib_map[kAttrib2Name] = ShaderTranslatorInterface::VariableInfo(
- kAttrib2Type, kAttrib2Size);
+ kAttrib2Type, kAttrib2Size, kAttrib2Name);
ShaderTranslator::VariableMap uniform_map;
uniform_map[kUniform1Name] = ShaderTranslatorInterface::VariableInfo(
- kUniform1Type, kUniform1Size);
+ kUniform1Type, kUniform1Size, kUniform1Name);
uniform_map[kUniform2Name] = ShaderTranslatorInterface::VariableInfo(
- kUniform2Type, kUniform2Size);
+ kUniform2Type, kUniform2Size, kUniform2Name);
EXPECT_CALL(shader_translator, attrib_map())
.WillRepeatedly(ReturnRef(attrib_map));
EXPECT_CALL(shader_translator, uniform_map())
@@ -169,6 +169,7 @@
ASSERT_TRUE(variable_info != NULL);
EXPECT_EQ(it->second.type, variable_info->type);
EXPECT_EQ(it->second.size, variable_info->size);
+ EXPECT_EQ(it->second.name, variable_info->name);
}
for (ShaderTranslator::VariableMap::const_iterator it = uniform_map.begin();
it != uniform_map.end(); ++it) {
@@ -177,6 +178,7 @@
ASSERT_TRUE(variable_info != NULL);
EXPECT_EQ(it->second.type, variable_info->type);
EXPECT_EQ(it->second.size, variable_info->size);
+ EXPECT_EQ(it->second.name, variable_info->name);
}
// Check attrib and uniform get cleared.
info1->SetStatus(true, NULL, NULL);
« no previous file with comments | « gpu/command_buffer/service/program_manager_unittest.cc ('k') | gpu/command_buffer/service/shader_translator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698