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

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

Issue 2264253003: Command buffers: ensure we only read immediate data once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep track of the correct draw buffer Created 4 years, 4 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_framebuffers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
index b5da08e35c6248c2b3dda8cc02e098889fe37945..edf101aeb914400a44cdcfc5d3be13dfd3c7a66a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -2086,9 +2086,7 @@ TEST_P(GLES3DecoderTest, ClearBufferivImmediateValidArgs) {
.RetiresOnSaturation();
SetupExpectationsForApplyingDirtyState(
false, false, false, 0x1111, false, false, 0, 0, false);
- EXPECT_CALL(*gl_, ClearBufferiv(
- GL_COLOR, 0,
- reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
+ EXPECT_CALL(*gl_, ClearBufferiv(GL_COLOR, 0, PointsToArray(temp, 4)));
EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -2120,10 +2118,7 @@ TEST_P(GLES3DecoderTest, ClearBufferuivImmediateValidArgs) {
.RetiresOnSaturation();
SetupExpectationsForApplyingDirtyState(
false, false, false, 0x1111, false, false, 0, 0, false);
- EXPECT_CALL(*gl_, ClearBufferuiv(
- GL_COLOR, 0,
- reinterpret_cast<GLuint*>(
- ImmediateDataAddress(&cmd))));
+ EXPECT_CALL(*gl_, ClearBufferuiv(GL_COLOR, 0, PointsToArray(temp, 4)));
EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -2161,10 +2156,7 @@ TEST_P(GLES3DecoderTest, ClearBufferfvImmediateValidArgs) {
.RetiresOnSaturation();
SetupExpectationsForApplyingDirtyState(
true, true, false, 0x1110, true, true, 0, 0, false);
- EXPECT_CALL(*gl_, ClearBufferfv(
- GL_DEPTH, 0,
- reinterpret_cast<GLfloat*>(
- ImmediateDataAddress(&cmd))));
+ EXPECT_CALL(*gl_, ClearBufferfv(GL_DEPTH, 0, PointsToArray(temp, 4)));
EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}

Powered by Google App Engine
This is Rietveld 408576698