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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 867123008: Add glGetFragDataLocation to gpu command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
11 // This file is included by gles2_implementation.h to declare the 11 // This file is included by gles2_implementation.h to declare the
12 // GL api functions. 12 // GL api functions.
13 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 13 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
14 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 14 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
15 15
16 TEST_F(GLES2ImplementationTest, AttachShader) { 16 TEST_F(GLES2ImplementationTest, AttachShader) {
17 struct Cmds { 17 struct Cmds {
18 cmds::AttachShader cmd; 18 cmds::AttachShader cmd;
19 }; 19 };
20 Cmds expected; 20 Cmds expected;
21 expected.cmd.Init(1, 2); 21 expected.cmd.Init(1, 2);
22 22
23 gl_->AttachShader(1, 2); 23 gl_->AttachShader(1, 2);
24 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 24 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
25 } 25 }
26 // TODO: Implement unit test for BindAttribLocation 26 // TODO(zmo): Implement unit test for BindAttribLocation
27 27
28 TEST_F(GLES2ImplementationTest, BindBuffer) { 28 TEST_F(GLES2ImplementationTest, BindBuffer) {
29 struct Cmds { 29 struct Cmds {
30 cmds::BindBuffer cmd; 30 cmds::BindBuffer cmd;
31 }; 31 };
32 Cmds expected; 32 Cmds expected;
33 expected.cmd.Init(GL_ARRAY_BUFFER, 2); 33 expected.cmd.Init(GL_ARRAY_BUFFER, 2);
34 34
35 gl_->BindBuffer(GL_ARRAY_BUFFER, 2); 35 gl_->BindBuffer(GL_ARRAY_BUFFER, 2);
36 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 36 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 TEST_F(GLES2ImplementationTest, CompileShader) { 302 TEST_F(GLES2ImplementationTest, CompileShader) {
303 struct Cmds { 303 struct Cmds {
304 cmds::CompileShader cmd; 304 cmds::CompileShader cmd;
305 }; 305 };
306 Cmds expected; 306 Cmds expected;
307 expected.cmd.Init(1); 307 expected.cmd.Init(1);
308 308
309 gl_->CompileShader(1); 309 gl_->CompileShader(1);
310 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 310 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
311 } 311 }
312 // TODO: Implement unit test for CompressedTexImage2D 312 // TODO(zmo): Implement unit test for CompressedTexImage2D
313 // TODO: Implement unit test for CompressedTexSubImage2D 313 // TODO(zmo): Implement unit test for CompressedTexSubImage2D
314 314
315 TEST_F(GLES2ImplementationTest, CopyBufferSubData) { 315 TEST_F(GLES2ImplementationTest, CopyBufferSubData) {
316 struct Cmds { 316 struct Cmds {
317 cmds::CopyBufferSubData cmd; 317 cmds::CopyBufferSubData cmd;
318 }; 318 };
319 Cmds expected; 319 Cmds expected;
320 expected.cmd.Init(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5); 320 expected.cmd.Init(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5);
321 321
322 gl_->CopyBufferSubData(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5); 322 gl_->CopyBufferSubData(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5);
323 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 323 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 }; 731 };
732 Cmds expected; 732 Cmds expected;
733 expected.gen.Init(arraysize(ids), &ids[0]); 733 expected.gen.Init(arraysize(ids), &ids[0]);
734 expected.data[0] = kTransformFeedbacksStartId; 734 expected.data[0] = kTransformFeedbacksStartId;
735 expected.data[1] = kTransformFeedbacksStartId + 1; 735 expected.data[1] = kTransformFeedbacksStartId + 1;
736 gl_->GenTransformFeedbacks(arraysize(ids), &ids[0]); 736 gl_->GenTransformFeedbacks(arraysize(ids), &ids[0]);
737 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 737 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
738 EXPECT_EQ(kTransformFeedbacksStartId, ids[0]); 738 EXPECT_EQ(kTransformFeedbacksStartId, ids[0]);
739 EXPECT_EQ(kTransformFeedbacksStartId + 1, ids[1]); 739 EXPECT_EQ(kTransformFeedbacksStartId + 1, ids[1]);
740 } 740 }
741 // TODO: Implement unit test for GetActiveAttrib 741 // TODO(zmo): Implement unit test for GetActiveAttrib
742 // TODO: Implement unit test for GetActiveUniform 742 // TODO(zmo): Implement unit test for GetActiveUniform
743 // TODO: Implement unit test for GetAttachedShaders 743 // TODO(zmo): Implement unit test for GetAttachedShaders
744 // TODO: Implement unit test for GetAttribLocation 744 // TODO(zmo): Implement unit test for GetAttribLocation
745 745
746 TEST_F(GLES2ImplementationTest, GetBooleanv) { 746 TEST_F(GLES2ImplementationTest, GetBooleanv) {
747 struct Cmds { 747 struct Cmds {
748 cmds::GetBooleanv cmd; 748 cmds::GetBooleanv cmd;
749 }; 749 };
750 typedef cmds::GetBooleanv::Result Result; 750 typedef cmds::GetBooleanv::Result Result;
751 Result::Type result = 0; 751 Result::Type result = 0;
752 Cmds expected; 752 Cmds expected;
753 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 753 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
754 expected.cmd.Init(123, result1.id, result1.offset); 754 expected.cmd.Init(123, result1.id, result1.offset);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 Cmds expected; 786 Cmds expected;
787 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 787 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
788 expected.cmd.Init(123, result1.id, result1.offset); 788 expected.cmd.Init(123, result1.id, result1.offset);
789 EXPECT_CALL(*command_buffer(), OnFlush()) 789 EXPECT_CALL(*command_buffer(), OnFlush())
790 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1))) 790 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1)))
791 .RetiresOnSaturation(); 791 .RetiresOnSaturation();
792 gl_->GetFloatv(123, &result); 792 gl_->GetFloatv(123, &result);
793 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 793 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
794 EXPECT_EQ(static_cast<Result::Type>(1), result); 794 EXPECT_EQ(static_cast<Result::Type>(1), result);
795 } 795 }
796 // TODO(zmo): Implement unit test for GetFragDataLocation
796 797
797 TEST_F(GLES2ImplementationTest, GetFramebufferAttachmentParameteriv) { 798 TEST_F(GLES2ImplementationTest, GetFramebufferAttachmentParameteriv) {
798 struct Cmds { 799 struct Cmds {
799 cmds::GetFramebufferAttachmentParameteriv cmd; 800 cmds::GetFramebufferAttachmentParameteriv cmd;
800 }; 801 };
801 typedef cmds::GetFramebufferAttachmentParameteriv::Result Result; 802 typedef cmds::GetFramebufferAttachmentParameteriv::Result Result;
802 Result::Type result = 0; 803 Result::Type result = 0;
803 Cmds expected; 804 Cmds expected;
804 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 805 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
805 expected.cmd.Init(123, GL_COLOR_ATTACHMENT0, 806 expected.cmd.Init(123, GL_COLOR_ATTACHMENT0,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 Cmds expected; 860 Cmds expected;
860 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 861 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
861 expected.cmd.Init(123, GL_DELETE_STATUS, result1.id, result1.offset); 862 expected.cmd.Init(123, GL_DELETE_STATUS, result1.id, result1.offset);
862 EXPECT_CALL(*command_buffer(), OnFlush()) 863 EXPECT_CALL(*command_buffer(), OnFlush())
863 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1))) 864 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1)))
864 .RetiresOnSaturation(); 865 .RetiresOnSaturation();
865 gl_->GetProgramiv(123, GL_DELETE_STATUS, &result); 866 gl_->GetProgramiv(123, GL_DELETE_STATUS, &result);
866 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 867 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
867 EXPECT_EQ(static_cast<Result::Type>(1), result); 868 EXPECT_EQ(static_cast<Result::Type>(1), result);
868 } 869 }
869 // TODO: Implement unit test for GetProgramInfoLog 870 // TODO(zmo): Implement unit test for GetProgramInfoLog
870 871
871 TEST_F(GLES2ImplementationTest, GetRenderbufferParameteriv) { 872 TEST_F(GLES2ImplementationTest, GetRenderbufferParameteriv) {
872 struct Cmds { 873 struct Cmds {
873 cmds::GetRenderbufferParameteriv cmd; 874 cmds::GetRenderbufferParameteriv cmd;
874 }; 875 };
875 typedef cmds::GetRenderbufferParameteriv::Result Result; 876 typedef cmds::GetRenderbufferParameteriv::Result Result;
876 Result::Type result = 0; 877 Result::Type result = 0;
877 Cmds expected; 878 Cmds expected;
878 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 879 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
879 expected.cmd.Init(123, GL_RENDERBUFFER_RED_SIZE, result1.id, result1.offset); 880 expected.cmd.Init(123, GL_RENDERBUFFER_RED_SIZE, result1.id, result1.offset);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 Cmds expected; 929 Cmds expected;
929 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 930 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
930 expected.cmd.Init(123, GL_SHADER_TYPE, result1.id, result1.offset); 931 expected.cmd.Init(123, GL_SHADER_TYPE, result1.id, result1.offset);
931 EXPECT_CALL(*command_buffer(), OnFlush()) 932 EXPECT_CALL(*command_buffer(), OnFlush())
932 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1))) 933 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1)))
933 .RetiresOnSaturation(); 934 .RetiresOnSaturation();
934 gl_->GetShaderiv(123, GL_SHADER_TYPE, &result); 935 gl_->GetShaderiv(123, GL_SHADER_TYPE, &result);
935 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 936 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
936 EXPECT_EQ(static_cast<Result::Type>(1), result); 937 EXPECT_EQ(static_cast<Result::Type>(1), result);
937 } 938 }
938 // TODO: Implement unit test for GetShaderInfoLog 939 // TODO(zmo): Implement unit test for GetShaderInfoLog
939 // TODO: Implement unit test for GetShaderPrecisionFormat 940 // TODO(zmo): Implement unit test for GetShaderPrecisionFormat
940 941
941 TEST_F(GLES2ImplementationTest, GetTexParameterfv) { 942 TEST_F(GLES2ImplementationTest, GetTexParameterfv) {
942 struct Cmds { 943 struct Cmds {
943 cmds::GetTexParameterfv cmd; 944 cmds::GetTexParameterfv cmd;
944 }; 945 };
945 typedef cmds::GetTexParameterfv::Result Result; 946 typedef cmds::GetTexParameterfv::Result Result;
946 Result::Type result = 0; 947 Result::Type result = 0;
947 Cmds expected; 948 Cmds expected;
948 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 949 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
949 expected.cmd.Init(123, GL_TEXTURE_MAG_FILTER, result1.id, result1.offset); 950 expected.cmd.Init(123, GL_TEXTURE_MAG_FILTER, result1.id, result1.offset);
(...skipping 14 matching lines...) Expand all
964 Cmds expected; 965 Cmds expected;
965 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 966 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
966 expected.cmd.Init(123, GL_TEXTURE_MAG_FILTER, result1.id, result1.offset); 967 expected.cmd.Init(123, GL_TEXTURE_MAG_FILTER, result1.id, result1.offset);
967 EXPECT_CALL(*command_buffer(), OnFlush()) 968 EXPECT_CALL(*command_buffer(), OnFlush())
968 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1))) 969 .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1)))
969 .RetiresOnSaturation(); 970 .RetiresOnSaturation();
970 gl_->GetTexParameteriv(123, GL_TEXTURE_MAG_FILTER, &result); 971 gl_->GetTexParameteriv(123, GL_TEXTURE_MAG_FILTER, &result);
971 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 972 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
972 EXPECT_EQ(static_cast<Result::Type>(1), result); 973 EXPECT_EQ(static_cast<Result::Type>(1), result);
973 } 974 }
974 // TODO: Implement unit test for GetUniformfv 975 // TODO(zmo): Implement unit test for GetUniformfv
975 // TODO: Implement unit test for GetUniformiv 976 // TODO(zmo): Implement unit test for GetUniformiv
976 // TODO: Implement unit test for GetUniformLocation 977 // TODO(zmo): Implement unit test for GetUniformLocation
977 978
978 TEST_F(GLES2ImplementationTest, GetVertexAttribfv) { 979 TEST_F(GLES2ImplementationTest, GetVertexAttribfv) {
979 struct Cmds { 980 struct Cmds {
980 cmds::GetVertexAttribfv cmd; 981 cmds::GetVertexAttribfv cmd;
981 }; 982 };
982 typedef cmds::GetVertexAttribfv::Result Result; 983 typedef cmds::GetVertexAttribfv::Result Result;
983 Result::Type result = 0; 984 Result::Type result = 0;
984 Cmds expected; 985 Cmds expected;
985 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); 986 ExpectedMemoryInfo result1 = GetExpectedResultMemory(4);
986 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id, 987 expected.cmd.Init(123, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, result1.id,
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 cmds::DeleteQueriesEXTImmediate del; 2528 cmds::DeleteQueriesEXTImmediate del;
2528 GLuint data[2]; 2529 GLuint data[2];
2529 }; 2530 };
2530 Cmds expected; 2531 Cmds expected;
2531 expected.del.Init(arraysize(ids), &ids[0]); 2532 expected.del.Init(arraysize(ids), &ids[0]);
2532 expected.data[0] = kQueriesStartId; 2533 expected.data[0] = kQueriesStartId;
2533 expected.data[1] = kQueriesStartId + 1; 2534 expected.data[1] = kQueriesStartId + 1;
2534 gl_->DeleteQueriesEXT(arraysize(ids), &ids[0]); 2535 gl_->DeleteQueriesEXT(arraysize(ids), &ids[0]);
2535 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2536 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2536 } 2537 }
2537 // TODO: Implement unit test for BeginQueryEXT 2538 // TODO(zmo): Implement unit test for BeginQueryEXT
2538 2539
2539 TEST_F(GLES2ImplementationTest, BeginTransformFeedback) { 2540 TEST_F(GLES2ImplementationTest, BeginTransformFeedback) {
2540 struct Cmds { 2541 struct Cmds {
2541 cmds::BeginTransformFeedback cmd; 2542 cmds::BeginTransformFeedback cmd;
2542 }; 2543 };
2543 Cmds expected; 2544 Cmds expected;
2544 expected.cmd.Init(GL_POINTS); 2545 expected.cmd.Init(GL_POINTS);
2545 2546
2546 gl_->BeginTransformFeedback(GL_POINTS); 2547 gl_->BeginTransformFeedback(GL_POINTS);
2547 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2548 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2548 } 2549 }
2549 2550
2550 TEST_F(GLES2ImplementationTest, EndTransformFeedback) { 2551 TEST_F(GLES2ImplementationTest, EndTransformFeedback) {
2551 struct Cmds { 2552 struct Cmds {
2552 cmds::EndTransformFeedback cmd; 2553 cmds::EndTransformFeedback cmd;
2553 }; 2554 };
2554 Cmds expected; 2555 Cmds expected;
2555 expected.cmd.Init(); 2556 expected.cmd.Init();
2556 2557
2557 gl_->EndTransformFeedback(); 2558 gl_->EndTransformFeedback();
2558 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2559 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2559 } 2560 }
2560 // TODO: Implement unit test for InsertEventMarkerEXT 2561 // TODO(zmo): Implement unit test for InsertEventMarkerEXT
2561 // TODO: Implement unit test for PushGroupMarkerEXT 2562 // TODO(zmo): Implement unit test for PushGroupMarkerEXT
2562 2563
2563 TEST_F(GLES2ImplementationTest, PopGroupMarkerEXT) { 2564 TEST_F(GLES2ImplementationTest, PopGroupMarkerEXT) {
2564 struct Cmds { 2565 struct Cmds {
2565 cmds::PopGroupMarkerEXT cmd; 2566 cmds::PopGroupMarkerEXT cmd;
2566 }; 2567 };
2567 Cmds expected; 2568 Cmds expected;
2568 expected.cmd.Init(); 2569 expected.cmd.Init();
2569 2570
2570 gl_->PopGroupMarkerEXT(); 2571 gl_->PopGroupMarkerEXT();
2571 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2572 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2614 expected.cmd.Init(1, result1.id, result1.offset); 2615 expected.cmd.Init(1, result1.id, result1.offset);
2615 2616
2616 EXPECT_CALL(*command_buffer(), OnFlush()) 2617 EXPECT_CALL(*command_buffer(), OnFlush())
2617 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) 2618 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE)))
2618 .RetiresOnSaturation(); 2619 .RetiresOnSaturation();
2619 2620
2620 GLboolean result = gl_->IsVertexArrayOES(1); 2621 GLboolean result = gl_->IsVertexArrayOES(1);
2621 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2622 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2622 EXPECT_TRUE(result); 2623 EXPECT_TRUE(result);
2623 } 2624 }
2624 // TODO: Implement unit test for EnableFeatureCHROMIUM 2625 // TODO(zmo): Implement unit test for EnableFeatureCHROMIUM
2625 2626
2626 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) { 2627 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) {
2627 struct Cmds { 2628 struct Cmds {
2628 cmds::ResizeCHROMIUM cmd; 2629 cmds::ResizeCHROMIUM cmd;
2629 }; 2630 };
2630 Cmds expected; 2631 Cmds expected;
2631 expected.cmd.Init(1, 2, 3); 2632 expected.cmd.Init(1, 2, 3);
2632 2633
2633 gl_->ResizeCHROMIUM(1, 2, 3); 2634 gl_->ResizeCHROMIUM(1, 2, 3);
2634 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2635 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2635 } 2636 }
2636 // TODO: Implement unit test for GetRequestableExtensionsCHROMIUM 2637 // TODO(zmo): Implement unit test for GetRequestableExtensionsCHROMIUM
2637 // TODO: Implement unit test for CreateStreamTextureCHROMIUM 2638 // TODO(zmo): Implement unit test for CreateStreamTextureCHROMIUM
2638 // TODO: Implement unit test for GetTranslatedShaderSourceANGLE 2639 // TODO(zmo): Implement unit test for GetTranslatedShaderSourceANGLE
2639 2640
2640 TEST_F(GLES2ImplementationTest, TexImageIOSurface2DCHROMIUM) { 2641 TEST_F(GLES2ImplementationTest, TexImageIOSurface2DCHROMIUM) {
2641 struct Cmds { 2642 struct Cmds {
2642 cmds::TexImageIOSurface2DCHROMIUM cmd; 2643 cmds::TexImageIOSurface2DCHROMIUM cmd;
2643 }; 2644 };
2644 Cmds expected; 2645 Cmds expected;
2645 expected.cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5); 2646 expected.cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5);
2646 2647
2647 gl_->TexImageIOSurface2DCHROMIUM(GL_TEXTURE_2D, 2, 3, 4, 5); 2648 gl_->TexImageIOSurface2DCHROMIUM(GL_TEXTURE_2D, 2, 3, 4, 5);
2648 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2649 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 24 matching lines...) Expand all
2673 TEST_F(GLES2ImplementationTest, VertexAttribDivisorANGLE) { 2674 TEST_F(GLES2ImplementationTest, VertexAttribDivisorANGLE) {
2674 struct Cmds { 2675 struct Cmds {
2675 cmds::VertexAttribDivisorANGLE cmd; 2676 cmds::VertexAttribDivisorANGLE cmd;
2676 }; 2677 };
2677 Cmds expected; 2678 Cmds expected;
2678 expected.cmd.Init(1, 2); 2679 expected.cmd.Init(1, 2);
2679 2680
2680 gl_->VertexAttribDivisorANGLE(1, 2); 2681 gl_->VertexAttribDivisorANGLE(1, 2);
2681 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2682 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2682 } 2683 }
2683 // TODO: Implement unit test for GenMailboxCHROMIUM 2684 // TODO(zmo): Implement unit test for GenMailboxCHROMIUM
2684 // TODO: Implement unit test for BindUniformLocationCHROMIUM 2685 // TODO(zmo): Implement unit test for BindUniformLocationCHROMIUM
2685 2686
2686 TEST_F(GLES2ImplementationTest, GenValuebuffersCHROMIUM) { 2687 TEST_F(GLES2ImplementationTest, GenValuebuffersCHROMIUM) {
2687 GLuint ids[2] = { 2688 GLuint ids[2] = {
2688 0, 2689 0,
2689 }; 2690 };
2690 struct Cmds { 2691 struct Cmds {
2691 cmds::GenValuebuffersCHROMIUMImmediate gen; 2692 cmds::GenValuebuffersCHROMIUMImmediate gen;
2692 GLuint data[2]; 2693 GLuint data[2];
2693 }; 2694 };
2694 Cmds expected; 2695 Cmds expected;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 struct Cmds { 2830 struct Cmds {
2830 cmds::LoseContextCHROMIUM cmd; 2831 cmds::LoseContextCHROMIUM cmd;
2831 }; 2832 };
2832 Cmds expected; 2833 Cmds expected;
2833 expected.cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_GUILTY_CONTEXT_RESET_ARB); 2834 expected.cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_GUILTY_CONTEXT_RESET_ARB);
2834 2835
2835 gl_->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, 2836 gl_->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
2836 GL_GUILTY_CONTEXT_RESET_ARB); 2837 GL_GUILTY_CONTEXT_RESET_ARB);
2837 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2838 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2838 } 2839 }
2839 // TODO: Implement unit test for InsertSyncPointCHROMIUM 2840 // TODO(zmo): Implement unit test for InsertSyncPointCHROMIUM
2840 2841
2841 TEST_F(GLES2ImplementationTest, WaitSyncPointCHROMIUM) { 2842 TEST_F(GLES2ImplementationTest, WaitSyncPointCHROMIUM) {
2842 struct Cmds { 2843 struct Cmds {
2843 cmds::WaitSyncPointCHROMIUM cmd; 2844 cmds::WaitSyncPointCHROMIUM cmd;
2844 }; 2845 };
2845 Cmds expected; 2846 Cmds expected;
2846 expected.cmd.Init(1); 2847 expected.cmd.Init(1);
2847 2848
2848 gl_->WaitSyncPointCHROMIUM(1); 2849 gl_->WaitSyncPointCHROMIUM(1);
2849 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2850 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2898 struct Cmds { 2899 struct Cmds {
2899 cmds::MatrixLoadIdentityCHROMIUM cmd; 2900 cmds::MatrixLoadIdentityCHROMIUM cmd;
2900 }; 2901 };
2901 Cmds expected; 2902 Cmds expected;
2902 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 2903 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
2903 2904
2904 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 2905 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
2905 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2906 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2906 } 2907 }
2907 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 2908 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW
« 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