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

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

Issue 132183002: Report relevant variable names in info logs on failed shader link (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix code style and debug logging Created 6 years, 11 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
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager_unittest.cc
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc
index 2c51c881214be224dbedbe144307c4e224119ff8..461aadf0f714e1aaf4ef5253db8193a6f2826f0b 100644
--- a/gpu/command_buffer/service/program_manager_unittest.cc
+++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -1255,7 +1255,10 @@ TEST_F(ProgramManagerWithShaderTest, UniformsPrecisionMismatch) {
EXPECT_TRUE(program->AttachShader(&shader_manager_, vshader));
EXPECT_TRUE(program->AttachShader(&shader_manager_, fshader));
- EXPECT_TRUE(program->DetectUniformsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_TRUE(program->DetectUniformsMismatch(&conflicting_name));
+ EXPECT_EQ("a", conflicting_name);
EXPECT_TRUE(LinkAsExpected(program, false));
}
@@ -1269,7 +1272,10 @@ TEST_F(ProgramManagerWithShaderTest, VaryingTypeMismatch) {
Program* program = SetupShaderVariableTest(
&kVertexVarying, 1, &kFragmentVarying, 1);
- EXPECT_TRUE(program->DetectVaryingsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_TRUE(program->DetectVaryingsMismatch(&conflicting_name));
+ EXPECT_EQ("a", conflicting_name);
EXPECT_TRUE(LinkAsExpected(program, false));
}
@@ -1283,7 +1289,10 @@ TEST_F(ProgramManagerWithShaderTest, VaryingArraySizeMismatch) {
Program* program = SetupShaderVariableTest(
&kVertexVarying, 1, &kFragmentVarying, 1);
- EXPECT_TRUE(program->DetectVaryingsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_TRUE(program->DetectVaryingsMismatch(&conflicting_name));
+ EXPECT_EQ("a", conflicting_name);
EXPECT_TRUE(LinkAsExpected(program, false));
}
@@ -1297,7 +1306,10 @@ TEST_F(ProgramManagerWithShaderTest, VaryingPrecisionMismatch) {
Program* program = SetupShaderVariableTest(
&kVertexVarying, 1, &kFragmentVarying, 1);
- EXPECT_FALSE(program->DetectVaryingsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_FALSE(program->DetectVaryingsMismatch(&conflicting_name));
+ EXPECT_TRUE(conflicting_name.empty());
EXPECT_TRUE(LinkAsExpected(program, true));
}
@@ -1309,7 +1321,10 @@ TEST_F(ProgramManagerWithShaderTest, VaryingMissing) {
Program* program = SetupShaderVariableTest(
NULL, 0, &kFragmentVarying, 1);
- EXPECT_TRUE(program->DetectVaryingsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_TRUE(program->DetectVaryingsMismatch(&conflicting_name));
+ EXPECT_EQ("a", conflicting_name);
EXPECT_TRUE(LinkAsExpected(program, false));
}
@@ -1322,7 +1337,10 @@ TEST_F(ProgramManagerWithShaderTest, InactiveVarying) {
Program* program = SetupShaderVariableTest(
NULL, 0, &kFragmentVarying, 1);
- EXPECT_FALSE(program->DetectVaryingsMismatch());
+ std::string conflicting_name;
+
+ EXPECT_FALSE(program->DetectVaryingsMismatch(&conflicting_name));
+ EXPECT_TRUE(conflicting_name.empty());
EXPECT_TRUE(LinkAsExpected(program, true));
}
@@ -1337,7 +1355,10 @@ TEST_F(ProgramManagerWithShaderTest, AttribUniformNameConflict) {
Program* program = SetupShaderVariableTest(
&kVertexAttribute, 1, &kFragmentUniform, 1);
- EXPECT_TRUE(program->DetectGlobalNameConflicts());
+ std::string conflicting_name;
+
+ EXPECT_TRUE(program->DetectGlobalNameConflicts(&conflicting_name));
+ EXPECT_EQ("a", conflicting_name);
EXPECT_TRUE(LinkAsExpected(program, false));
}
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698