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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h

Issue 10568003: Add support for GL_CHROMIUM_consistent_uniform_locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/gles2_cmd_decoder_unittest_2_autogen.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
index 33bf614865c3b76cd4277488c6111899b1eafc5b..1ed5126afa6fb72cad60043f711000a61ff7457a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -700,7 +700,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fValidArgs) {
EXPECT_CALL(*gl_, Uniform1fv(1, 1, _));
SpecializedSetup<Uniform1f, 0>(true);
Uniform1f cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -712,7 +712,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fvValidArgs) {
SpecializedSetup<Uniform1fv, 0>(true);
Uniform1fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -723,7 +723,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fvInvalidArgs1_0) {
SpecializedSetup<Uniform1fv, 0>(false);
Uniform1fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -733,8 +733,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fvInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform1fv(_, _, _)).Times(0);
SpecializedSetup<Uniform1fv, 0>(false);
Uniform1fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -743,7 +742,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fvInvalidArgs2_1) {
SpecializedSetup<Uniform1fv, 0>(false);
Uniform1fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -755,8 +754,8 @@ TEST_F(GLES2DecoderTest2, Uniform1fvValidArgsCountTooLarge) {
SpecializedSetup<Uniform1fv, 0>(true);
Uniform1fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -770,7 +769,7 @@ TEST_F(GLES2DecoderTest2, Uniform1fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform1fvImmediate, 0>(true);
GLfloat temp[1 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -783,7 +782,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fValidArgs) {
EXPECT_CALL(*gl_, Uniform2fv(1, 1, _));
SpecializedSetup<Uniform2f, 0>(true);
Uniform2f cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -795,7 +794,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fvValidArgs) {
SpecializedSetup<Uniform2fv, 0>(true);
Uniform2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -806,7 +805,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fvInvalidArgs1_0) {
SpecializedSetup<Uniform2fv, 0>(false);
Uniform2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -816,8 +815,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fvInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform2fv(_, _, _)).Times(0);
SpecializedSetup<Uniform2fv, 0>(false);
Uniform2fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -826,7 +824,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fvInvalidArgs2_1) {
SpecializedSetup<Uniform2fv, 0>(false);
Uniform2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -838,8 +836,8 @@ TEST_F(GLES2DecoderTest2, Uniform2fvValidArgsCountTooLarge) {
SpecializedSetup<Uniform2fv, 0>(true);
Uniform2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -853,7 +851,7 @@ TEST_F(GLES2DecoderTest2, Uniform2fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform2fvImmediate, 0>(true);
GLfloat temp[2 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -863,7 +861,7 @@ TEST_F(GLES2DecoderTest2, Uniform2iValidArgs) {
EXPECT_CALL(*gl_, Uniform2iv(1, 1, _));
SpecializedSetup<Uniform2i, 0>(true);
Uniform2i cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -875,7 +873,7 @@ TEST_F(GLES2DecoderTest2, Uniform2ivValidArgs) {
SpecializedSetup<Uniform2iv, 0>(true);
Uniform2iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -886,7 +884,7 @@ TEST_F(GLES2DecoderTest2, Uniform2ivInvalidArgs1_0) {
SpecializedSetup<Uniform2iv, 0>(false);
Uniform2iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -896,8 +894,7 @@ TEST_F(GLES2DecoderTest2, Uniform2ivInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform2iv(_, _, _)).Times(0);
SpecializedSetup<Uniform2iv, 0>(false);
Uniform2iv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -906,7 +903,7 @@ TEST_F(GLES2DecoderTest2, Uniform2ivInvalidArgs2_1) {
SpecializedSetup<Uniform2iv, 0>(false);
Uniform2iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -918,8 +915,8 @@ TEST_F(GLES2DecoderTest2, Uniform2ivValidArgsCountTooLarge) {
SpecializedSetup<Uniform2iv, 0>(true);
Uniform2iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -933,7 +930,7 @@ TEST_F(GLES2DecoderTest2, Uniform2ivImmediateValidArgs) {
reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform2ivImmediate, 0>(true);
GLint temp[2 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -943,7 +940,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fValidArgs) {
EXPECT_CALL(*gl_, Uniform3fv(1, 1, _));
SpecializedSetup<Uniform3f, 0>(true);
Uniform3f cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3, 4);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3, 4);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -955,7 +952,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fvValidArgs) {
SpecializedSetup<Uniform3fv, 0>(true);
Uniform3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -966,7 +963,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fvInvalidArgs1_0) {
SpecializedSetup<Uniform3fv, 0>(false);
Uniform3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -976,8 +973,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fvInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform3fv(_, _, _)).Times(0);
SpecializedSetup<Uniform3fv, 0>(false);
Uniform3fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -986,7 +982,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fvInvalidArgs2_1) {
SpecializedSetup<Uniform3fv, 0>(false);
Uniform3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -998,8 +994,8 @@ TEST_F(GLES2DecoderTest2, Uniform3fvValidArgsCountTooLarge) {
SpecializedSetup<Uniform3fv, 0>(true);
Uniform3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1013,7 +1009,7 @@ TEST_F(GLES2DecoderTest2, Uniform3fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform3fvImmediate, 0>(true);
GLfloat temp[3 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1023,7 +1019,7 @@ TEST_F(GLES2DecoderTest2, Uniform3iValidArgs) {
EXPECT_CALL(*gl_, Uniform3iv(1, 1, _));
SpecializedSetup<Uniform3i, 0>(true);
Uniform3i cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3, 4);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3, 4);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -1035,7 +1031,7 @@ TEST_F(GLES2DecoderTest2, Uniform3ivValidArgs) {
SpecializedSetup<Uniform3iv, 0>(true);
Uniform3iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1046,7 +1042,7 @@ TEST_F(GLES2DecoderTest2, Uniform3ivInvalidArgs1_0) {
SpecializedSetup<Uniform3iv, 0>(false);
Uniform3iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1056,8 +1052,7 @@ TEST_F(GLES2DecoderTest2, Uniform3ivInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform3iv(_, _, _)).Times(0);
SpecializedSetup<Uniform3iv, 0>(false);
Uniform3iv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1066,7 +1061,7 @@ TEST_F(GLES2DecoderTest2, Uniform3ivInvalidArgs2_1) {
SpecializedSetup<Uniform3iv, 0>(false);
Uniform3iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1078,8 +1073,8 @@ TEST_F(GLES2DecoderTest2, Uniform3ivValidArgsCountTooLarge) {
SpecializedSetup<Uniform3iv, 0>(true);
Uniform3iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1093,7 +1088,7 @@ TEST_F(GLES2DecoderTest2, Uniform3ivImmediateValidArgs) {
reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform3ivImmediate, 0>(true);
GLint temp[3 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1103,7 +1098,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fValidArgs) {
EXPECT_CALL(*gl_, Uniform4fv(1, 1, _));
SpecializedSetup<Uniform4f, 0>(true);
Uniform4f cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3, 4, 5);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3, 4, 5);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -1115,7 +1110,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fvValidArgs) {
SpecializedSetup<Uniform4fv, 0>(true);
Uniform4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1126,7 +1121,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fvInvalidArgs1_0) {
SpecializedSetup<Uniform4fv, 0>(false);
Uniform4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1136,8 +1131,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fvInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform4fv(_, _, _)).Times(0);
SpecializedSetup<Uniform4fv, 0>(false);
Uniform4fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1146,7 +1140,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fvInvalidArgs2_1) {
SpecializedSetup<Uniform4fv, 0>(false);
Uniform4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1158,8 +1152,8 @@ TEST_F(GLES2DecoderTest2, Uniform4fvValidArgsCountTooLarge) {
SpecializedSetup<Uniform4fv, 0>(true);
Uniform4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1173,7 +1167,7 @@ TEST_F(GLES2DecoderTest2, Uniform4fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform4fvImmediate, 0>(true);
GLfloat temp[4 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1183,7 +1177,7 @@ TEST_F(GLES2DecoderTest2, Uniform4iValidArgs) {
EXPECT_CALL(*gl_, Uniform4iv(1, 1, _));
SpecializedSetup<Uniform4i, 0>(true);
Uniform4i cmd;
- cmd.Init(program_manager()->SwizzleLocation(1), 2, 3, 4, 5);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, 3, 4, 5);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -1195,7 +1189,7 @@ TEST_F(GLES2DecoderTest2, Uniform4ivValidArgs) {
SpecializedSetup<Uniform4iv, 0>(true);
Uniform4iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1206,7 +1200,7 @@ TEST_F(GLES2DecoderTest2, Uniform4ivInvalidArgs1_0) {
SpecializedSetup<Uniform4iv, 0>(false);
Uniform4iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1216,8 +1210,7 @@ TEST_F(GLES2DecoderTest2, Uniform4ivInvalidArgs2_0) {
EXPECT_CALL(*gl_, Uniform4iv(_, _, _)).Times(0);
SpecializedSetup<Uniform4iv, 0>(false);
Uniform4iv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1226,7 +1219,7 @@ TEST_F(GLES2DecoderTest2, Uniform4ivInvalidArgs2_1) {
SpecializedSetup<Uniform4iv, 0>(false);
Uniform4iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1238,8 +1231,8 @@ TEST_F(GLES2DecoderTest2, Uniform4ivValidArgsCountTooLarge) {
SpecializedSetup<Uniform4iv, 0>(true);
Uniform4iv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1253,7 +1246,7 @@ TEST_F(GLES2DecoderTest2, Uniform4ivImmediateValidArgs) {
reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<Uniform4ivImmediate, 0>(true);
GLint temp[4 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1267,7 +1260,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgs) {
SpecializedSetup<UniformMatrix2fv, 0>(true);
UniformMatrix2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1278,7 +1271,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs1_0) {
SpecializedSetup<UniformMatrix2fv, 0>(false);
UniformMatrix2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1289,7 +1282,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs2_0) {
SpecializedSetup<UniformMatrix2fv, 0>(false);
UniformMatrix2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, true, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
@@ -1299,9 +1292,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs3_0) {
EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix2fv, 0>(false);
UniformMatrix2fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(
- 1), 2, false, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1310,7 +1301,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs3_1) {
SpecializedSetup<UniformMatrix2fv, 0>(false);
UniformMatrix2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1323,8 +1314,8 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgsCountTooLarge) {
SpecializedSetup<UniformMatrix2fv, 0>(true);
UniformMatrix2fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1339,7 +1330,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<UniformMatrix2fvImmediate, 0>(true);
GLfloat temp[4 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, false, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1351,7 +1342,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateInvalidArgs2_0) {
EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix2fvImmediate, 0>(false);
GLfloat temp[4 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, true, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, true, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
@@ -1365,7 +1356,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgs) {
SpecializedSetup<UniformMatrix3fv, 0>(true);
UniformMatrix3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1376,7 +1367,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs1_0) {
SpecializedSetup<UniformMatrix3fv, 0>(false);
UniformMatrix3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1387,7 +1378,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs2_0) {
SpecializedSetup<UniformMatrix3fv, 0>(false);
UniformMatrix3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, true, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
@@ -1397,9 +1388,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs3_0) {
EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix3fv, 0>(false);
UniformMatrix3fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(
- 1), 2, false, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1408,7 +1397,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs3_1) {
SpecializedSetup<UniformMatrix3fv, 0>(false);
UniformMatrix3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1421,8 +1410,8 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgsCountTooLarge) {
SpecializedSetup<UniformMatrix3fv, 0>(true);
UniformMatrix3fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1437,7 +1426,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<UniformMatrix3fvImmediate, 0>(true);
GLfloat temp[9 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, false, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1449,7 +1438,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateInvalidArgs2_0) {
EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix3fvImmediate, 0>(false);
GLfloat temp[9 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, true, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, true, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
@@ -1463,7 +1452,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgs) {
SpecializedSetup<UniformMatrix4fv, 0>(true);
UniformMatrix4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1474,7 +1463,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs1_0) {
SpecializedSetup<UniformMatrix4fv, 0>(false);
UniformMatrix4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), -1, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1485,7 +1474,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs2_0) {
SpecializedSetup<UniformMatrix4fv, 0>(false);
UniformMatrix4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, true, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
@@ -1495,9 +1484,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs3_0) {
EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix4fv, 0>(false);
UniformMatrix4fv cmd;
- cmd.Init(
- program_manager()->SwizzleLocation(
- 1), 2, false, kInvalidSharedMemoryId, 0);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, kInvalidSharedMemoryId, 0);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1506,7 +1493,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs3_1) {
SpecializedSetup<UniformMatrix4fv, 0>(false);
UniformMatrix4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
+ GLES2Util::SwizzleLocation(
1), 2, false, shared_memory_id_, kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
@@ -1519,8 +1506,8 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgsCountTooLarge) {
SpecializedSetup<UniformMatrix4fv, 0>(true);
UniformMatrix4fv cmd;
cmd.Init(
- program_manager()->SwizzleLocation(
- ProgramManager::ProgramInfo::GetFakeLocation(
+ GLES2Util::SwizzleLocation(
+ GLES2Util::MakeFakeLocation(
1, 1)), 5, false, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1535,7 +1522,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateValidArgs) {
reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
SpecializedSetup<UniformMatrix4fvImmediate, 0>(true);
GLfloat temp[16 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, false, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, false, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -1547,7 +1534,7 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateInvalidArgs2_0) {
EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0);
SpecializedSetup<UniformMatrix4fvImmediate, 0>(false);
GLfloat temp[16 * 2] = { 0, };
- cmd.Init(program_manager()->SwizzleLocation(1), 2, true, &temp[0]);
+ cmd.Init(GLES2Util::SwizzleLocation(1), 2, true, &temp[0]);
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698