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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h

Issue 2009073002: command_buffer: Guard on extension and profiles in the decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for GL errors in the unittest Created 4 years, 7 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
(...skipping 17 matching lines...) Expand all
28 if (group_->feature_info()->feature_flags().ext_multisample_compatibility) { 28 if (group_->feature_info()->feature_flags().ext_multisample_compatibility) {
29 ExpectEnableDisable(GL_SAMPLE_ALPHA_TO_ONE_EXT, false); 29 ExpectEnableDisable(GL_SAMPLE_ALPHA_TO_ONE_EXT, false);
30 } 30 }
31 if (es3_capable) { 31 if (es3_capable) {
32 ExpectEnableDisable(GL_RASTERIZER_DISCARD, false); 32 ExpectEnableDisable(GL_RASTERIZER_DISCARD, false);
33 ExpectEnableDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX, false); 33 ExpectEnableDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX, false);
34 } 34 }
35 } 35 }
36 36
37 void GLES2DecoderTestBase::SetupInitStateExpectations(bool es3_capable) { 37 void GLES2DecoderTestBase::SetupInitStateExpectations(bool es3_capable) {
38 const auto& feature_info_ = group_->feature_info();
38 EXPECT_CALL(*gl_, BlendColor(0.0f, 0.0f, 0.0f, 0.0f)) 39 EXPECT_CALL(*gl_, BlendColor(0.0f, 0.0f, 0.0f, 0.0f))
39 .Times(1) 40 .Times(1)
40 .RetiresOnSaturation(); 41 .RetiresOnSaturation();
41 EXPECT_CALL(*gl_, BlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD)) 42 EXPECT_CALL(*gl_, BlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD))
42 .Times(1) 43 .Times(1)
43 .RetiresOnSaturation(); 44 .RetiresOnSaturation();
44 EXPECT_CALL(*gl_, BlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO)) 45 EXPECT_CALL(*gl_, BlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO))
45 .Times(1) 46 .Times(1)
46 .RetiresOnSaturation(); 47 .RetiresOnSaturation();
47 EXPECT_CALL(*gl_, ClearColor(0.0f, 0.0f, 0.0f, 0.0f)) 48 EXPECT_CALL(*gl_, ClearColor(0.0f, 0.0f, 0.0f, 0.0f))
48 .Times(1) 49 .Times(1)
49 .RetiresOnSaturation(); 50 .RetiresOnSaturation();
50 EXPECT_CALL(*gl_, ClearDepth(1.0f)).Times(1).RetiresOnSaturation(); 51 EXPECT_CALL(*gl_, ClearDepth(1.0f)).Times(1).RetiresOnSaturation();
51 EXPECT_CALL(*gl_, ClearStencil(0)).Times(1).RetiresOnSaturation(); 52 EXPECT_CALL(*gl_, ClearStencil(0)).Times(1).RetiresOnSaturation();
52 EXPECT_CALL(*gl_, ColorMask(true, true, true, true)) 53 EXPECT_CALL(*gl_, ColorMask(true, true, true, true))
53 .Times(1) 54 .Times(1)
54 .RetiresOnSaturation(); 55 .RetiresOnSaturation();
55 if (group_->feature_info() 56 if (group_->feature_info()
56 ->feature_flags() 57 ->feature_flags()
57 .chromium_framebuffer_mixed_samples) { 58 .chromium_framebuffer_mixed_samples) {
58 EXPECT_CALL(*gl_, CoverageModulationNV(GL_NONE)) 59 EXPECT_CALL(*gl_, CoverageModulationNV(GL_NONE))
59 .Times(1) 60 .Times(1)
60 .RetiresOnSaturation(); 61 .RetiresOnSaturation();
61 } 62 }
62 EXPECT_CALL(*gl_, CullFace(GL_BACK)).Times(1).RetiresOnSaturation(); 63 EXPECT_CALL(*gl_, CullFace(GL_BACK)).Times(1).RetiresOnSaturation();
63 EXPECT_CALL(*gl_, DepthFunc(GL_LESS)).Times(1).RetiresOnSaturation(); 64 EXPECT_CALL(*gl_, DepthFunc(GL_LESS)).Times(1).RetiresOnSaturation();
64 EXPECT_CALL(*gl_, DepthMask(true)).Times(1).RetiresOnSaturation(); 65 EXPECT_CALL(*gl_, DepthMask(true)).Times(1).RetiresOnSaturation();
65 EXPECT_CALL(*gl_, DepthRange(0.0f, 1.0f)).Times(1).RetiresOnSaturation(); 66 EXPECT_CALL(*gl_, DepthRange(0.0f, 1.0f)).Times(1).RetiresOnSaturation();
66 EXPECT_CALL(*gl_, FrontFace(GL_CCW)).Times(1).RetiresOnSaturation(); 67 EXPECT_CALL(*gl_, FrontFace(GL_CCW)).Times(1).RetiresOnSaturation();
67 EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE)) 68 if (!feature_info_->gl_version_info().is_desktop_core_profile) {
68 .Times(1) 69 EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE))
69 .RetiresOnSaturation(); 70 .Times(1)
70 if (group_->feature_info()->feature_flags().oes_standard_derivatives) { 71 .RetiresOnSaturation();
72 }
73 if (feature_info_->feature_flags().oes_standard_derivatives) {
71 EXPECT_CALL(*gl_, 74 EXPECT_CALL(*gl_,
72 Hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, GL_DONT_CARE)) 75 Hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, GL_DONT_CARE))
73 .Times(1) 76 .Times(1)
74 .RetiresOnSaturation(); 77 .RetiresOnSaturation();
75 } 78 }
76 EXPECT_CALL(*gl_, LineWidth(1.0f)).Times(1).RetiresOnSaturation(); 79 EXPECT_CALL(*gl_, LineWidth(1.0f)).Times(1).RetiresOnSaturation();
77 if (group_->feature_info()->feature_flags().chromium_path_rendering) { 80 if (feature_info_->feature_flags().chromium_path_rendering) {
78 EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, _)) 81 EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, _))
79 .Times(1) 82 .Times(1)
80 .RetiresOnSaturation(); 83 .RetiresOnSaturation();
81 } 84 }
82 if (group_->feature_info()->feature_flags().chromium_path_rendering) { 85 if (feature_info_->feature_flags().chromium_path_rendering) {
83 EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, _)) 86 EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, _))
84 .Times(1) 87 .Times(1)
85 .RetiresOnSaturation(); 88 .RetiresOnSaturation();
86 } 89 }
87 if (group_->feature_info()->feature_flags().chromium_path_rendering) { 90 if (group_->feature_info()->feature_flags().chromium_path_rendering) {
88 EXPECT_CALL(*gl_, PathStencilFuncNV(GL_ALWAYS, 0, 0xFFFFFFFFU)) 91 EXPECT_CALL(*gl_, PathStencilFuncNV(GL_ALWAYS, 0, 0xFFFFFFFFU))
89 .Times(1) 92 .Times(1)
90 .RetiresOnSaturation(); 93 .RetiresOnSaturation();
91 } 94 }
92 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ALIGNMENT, 4)) 95 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ALIGNMENT, 4))
(...skipping 26 matching lines...) Expand all
119 EXPECT_CALL(*gl_, StencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP)) 122 EXPECT_CALL(*gl_, StencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP))
120 .Times(1) 123 .Times(1)
121 .RetiresOnSaturation(); 124 .RetiresOnSaturation();
122 EXPECT_CALL(*gl_, 125 EXPECT_CALL(*gl_,
123 Viewport(kViewportX, kViewportY, kViewportWidth, kViewportHeight)) 126 Viewport(kViewportX, kViewportY, kViewportWidth, kViewportHeight))
124 .Times(1) 127 .Times(1)
125 .RetiresOnSaturation(); 128 .RetiresOnSaturation();
126 SetupInitStateManualExpectations(es3_capable); 129 SetupInitStateManualExpectations(es3_capable);
127 } 130 }
128 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_0_AUTOGEN_H_ 131 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_0_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698