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

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

Issue 299043003: Adding bindless variants mailbox produce/consume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix for windows Created 6 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/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 a35f1f969c73dbb70e9e164426556c7bcf464644..a318ab8f33f2a687a377b3e7e5fbba7aaab43470 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -3212,6 +3212,20 @@ TEST_F(GLES2ImplementationTest, ConsumeTextureCHROMIUM) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, CreateAndConsumeTextureCHROMIUM) {
+ struct Cmds {
+ cmds::CreateAndConsumeTextureCHROMIUMImmediate cmd;
+ GLbyte data[64];
+ };
+
+ Mailbox mailbox = Mailbox::Generate();
+ Cmds expected;
+ expected.cmd.Init(GL_TEXTURE_2D, kTexturesStartId, mailbox.name);
+ GLuint id = gl_->CreateAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+ EXPECT_EQ(kTexturesStartId, id);
+}
+
TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) {
struct Cmds {
cmds::ProduceTextureCHROMIUMImmediate cmd;
@@ -3225,6 +3239,20 @@ TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, ProduceTextureDirectCHROMIUM) {
+ struct Cmds {
+ cmds::ProduceTextureDirectCHROMIUMImmediate cmd;
+ GLbyte data[64];
+ };
+
+ Mailbox mailbox = Mailbox::Generate();
+ Cmds expected;
+ expected.cmd.Init(kTexturesStartId, GL_TEXTURE_2D, mailbox.name);
+ gl_->ProduceTextureDirectCHROMIUM(
+ kTexturesStartId, GL_TEXTURE_2D, mailbox.name);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationTest, LimitSizeAndOffsetTo32Bit) {
GLsizeiptr size;
GLintptr offset;
« 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