1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.0 Module
3 * -------------------------------------------------
4 *
5 * Copyright 2014 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 *//*!
20 * \file
21 * \brief State change call performance tests.
22 *//*--------------------------------------------------------------------*/
23
24 #include "es3pStateChangeCallTests.hpp"
25 #include "glsStateChangePerfTestCases.hpp"
26 #include "glwFunctions.hpp"
27 #include "glwEnums.hpp"
28
29 namespace deqp
30 {
31 namespace gles3
32 {
33 namespace Performance
34 {
35
36 using namespace glw;
37
StateChangeCallTests(Context & context)38 StateChangeCallTests::StateChangeCallTests(Context &context)
39 : TestCaseGroup(context, "state_change_only", "Test cost of state change calls without rendering anything")
40 {
41 }
42
~StateChangeCallTests(void)43 StateChangeCallTests::~StateChangeCallTests(void)
44 {
45 }
46
47 #define ARG_LIST(...) __VA_ARGS__
48
49 #define ADD_ARG_CASE1(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0) \
50 do \
51 { \
52 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
53 { \
54 public: \
55 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
56 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
57 description) \
58 { \
59 } \
60 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
61 { \
62 const TYPE0 args0[] = ARGS0; \
63 for (int callNdx = 0; callNdx < callCount; callNdx++) \
64 { \
65 const int baseNdx = iterNdx * callCount + callNdx; \
66 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
67 gl.FUNCNAME(arg0); \
68 } \
69 } \
70 }; \
71 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
72 } while (0);
73
74 #define ADD_ARG_CASE2(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0, TYPE1, ARGS1) \
75 do \
76 { \
77 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
78 { \
79 public: \
80 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
81 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
82 description) \
83 { \
84 } \
85 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
86 { \
87 const TYPE0 args0[] = ARGS0; \
88 const TYPE1 args1[] = ARGS1; \
89 for (int callNdx = 0; callNdx < callCount; callNdx++) \
90 { \
91 const int baseNdx = iterNdx * callCount + callNdx; \
92 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
93 const TYPE1 arg1 = args1[baseNdx % DE_LENGTH_OF_ARRAY(args1)]; \
94 gl.FUNCNAME(arg0, arg1); \
95 } \
96 } \
97 }; \
98 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
99 } while (0);
100
101 #define ADD_ARG_CASE3(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0, TYPE1, ARGS1, TYPE2, ARGS2) \
102 do \
103 { \
104 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
105 { \
106 public: \
107 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
108 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
109 description) \
110 { \
111 } \
112 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
113 { \
114 const TYPE0 args0[] = ARGS0; \
115 const TYPE1 args1[] = ARGS1; \
116 const TYPE2 args2[] = ARGS2; \
117 for (int callNdx = 0; callNdx < callCount; callNdx++) \
118 { \
119 const int baseNdx = iterNdx * callCount + callNdx; \
120 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
121 const TYPE1 arg1 = args1[baseNdx % DE_LENGTH_OF_ARRAY(args1)]; \
122 const TYPE2 arg2 = args2[baseNdx % DE_LENGTH_OF_ARRAY(args2)]; \
123 gl.FUNCNAME(arg0, arg1, arg2); \
124 } \
125 } \
126 }; \
127 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
128 } while (0);
129
130 #define ADD_ARG_CASE4(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0, TYPE1, ARGS1, TYPE2, ARGS2, TYPE3, ARGS3) \
131 do \
132 { \
133 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
134 { \
135 public: \
136 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
137 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
138 description) \
139 { \
140 } \
141 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
142 { \
143 const TYPE0 args0[] = ARGS0; \
144 const TYPE1 args1[] = ARGS1; \
145 const TYPE2 args2[] = ARGS2; \
146 const TYPE3 args3[] = ARGS3; \
147 for (int callNdx = 0; callNdx < callCount; callNdx++) \
148 { \
149 const int baseNdx = iterNdx * callCount + callNdx; \
150 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
151 const TYPE1 arg1 = args1[baseNdx % DE_LENGTH_OF_ARRAY(args1)]; \
152 const TYPE2 arg2 = args2[baseNdx % DE_LENGTH_OF_ARRAY(args2)]; \
153 const TYPE3 arg3 = args3[baseNdx % DE_LENGTH_OF_ARRAY(args3)]; \
154 gl.FUNCNAME(arg0, arg1, arg2, arg3); \
155 } \
156 } \
157 }; \
158 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
159 } while (0);
160
161 #define ADD_ARG_CASE5(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0, TYPE1, ARGS1, TYPE2, ARGS2, TYPE3, ARGS3, TYPE4, \
162 ARGS4) \
163 do \
164 { \
165 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
166 { \
167 public: \
168 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
169 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
170 description) \
171 { \
172 } \
173 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
174 { \
175 const TYPE0 args0[] = ARGS0; \
176 const TYPE1 args1[] = ARGS1; \
177 const TYPE2 args2[] = ARGS2; \
178 const TYPE3 args3[] = ARGS3; \
179 const TYPE4 args4[] = ARGS4; \
180 for (int callNdx = 0; callNdx < callCount; callNdx++) \
181 { \
182 const int baseNdx = iterNdx * callCount + callNdx; \
183 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
184 const TYPE1 arg1 = args1[baseNdx % DE_LENGTH_OF_ARRAY(args1)]; \
185 const TYPE2 arg2 = args2[baseNdx % DE_LENGTH_OF_ARRAY(args2)]; \
186 const TYPE3 arg3 = args3[baseNdx % DE_LENGTH_OF_ARRAY(args3)]; \
187 const TYPE4 arg4 = args4[baseNdx % DE_LENGTH_OF_ARRAY(args4)]; \
188 gl.FUNCNAME(arg0, arg1, arg2, arg3, arg4); \
189 } \
190 } \
191 }; \
192 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
193 } while (0);
194
195 #define ADD_ARG_CASE6(NAME, DESCRIPTION, FUNCNAME, TYPE0, ARGS0, TYPE1, ARGS1, TYPE2, ARGS2, TYPE3, ARGS3, TYPE4, \
196 ARGS4, TYPE5, ARGS5) \
197 do \
198 { \
199 class StateChangeCallTest_##NAME : public gls::StateChangeCallPerformanceCase \
200 { \
201 public: \
202 StateChangeCallTest_##NAME(Context &context, const char *name, const char *description) \
203 : gls::StateChangeCallPerformanceCase(context.getTestContext(), context.getRenderContext(), name, \
204 description) \
205 { \
206 } \
207 virtual void execCalls(const glw::Functions &gl, int iterNdx, int callCount) \
208 { \
209 const TYPE0 args0[] = ARGS0; \
210 const TYPE1 args1[] = ARGS1; \
211 const TYPE2 args2[] = ARGS2; \
212 const TYPE3 args3[] = ARGS3; \
213 const TYPE4 args4[] = ARGS4; \
214 const TYPE5 args5[] = ARGS5; \
215 for (int callNdx = 0; callNdx < callCount; callNdx++) \
216 { \
217 const int baseNdx = iterNdx * callCount + callNdx; \
218 const TYPE0 arg0 = args0[baseNdx % DE_LENGTH_OF_ARRAY(args0)]; \
219 const TYPE1 arg1 = args1[baseNdx % DE_LENGTH_OF_ARRAY(args1)]; \
220 const TYPE2 arg2 = args2[baseNdx % DE_LENGTH_OF_ARRAY(args2)]; \
221 const TYPE3 arg3 = args3[baseNdx % DE_LENGTH_OF_ARRAY(args3)]; \
222 const TYPE4 arg4 = args4[baseNdx % DE_LENGTH_OF_ARRAY(args4)]; \
223 const TYPE5 arg5 = args5[baseNdx % DE_LENGTH_OF_ARRAY(args5)]; \
224 gl.FUNCNAME(arg0, arg1, arg2, arg3, arg4, arg5); \
225 } \
226 } \
227 }; \
228 addChild(new StateChangeCallTest_##NAME(m_context, #NAME, DESCRIPTION)); \
229 } while (0);
230
init(void)231 void StateChangeCallTests::init(void)
232 {
233 ADD_ARG_CASE1(enable, "Test cost of glEnable() calls", enable, GLenum,
234 ARG_LIST({GL_CULL_FACE, GL_POLYGON_OFFSET_FILL, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_COVERAGE,
235 GL_SCISSOR_TEST, GL_STENCIL_TEST, GL_DEPTH_TEST, GL_BLEND, GL_DITHER, GL_RASTERIZER_DISCARD,
236 GL_PRIMITIVE_RESTART_FIXED_INDEX}))
237
238 ADD_ARG_CASE1(disable, "Test cost of glDisable() calls", disable, GLenum,
239 ARG_LIST({GL_CULL_FACE, GL_POLYGON_OFFSET_FILL, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_COVERAGE,
240 GL_SCISSOR_TEST, GL_STENCIL_TEST, GL_DEPTH_TEST, GL_BLEND, GL_DITHER, GL_RASTERIZER_DISCARD,
241 GL_PRIMITIVE_RESTART_FIXED_INDEX}))
242
243 ADD_ARG_CASE1(depth_func, "Test cost of glDepthFunc() calls", depthFunc, GLenum,
244 ARG_LIST({GL_NEVER, GL_ALWAYS, GL_LESS, GL_LEQUAL, GL_EQUAL, GL_GREATER, GL_GEQUAL, GL_NOTEQUAL}))
245
246 ADD_ARG_CASE1(depth_mask, "Test cost of glDepthMask() calls", depthMask, GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}))
247
248 ADD_ARG_CASE1(stencil_mask, "Test cost of glStencilMask() calls", stencilMask, GLboolean,
249 ARG_LIST({GL_TRUE, GL_FALSE}))
250
251 ADD_ARG_CASE1(clear_depth, "Test cost of glClearDepth() calls", clearDepthf, GLclampf, ARG_LIST({0.0f, 0.5f, 1.0f}))
252
253 ADD_ARG_CASE1(clear_stencil, "Test cost of glClearStencil() calls", clearStencil, GLint, ARG_LIST({0, 128, 28}))
254
255 ADD_ARG_CASE1(line_width, "Test cost of glLineWidth() calls", lineWidth, GLfloat, ARG_LIST({1.0f, 0.5f, 10.0f}))
256
257 ADD_ARG_CASE1(cull_face, "Test cost of glCullFace() calls", cullFace, GLenum,
258 ARG_LIST({GL_FRONT, GL_BACK, GL_FRONT_AND_BACK}))
259
260 ADD_ARG_CASE1(front_face, "Test cost of glFrontFace() calls", frontFace, GLenum, ARG_LIST({GL_CCW, GL_CW}))
261
262 ADD_ARG_CASE1(blend_equation, "Test cost of glBlendEquation() calls", blendEquation, GLenum,
263 ARG_LIST({GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT}))
264
265 ADD_ARG_CASE1(enable_vertex_attrib_array, "Test cost of glEnableVertexAttribArray() calls", enableVertexAttribArray,
266 GLuint,
267 ARG_LIST({
268 0,
269 1,
270 2,
271 3,
272 4,
273 5,
274 6,
275 7,
276 }))
277
278 ADD_ARG_CASE1(disable_vertex_attrib_array, "Test cost of glDisableVertexAttribArray() calls",
279 disableVertexAttribArray, GLuint,
280 ARG_LIST({
281 0,
282 1,
283 2,
284 3,
285 4,
286 5,
287 6,
288 7,
289 }))
290
291 ADD_ARG_CASE1(use_program, "Test cost of glUseProgram() calls. Note: Uses only program 0.", useProgram, GLuint,
292 ARG_LIST({
293 0,
294 }))
295
296 ADD_ARG_CASE1(active_texture, "Test cost of glActiveTexture() calls", activeTexture, GLenum,
297 ARG_LIST({GL_TEXTURE0, GL_TEXTURE1, GL_TEXTURE2, GL_TEXTURE3, GL_TEXTURE4, GL_TEXTURE5, GL_TEXTURE6,
298 GL_TEXTURE7}))
299
300 ADD_ARG_CASE2(depth_range, "Test cost of glDepthRangef() calls", depthRangef, GLclampf,
301 ARG_LIST({0.0f, 1.0f, 0.5f}), GLclampf, ARG_LIST({0.0f, 1.0f, 0.5f}))
302
303 ADD_ARG_CASE2(polygon_offset, "Test cost of glPolygonOffset() calls", polygonOffset, GLfloat,
304 ARG_LIST({0.0f, 1.0f, 0.5f, 10.0f}), GLfloat, ARG_LIST({0.0f, 1.0f, 0.5f, 1000.0f}))
305
306 ADD_ARG_CASE2(sample_coverage, "Test cost of glSampleCoverage() calls", sampleCoverage, GLclampf,
307 ARG_LIST({0.0f, 1.0f, 0.5f, 0.67f}), GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}))
308
309 ADD_ARG_CASE2(
310 blend_func, "Test cost of glBlendFunc() calls", blendFunc, GLenum,
311 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
312 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
313 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}),
314 GLenum,
315 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
316 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
317 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}))
318
319 ADD_ARG_CASE2(blend_equation_separate, "Test cost of glBlendEquationSeparate() calls", blendEquationSeparate,
320 GLenum, ARG_LIST({GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT}), GLenum,
321 ARG_LIST({GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT}))
322
323 ADD_ARG_CASE2(stencil_mask_separate, "Test cost of glStencilMaskSeparate() calls", stencilMaskSeparate, GLenum,
324 ARG_LIST({GL_FRONT, GL_BACK, GL_FRONT_AND_BACK}), GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}))
325
326 ADD_ARG_CASE2(bind_buffer, "Test cost of glBindBuffer() calls. Note: Uses only buffer 0", bindBuffer, GLenum,
327 ARG_LIST({GL_ELEMENT_ARRAY_BUFFER, GL_ARRAY_BUFFER}), GLuint, ARG_LIST({0}))
328
329 ADD_ARG_CASE2(bind_texture, "Test cost of glBindTexture() calls. Note: Uses only texture 0", bindTexture, GLenum,
330 ARG_LIST({GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP}), GLuint, ARG_LIST({0}))
331
332 ADD_ARG_CASE2(bind_sampler, "Test cost of glBindSampler() calls. Note: Uses only sampler 0", bindSampler, GLuint,
333 ARG_LIST({0, 1, 2, 3, 4, 5, 6, 7}), GLuint, ARG_LIST({0}))
334
335 ADD_ARG_CASE1(bind_vertex_array, "Test cost of glBindVertexArray() calls. Note: Uses only VAO 0", bindVertexArray,
336 GLuint, ARG_LIST({0}))
337
338 ADD_ARG_CASE2(hint, "Test cost of glHint() calls", hint, GLenum, ARG_LIST({GL_GENERATE_MIPMAP_HINT}), GLenum,
339 ARG_LIST({GL_FASTEST, GL_NICEST, GL_DONT_CARE}))
340
341 ADD_ARG_CASE3(stencil_func, "Test cost of glStencilFunc() calls", stencilFunc, GLenum,
342 ARG_LIST({GL_NEVER, GL_ALWAYS, GL_LESS, GL_LEQUAL, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_NOTEQUAL}),
343 GLint, ARG_LIST({0, 1, 255, 128, 7}), GLuint, ARG_LIST({0, 1, 255, 128, 7, 0xFFFFFFFF}))
344
345 ADD_ARG_CASE3(
346 stencil_op, "Test cost of glStencilOp() calls", stencilOp, GLenum,
347 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}), GLenum,
348 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}), GLenum,
349 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}))
350
351 ADD_ARG_CASE4(viewport, "Test cost of glViewport() calls", viewport, GLint, ARG_LIST({0, 1, 100, 1145235}), GLint,
352 ARG_LIST({0, 1, 100, 1145235}), GLint, ARG_LIST({0, 1, 100, 1145235}), GLint,
353 ARG_LIST({0, 1, 100, 1145235}))
354
355 ADD_ARG_CASE4(scissor, "Test cost of glScissor() calls", scissor, GLint, ARG_LIST({0, 1, 100, 1145235}), GLint,
356 ARG_LIST({0, 1, 100, 1145235}), GLint, ARG_LIST({0, 1, 100, 1145235}), GLint,
357 ARG_LIST({0, 1, 100, 1145235}))
358
359 ADD_ARG_CASE4(stencil_func_separate, "Test cost of glStencilFuncSeparate() calls", stencilFuncSeparate, GLenum,
360 ARG_LIST({GL_FRONT, GL_BACK, GL_FRONT_AND_BACK}), GLenum,
361 ARG_LIST({GL_NEVER, GL_ALWAYS, GL_LESS, GL_LEQUAL, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_NOTEQUAL}),
362 GLint, ARG_LIST({0, 1, 255, 128, 7}), GLuint, ARG_LIST({0, 1, 255, 128, 7, 0xFFFFFFFF}))
363
364 ADD_ARG_CASE4(
365 stencil_op_separatae, "Test cost of glStencilOpSeparate() calls", stencilOpSeparate, GLenum,
366 ARG_LIST({GL_FRONT, GL_BACK, GL_FRONT_AND_BACK}), GLenum,
367 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}), GLenum,
368 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}), GLenum,
369 ARG_LIST({GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP, GL_DECR_WRAP}))
370
371 ADD_ARG_CASE4(
372 blend_func_separate, "Test cost of glBlendFuncSeparate() calls", blendFuncSeparate, GLenum,
373 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
374 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
375 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}),
376 GLenum,
377 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
378 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
379 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}),
380 GLenum,
381 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
382 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
383 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}),
384 GLenum,
385 ARG_LIST({GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,
386 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,
387 GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA}))
388
389 ADD_ARG_CASE4(color_mask, "Test cost of glColorMask() calls", colorMask, GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}),
390 GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}), GLboolean, ARG_LIST({GL_TRUE, GL_FALSE}), GLboolean,
391 ARG_LIST({GL_TRUE, GL_FALSE}))
392
393 ADD_ARG_CASE4(clear_color, "Test cost of glClearColor() calls", clearColor, GLclampf,
394 ARG_LIST({0.0f, 1.0f, 0.5f, 0.33f}), GLclampf, ARG_LIST({0.0f, 1.0f, 0.5f, 0.33f}), GLclampf,
395 ARG_LIST({0.0f, 1.0f, 0.5f, 0.33f}), GLclampf, ARG_LIST({0.0f, 1.0f, 0.5f, 0.33f}))
396
397 ADD_ARG_CASE6(vertex_attrib_pointer, "Test cost of glVertexAttribPointer() calls", vertexAttribPointer, GLuint,
398 ARG_LIST({0, 1, 2, 3, 4, 5, 6, 7}), GLint, ARG_LIST({1, 2, 3, 4}), GLenum,
399 ARG_LIST({GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_FLOAT}), GLboolean,
400 ARG_LIST({GL_FALSE, GL_TRUE}), GLsizei, ARG_LIST({0, 2, 4}), void *,
401 ARG_LIST({(void *)(uintptr_t)(0x0FF), (void *)(uintptr_t)(0x0EF)}))
402
403 ADD_ARG_CASE2(vertex_attrib_divisor, "Test cost of glVertexAttribDivisor() calls", vertexAttribDivisor, GLuint,
404 ARG_LIST({0, 1, 2, 3, 4, 5, 6, 7}), GLuint, ARG_LIST({0, 1, 3, 7, 11, 127, 256}))
405
406 ADD_ARG_CASE3(bind_buffer_base, "Test cost of glBindBufferBase() calls. Note: uses only buffer 0.", bindBufferBase,
407 GLuint, ARG_LIST({GL_UNIFORM_BUFFER}), GLuint, ARG_LIST({0, 1, 2, 3}), GLuint, ARG_LIST({0}))
408
409 ADD_ARG_CASE5(bind_buffer_range, "Test cost of glBindBufferRange() calls. Note: uses only buffer 0.",
410 bindBufferRange, GLuint, ARG_LIST({GL_UNIFORM_BUFFER}), GLuint, ARG_LIST({0, 1, 2, 3}), GLuint,
411 ARG_LIST({0}), GLintptr, ARG_LIST({0}), GLsizeiptr, ARG_LIST({0}))
412 }
413
414 } // namespace Performance
415 } // namespace gles3
416 } // namespace deqp
417