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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 936183002: Add glWaitSync to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sync
Patch Set: rebase Created 5 years, 10 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/client/gles2_implementation_unittest.cc
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index 6234a0d3eac96b448cff719064fe4ea493e792c6..2acbc6356399a37b7ac65b97a4f2a95461dddfeb 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -3617,6 +3617,21 @@ TEST_F(GLES2ImplementationTest, ClientWaitSync) {
EXPECT_EQ(static_cast<GLenum>(GL_CONDITION_SATISFIED), result);
}
+TEST_F(GLES2ImplementationTest, WaitSync) {
+ const GLuint kClientSyncId = 36;
+ struct Cmds {
+ cmds::WaitSync cmd;
+ };
+ Cmds expected;
+ const GLuint64 kTimeout = GL_TIMEOUT_IGNORED;
+ uint32_t v32_0 = 0, v32_1 = 0;
+ GLES2Util::MapUint64ToTwoUint32(kTimeout, &v32_0, &v32_1);
+ expected.cmd.Init(kClientSyncId, 0, v32_0, v32_1);
+
+ gl_->WaitSync(reinterpret_cast<GLsync>(kClientSyncId), 0, kTimeout);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationManualInitTest, LoseContextOnOOM) {
ContextInitOptions init_options;
init_options.lose_context_when_out_of_memory = true;
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_autogen.h ('k') | gpu/command_buffer/client/gles2_interface_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698