1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2017 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gles_2_0_autogen.cpp:
9 // Defines the GLES 2.0 entry points.
10
11 #include "libANGLE/Context.h"
12 #include "libANGLE/validationES2.h"
13 #include "libGLESv2/global_state.h"
14
15 namespace gl
16 {
ActiveTexture(GLenum texture)17 void GL_APIENTRY ActiveTexture(GLenum texture)
18 {
19 EVENT("(GLenum texture = 0x%X)", texture);
20
21 Context *context = GetValidGlobalContext();
22 if (context)
23 {
24 context->gatherParams<EntryPoint::ActiveTexture>(texture);
25
26 if (context->skipValidation() || ValidateActiveTexture(context, texture))
27 {
28 context->activeTexture(texture);
29 }
30 }
31 }
32
AttachShader(GLuint program,GLuint shader)33 void GL_APIENTRY AttachShader(GLuint program, GLuint shader)
34 {
35 EVENT("(GLuint program = %u, GLuint shader = %u)", program, shader);
36
37 Context *context = GetValidGlobalContext();
38 if (context)
39 {
40 context->gatherParams<EntryPoint::AttachShader>(program, shader);
41
42 if (context->skipValidation() || ValidateAttachShader(context, program, shader))
43 {
44 context->attachShader(program, shader);
45 }
46 }
47 }
48
BindAttribLocation(GLuint program,GLuint index,const GLchar * name)49 void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar *name)
50 {
51 EVENT("(GLuint program = %u, GLuint index = %u, const GLchar *name = 0x%0.8p)", program, index,
52 name);
53
54 Context *context = GetValidGlobalContext();
55 if (context)
56 {
57 context->gatherParams<EntryPoint::BindAttribLocation>(program, index, name);
58
59 if (context->skipValidation() || ValidateBindAttribLocation(context, program, index, name))
60 {
61 context->bindAttribLocation(program, index, name);
62 }
63 }
64 }
65
BindBuffer(GLenum target,GLuint buffer)66 void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer)
67 {
68 EVENT("(GLenum target = 0x%X, GLuint buffer = %u)", target, buffer);
69
70 Context *context = GetValidGlobalContext();
71 if (context)
72 {
73 BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
74 context->gatherParams<EntryPoint::BindBuffer>(targetPacked, buffer);
75
76 if (context->skipValidation() || ValidateBindBuffer(context, targetPacked, buffer))
77 {
78 context->bindBuffer(targetPacked, buffer);
79 }
80 }
81 }
82
BindFramebuffer(GLenum target,GLuint framebuffer)83 void GL_APIENTRY BindFramebuffer(GLenum target, GLuint framebuffer)
84 {
85 EVENT("(GLenum target = 0x%X, GLuint framebuffer = %u)", target, framebuffer);
86
87 Context *context = GetValidGlobalContext();
88 if (context)
89 {
90 context->gatherParams<EntryPoint::BindFramebuffer>(target, framebuffer);
91
92 if (context->skipValidation() || ValidateBindFramebuffer(context, target, framebuffer))
93 {
94 context->bindFramebuffer(target, framebuffer);
95 }
96 }
97 }
98
BindRenderbuffer(GLenum target,GLuint renderbuffer)99 void GL_APIENTRY BindRenderbuffer(GLenum target, GLuint renderbuffer)
100 {
101 EVENT("(GLenum target = 0x%X, GLuint renderbuffer = %u)", target, renderbuffer);
102
103 Context *context = GetValidGlobalContext();
104 if (context)
105 {
106 context->gatherParams<EntryPoint::BindRenderbuffer>(target, renderbuffer);
107
108 if (context->skipValidation() || ValidateBindRenderbuffer(context, target, renderbuffer))
109 {
110 context->bindRenderbuffer(target, renderbuffer);
111 }
112 }
113 }
114
BindTexture(GLenum target,GLuint texture)115 void GL_APIENTRY BindTexture(GLenum target, GLuint texture)
116 {
117 EVENT("(GLenum target = 0x%X, GLuint texture = %u)", target, texture);
118
119 Context *context = GetValidGlobalContext();
120 if (context)
121 {
122 context->gatherParams<EntryPoint::BindTexture>(target, texture);
123
124 if (context->skipValidation() || ValidateBindTexture(context, target, texture))
125 {
126 context->bindTexture(target, texture);
127 }
128 }
129 }
130
BlendColor(GLfloat red,GLfloat green,GLfloat blue,GLfloat alpha)131 void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
132 {
133 EVENT("(GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f, GLfloat alpha = %f)", red,
134 green, blue, alpha);
135
136 Context *context = GetValidGlobalContext();
137 if (context)
138 {
139 context->gatherParams<EntryPoint::BlendColor>(red, green, blue, alpha);
140
141 if (context->skipValidation() || ValidateBlendColor(context, red, green, blue, alpha))
142 {
143 context->blendColor(red, green, blue, alpha);
144 }
145 }
146 }
147
BlendEquation(GLenum mode)148 void GL_APIENTRY BlendEquation(GLenum mode)
149 {
150 EVENT("(GLenum mode = 0x%X)", mode);
151
152 Context *context = GetValidGlobalContext();
153 if (context)
154 {
155 context->gatherParams<EntryPoint::BlendEquation>(mode);
156
157 if (context->skipValidation() || ValidateBlendEquation(context, mode))
158 {
159 context->blendEquation(mode);
160 }
161 }
162 }
163
BlendEquationSeparate(GLenum modeRGB,GLenum modeAlpha)164 void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
165 {
166 EVENT("(GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", modeRGB, modeAlpha);
167
168 Context *context = GetValidGlobalContext();
169 if (context)
170 {
171 context->gatherParams<EntryPoint::BlendEquationSeparate>(modeRGB, modeAlpha);
172
173 if (context->skipValidation() || ValidateBlendEquationSeparate(context, modeRGB, modeAlpha))
174 {
175 context->blendEquationSeparate(modeRGB, modeAlpha);
176 }
177 }
178 }
179
BlendFunc(GLenum sfactor,GLenum dfactor)180 void GL_APIENTRY BlendFunc(GLenum sfactor, GLenum dfactor)
181 {
182 EVENT("(GLenum sfactor = 0x%X, GLenum dfactor = 0x%X)", sfactor, dfactor);
183
184 Context *context = GetValidGlobalContext();
185 if (context)
186 {
187 context->gatherParams<EntryPoint::BlendFunc>(sfactor, dfactor);
188
189 if (context->skipValidation() || ValidateBlendFunc(context, sfactor, dfactor))
190 {
191 context->blendFunc(sfactor, dfactor);
192 }
193 }
194 }
195
BlendFuncSeparate(GLenum sfactorRGB,GLenum dfactorRGB,GLenum sfactorAlpha,GLenum dfactorAlpha)196 void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB,
197 GLenum dfactorRGB,
198 GLenum sfactorAlpha,
199 GLenum dfactorAlpha)
200 {
201 EVENT(
202 "(GLenum sfactorRGB = 0x%X, GLenum dfactorRGB = 0x%X, GLenum sfactorAlpha = 0x%X, GLenum "
203 "dfactorAlpha = 0x%X)",
204 sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
205
206 Context *context = GetValidGlobalContext();
207 if (context)
208 {
209 context->gatherParams<EntryPoint::BlendFuncSeparate>(sfactorRGB, dfactorRGB, sfactorAlpha,
210 dfactorAlpha);
211
212 if (context->skipValidation() ||
213 ValidateBlendFuncSeparate(context, sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha))
214 {
215 context->blendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
216 }
217 }
218 }
219
BufferData(GLenum target,GLsizeiptr size,const void * data,GLenum usage)220 void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
221 {
222 EVENT(
223 "(GLenum target = 0x%X, GLsizeiptr size = %d, const void *data = 0x%0.8p, GLenum usage = "
224 "0x%X)",
225 target, size, data, usage);
226
227 Context *context = GetValidGlobalContext();
228 if (context)
229 {
230 BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
231 BufferUsage usagePacked = FromGLenum<BufferUsage>(usage);
232 context->gatherParams<EntryPoint::BufferData>(targetPacked, size, data, usagePacked);
233
234 if (context->skipValidation() ||
235 ValidateBufferData(context, targetPacked, size, data, usagePacked))
236 {
237 context->bufferData(targetPacked, size, data, usagePacked);
238 }
239 }
240 }
241
BufferSubData(GLenum target,GLintptr offset,GLsizeiptr size,const void * data)242 void GL_APIENTRY BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
243 {
244 EVENT(
245 "(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr size = %d, const void *data = "
246 "0x%0.8p)",
247 target, offset, size, data);
248
249 Context *context = GetValidGlobalContext();
250 if (context)
251 {
252 BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
253 context->gatherParams<EntryPoint::BufferSubData>(targetPacked, offset, size, data);
254
255 if (context->skipValidation() ||
256 ValidateBufferSubData(context, targetPacked, offset, size, data))
257 {
258 context->bufferSubData(targetPacked, offset, size, data);
259 }
260 }
261 }
262
CheckFramebufferStatus(GLenum target)263 GLenum GL_APIENTRY CheckFramebufferStatus(GLenum target)
264 {
265 EVENT("(GLenum target = 0x%X)", target);
266
267 Context *context = GetValidGlobalContext();
268 if (context)
269 {
270 context->gatherParams<EntryPoint::CheckFramebufferStatus>(target);
271
272 if (context->skipValidation() || ValidateCheckFramebufferStatus(context, target))
273 {
274 return context->checkFramebufferStatus(target);
275 }
276 }
277
278 return GetDefaultReturnValue<EntryPoint::CheckFramebufferStatus, GLenum>();
279 }
280
Clear(GLbitfield mask)281 void GL_APIENTRY Clear(GLbitfield mask)
282 {
283 EVENT("(GLbitfield mask = 0x%X)", mask);
284
285 Context *context = GetValidGlobalContext();
286 if (context)
287 {
288 context->gatherParams<EntryPoint::Clear>(mask);
289
290 if (context->skipValidation() || ValidateClear(context, mask))
291 {
292 context->clear(mask);
293 }
294 }
295 }
296
ClearColor(GLfloat red,GLfloat green,GLfloat blue,GLfloat alpha)297 void GL_APIENTRY ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
298 {
299 EVENT("(GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f, GLfloat alpha = %f)", red,
300 green, blue, alpha);
301
302 Context *context = GetValidGlobalContext();
303 if (context)
304 {
305 context->gatherParams<EntryPoint::ClearColor>(red, green, blue, alpha);
306
307 if (context->skipValidation() || ValidateClearColor(context, red, green, blue, alpha))
308 {
309 context->clearColor(red, green, blue, alpha);
310 }
311 }
312 }
313
ClearDepthf(GLfloat d)314 void GL_APIENTRY ClearDepthf(GLfloat d)
315 {
316 EVENT("(GLfloat d = %f)", d);
317
318 Context *context = GetValidGlobalContext();
319 if (context)
320 {
321 context->gatherParams<EntryPoint::ClearDepthf>(d);
322
323 if (context->skipValidation() || ValidateClearDepthf(context, d))
324 {
325 context->clearDepthf(d);
326 }
327 }
328 }
329
ClearStencil(GLint s)330 void GL_APIENTRY ClearStencil(GLint s)
331 {
332 EVENT("(GLint s = %d)", s);
333
334 Context *context = GetValidGlobalContext();
335 if (context)
336 {
337 context->gatherParams<EntryPoint::ClearStencil>(s);
338
339 if (context->skipValidation() || ValidateClearStencil(context, s))
340 {
341 context->clearStencil(s);
342 }
343 }
344 }
345
ColorMask(GLboolean red,GLboolean green,GLboolean blue,GLboolean alpha)346 void GL_APIENTRY ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
347 {
348 EVENT("(GLboolean red = %u, GLboolean green = %u, GLboolean blue = %u, GLboolean alpha = %u)",
349 red, green, blue, alpha);
350
351 Context *context = GetValidGlobalContext();
352 if (context)
353 {
354 context->gatherParams<EntryPoint::ColorMask>(red, green, blue, alpha);
355
356 if (context->skipValidation() || ValidateColorMask(context, red, green, blue, alpha))
357 {
358 context->colorMask(red, green, blue, alpha);
359 }
360 }
361 }
362
CompileShader(GLuint shader)363 void GL_APIENTRY CompileShader(GLuint shader)
364 {
365 EVENT("(GLuint shader = %u)", shader);
366
367 Context *context = GetValidGlobalContext();
368 if (context)
369 {
370 context->gatherParams<EntryPoint::CompileShader>(shader);
371
372 if (context->skipValidation() || ValidateCompileShader(context, shader))
373 {
374 context->compileShader(shader);
375 }
376 }
377 }
378
CompressedTexImage2D(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLint border,GLsizei imageSize,const void * data)379 void GL_APIENTRY CompressedTexImage2D(GLenum target,
380 GLint level,
381 GLenum internalformat,
382 GLsizei width,
383 GLsizei height,
384 GLint border,
385 GLsizei imageSize,
386 const void *data)
387 {
388 EVENT(
389 "(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = "
390 "%d, GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const void *data = "
391 "0x%0.8p)",
392 target, level, internalformat, width, height, border, imageSize, data);
393
394 Context *context = GetValidGlobalContext();
395 if (context)
396 {
397 context->gatherParams<EntryPoint::CompressedTexImage2D>(
398 target, level, internalformat, width, height, border, imageSize, data);
399
400 if (context->skipValidation() ||
401 ValidateCompressedTexImage2D(context, target, level, internalformat, width, height,
402 border, imageSize, data))
403 {
404 context->compressedTexImage2D(target, level, internalformat, width, height, border,
405 imageSize, data);
406 }
407 }
408 }
409
CompressedTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,const void * data)410 void GL_APIENTRY CompressedTexSubImage2D(GLenum target,
411 GLint level,
412 GLint xoffset,
413 GLint yoffset,
414 GLsizei width,
415 GLsizei height,
416 GLenum format,
417 GLsizei imageSize,
418 const void *data)
419 {
420 EVENT(
421 "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
422 "width = %d, GLsizei height = %d, GLenum format = 0x%X, GLsizei imageSize = %d, const void "
423 "*data = 0x%0.8p)",
424 target, level, xoffset, yoffset, width, height, format, imageSize, data);
425
426 Context *context = GetValidGlobalContext();
427 if (context)
428 {
429 context->gatherParams<EntryPoint::CompressedTexSubImage2D>(
430 target, level, xoffset, yoffset, width, height, format, imageSize, data);
431
432 if (context->skipValidation() ||
433 ValidateCompressedTexSubImage2D(context, target, level, xoffset, yoffset, width, height,
434 format, imageSize, data))
435 {
436 context->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format,
437 imageSize, data);
438 }
439 }
440 }
441
CopyTexImage2D(GLenum target,GLint level,GLenum internalformat,GLint x,GLint y,GLsizei width,GLsizei height,GLint border)442 void GL_APIENTRY CopyTexImage2D(GLenum target,
443 GLint level,
444 GLenum internalformat,
445 GLint x,
446 GLint y,
447 GLsizei width,
448 GLsizei height,
449 GLint border)
450 {
451 EVENT(
452 "(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLint x = %d, "
453 "GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLint border = %d)",
454 target, level, internalformat, x, y, width, height, border);
455
456 Context *context = GetValidGlobalContext();
457 if (context)
458 {
459 context->gatherParams<EntryPoint::CopyTexImage2D>(target, level, internalformat, x, y,
460 width, height, border);
461
462 if (context->skipValidation() ||
463 ValidateCopyTexImage2D(context, target, level, internalformat, x, y, width, height,
464 border))
465 {
466 context->copyTexImage2D(target, level, internalformat, x, y, width, height, border);
467 }
468 }
469 }
470
CopyTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint x,GLint y,GLsizei width,GLsizei height)471 void GL_APIENTRY CopyTexSubImage2D(GLenum target,
472 GLint level,
473 GLint xoffset,
474 GLint yoffset,
475 GLint x,
476 GLint y,
477 GLsizei width,
478 GLsizei height)
479 {
480 EVENT(
481 "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint x "
482 "= %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
483 target, level, xoffset, yoffset, x, y, width, height);
484
485 Context *context = GetValidGlobalContext();
486 if (context)
487 {
488 context->gatherParams<EntryPoint::CopyTexSubImage2D>(target, level, xoffset, yoffset, x, y,
489 width, height);
490
491 if (context->skipValidation() || ValidateCopyTexSubImage2D(context, target, level, xoffset,
492 yoffset, x, y, width, height))
493 {
494 context->copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
495 }
496 }
497 }
498
CreateProgram()499 GLuint GL_APIENTRY CreateProgram()
500 {
501 EVENT("()");
502
503 Context *context = GetValidGlobalContext();
504 if (context)
505 {
506 context->gatherParams<EntryPoint::CreateProgram>();
507
508 if (context->skipValidation() || ValidateCreateProgram(context))
509 {
510 return context->createProgram();
511 }
512 }
513
514 return GetDefaultReturnValue<EntryPoint::CreateProgram, GLuint>();
515 }
516
CreateShader(GLenum type)517 GLuint GL_APIENTRY CreateShader(GLenum type)
518 {
519 EVENT("(GLenum type = 0x%X)", type);
520
521 Context *context = GetValidGlobalContext();
522 if (context)
523 {
524 context->gatherParams<EntryPoint::CreateShader>(type);
525
526 if (context->skipValidation() || ValidateCreateShader(context, type))
527 {
528 return context->createShader(type);
529 }
530 }
531
532 return GetDefaultReturnValue<EntryPoint::CreateShader, GLuint>();
533 }
534
CullFace(GLenum mode)535 void GL_APIENTRY CullFace(GLenum mode)
536 {
537 EVENT("(GLenum mode = 0x%X)", mode);
538
539 Context *context = GetValidGlobalContext();
540 if (context)
541 {
542 CullFaceMode modePacked = FromGLenum<CullFaceMode>(mode);
543 context->gatherParams<EntryPoint::CullFace>(modePacked);
544
545 if (context->skipValidation() || ValidateCullFace(context, modePacked))
546 {
547 context->cullFace(modePacked);
548 }
549 }
550 }
551
DeleteBuffers(GLsizei n,const GLuint * buffers)552 void GL_APIENTRY DeleteBuffers(GLsizei n, const GLuint *buffers)
553 {
554 EVENT("(GLsizei n = %d, const GLuint *buffers = 0x%0.8p)", n, buffers);
555
556 Context *context = GetValidGlobalContext();
557 if (context)
558 {
559 context->gatherParams<EntryPoint::DeleteBuffers>(n, buffers);
560
561 if (context->skipValidation() || ValidateDeleteBuffers(context, n, buffers))
562 {
563 context->deleteBuffers(n, buffers);
564 }
565 }
566 }
567
DeleteFramebuffers(GLsizei n,const GLuint * framebuffers)568 void GL_APIENTRY DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
569 {
570 EVENT("(GLsizei n = %d, const GLuint *framebuffers = 0x%0.8p)", n, framebuffers);
571
572 Context *context = GetValidGlobalContext();
573 if (context)
574 {
575 context->gatherParams<EntryPoint::DeleteFramebuffers>(n, framebuffers);
576
577 if (context->skipValidation() || ValidateDeleteFramebuffers(context, n, framebuffers))
578 {
579 context->deleteFramebuffers(n, framebuffers);
580 }
581 }
582 }
583
DeleteProgram(GLuint program)584 void GL_APIENTRY DeleteProgram(GLuint program)
585 {
586 EVENT("(GLuint program = %u)", program);
587
588 Context *context = GetValidGlobalContext();
589 if (context)
590 {
591 context->gatherParams<EntryPoint::DeleteProgram>(program);
592
593 if (context->skipValidation() || ValidateDeleteProgram(context, program))
594 {
595 context->deleteProgram(program);
596 }
597 }
598 }
599
DeleteRenderbuffers(GLsizei n,const GLuint * renderbuffers)600 void GL_APIENTRY DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
601 {
602 EVENT("(GLsizei n = %d, const GLuint *renderbuffers = 0x%0.8p)", n, renderbuffers);
603
604 Context *context = GetValidGlobalContext();
605 if (context)
606 {
607 context->gatherParams<EntryPoint::DeleteRenderbuffers>(n, renderbuffers);
608
609 if (context->skipValidation() || ValidateDeleteRenderbuffers(context, n, renderbuffers))
610 {
611 context->deleteRenderbuffers(n, renderbuffers);
612 }
613 }
614 }
615
DeleteShader(GLuint shader)616 void GL_APIENTRY DeleteShader(GLuint shader)
617 {
618 EVENT("(GLuint shader = %u)", shader);
619
620 Context *context = GetValidGlobalContext();
621 if (context)
622 {
623 context->gatherParams<EntryPoint::DeleteShader>(shader);
624
625 if (context->skipValidation() || ValidateDeleteShader(context, shader))
626 {
627 context->deleteShader(shader);
628 }
629 }
630 }
631
DeleteTextures(GLsizei n,const GLuint * textures)632 void GL_APIENTRY DeleteTextures(GLsizei n, const GLuint *textures)
633 {
634 EVENT("(GLsizei n = %d, const GLuint *textures = 0x%0.8p)", n, textures);
635
636 Context *context = GetValidGlobalContext();
637 if (context)
638 {
639 context->gatherParams<EntryPoint::DeleteTextures>(n, textures);
640
641 if (context->skipValidation() || ValidateDeleteTextures(context, n, textures))
642 {
643 context->deleteTextures(n, textures);
644 }
645 }
646 }
647
DepthFunc(GLenum func)648 void GL_APIENTRY DepthFunc(GLenum func)
649 {
650 EVENT("(GLenum func = 0x%X)", func);
651
652 Context *context = GetValidGlobalContext();
653 if (context)
654 {
655 context->gatherParams<EntryPoint::DepthFunc>(func);
656
657 if (context->skipValidation() || ValidateDepthFunc(context, func))
658 {
659 context->depthFunc(func);
660 }
661 }
662 }
663
DepthMask(GLboolean flag)664 void GL_APIENTRY DepthMask(GLboolean flag)
665 {
666 EVENT("(GLboolean flag = %u)", flag);
667
668 Context *context = GetValidGlobalContext();
669 if (context)
670 {
671 context->gatherParams<EntryPoint::DepthMask>(flag);
672
673 if (context->skipValidation() || ValidateDepthMask(context, flag))
674 {
675 context->depthMask(flag);
676 }
677 }
678 }
679
DepthRangef(GLfloat n,GLfloat f)680 void GL_APIENTRY DepthRangef(GLfloat n, GLfloat f)
681 {
682 EVENT("(GLfloat n = %f, GLfloat f = %f)", n, f);
683
684 Context *context = GetValidGlobalContext();
685 if (context)
686 {
687 context->gatherParams<EntryPoint::DepthRangef>(n, f);
688
689 if (context->skipValidation() || ValidateDepthRangef(context, n, f))
690 {
691 context->depthRangef(n, f);
692 }
693 }
694 }
695
DetachShader(GLuint program,GLuint shader)696 void GL_APIENTRY DetachShader(GLuint program, GLuint shader)
697 {
698 EVENT("(GLuint program = %u, GLuint shader = %u)", program, shader);
699
700 Context *context = GetValidGlobalContext();
701 if (context)
702 {
703 context->gatherParams<EntryPoint::DetachShader>(program, shader);
704
705 if (context->skipValidation() || ValidateDetachShader(context, program, shader))
706 {
707 context->detachShader(program, shader);
708 }
709 }
710 }
711
Disable(GLenum cap)712 void GL_APIENTRY Disable(GLenum cap)
713 {
714 EVENT("(GLenum cap = 0x%X)", cap);
715
716 Context *context = GetValidGlobalContext();
717 if (context)
718 {
719 context->gatherParams<EntryPoint::Disable>(cap);
720
721 if (context->skipValidation() || ValidateDisable(context, cap))
722 {
723 context->disable(cap);
724 }
725 }
726 }
727
DisableVertexAttribArray(GLuint index)728 void GL_APIENTRY DisableVertexAttribArray(GLuint index)
729 {
730 EVENT("(GLuint index = %u)", index);
731
732 Context *context = GetValidGlobalContext();
733 if (context)
734 {
735 context->gatherParams<EntryPoint::DisableVertexAttribArray>(index);
736
737 if (context->skipValidation() || ValidateDisableVertexAttribArray(context, index))
738 {
739 context->disableVertexAttribArray(index);
740 }
741 }
742 }
743
DrawArrays(GLenum mode,GLint first,GLsizei count)744 void GL_APIENTRY DrawArrays(GLenum mode, GLint first, GLsizei count)
745 {
746 EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d)", mode, first, count);
747
748 Context *context = GetValidGlobalContext();
749 if (context)
750 {
751 context->gatherParams<EntryPoint::DrawArrays>(mode, first, count);
752
753 if (context->skipValidation() || ValidateDrawArrays(context, mode, first, count))
754 {
755 context->drawArrays(mode, first, count);
756 }
757 }
758 }
759
DrawElements(GLenum mode,GLsizei count,GLenum type,const void * indices)760 void GL_APIENTRY DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
761 {
762 EVENT(
763 "(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = "
764 "0x%0.8p)",
765 mode, count, type, indices);
766
767 Context *context = GetValidGlobalContext();
768 if (context)
769 {
770 context->gatherParams<EntryPoint::DrawElements>(mode, count, type, indices);
771
772 if (context->skipValidation() || ValidateDrawElements(context, mode, count, type, indices))
773 {
774 context->drawElements(mode, count, type, indices);
775 }
776 }
777 }
778
Enable(GLenum cap)779 void GL_APIENTRY Enable(GLenum cap)
780 {
781 EVENT("(GLenum cap = 0x%X)", cap);
782
783 Context *context = GetValidGlobalContext();
784 if (context)
785 {
786 context->gatherParams<EntryPoint::Enable>(cap);
787
788 if (context->skipValidation() || ValidateEnable(context, cap))
789 {
790 context->enable(cap);
791 }
792 }
793 }
794
EnableVertexAttribArray(GLuint index)795 void GL_APIENTRY EnableVertexAttribArray(GLuint index)
796 {
797 EVENT("(GLuint index = %u)", index);
798
799 Context *context = GetValidGlobalContext();
800 if (context)
801 {
802 context->gatherParams<EntryPoint::EnableVertexAttribArray>(index);
803
804 if (context->skipValidation() || ValidateEnableVertexAttribArray(context, index))
805 {
806 context->enableVertexAttribArray(index);
807 }
808 }
809 }
810
Finish()811 void GL_APIENTRY Finish()
812 {
813 EVENT("()");
814
815 Context *context = GetValidGlobalContext();
816 if (context)
817 {
818 context->gatherParams<EntryPoint::Finish>();
819
820 if (context->skipValidation() || ValidateFinish(context))
821 {
822 context->finish();
823 }
824 }
825 }
826
Flush()827 void GL_APIENTRY Flush()
828 {
829 EVENT("()");
830
831 Context *context = GetValidGlobalContext();
832 if (context)
833 {
834 context->gatherParams<EntryPoint::Flush>();
835
836 if (context->skipValidation() || ValidateFlush(context))
837 {
838 context->flush();
839 }
840 }
841 }
842
FramebufferRenderbuffer(GLenum target,GLenum attachment,GLenum renderbuffertarget,GLuint renderbuffer)843 void GL_APIENTRY FramebufferRenderbuffer(GLenum target,
844 GLenum attachment,
845 GLenum renderbuffertarget,
846 GLuint renderbuffer)
847 {
848 EVENT(
849 "(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum renderbuffertarget = 0x%X, GLuint "
850 "renderbuffer = %u)",
851 target, attachment, renderbuffertarget, renderbuffer);
852
853 Context *context = GetValidGlobalContext();
854 if (context)
855 {
856 context->gatherParams<EntryPoint::FramebufferRenderbuffer>(
857 target, attachment, renderbuffertarget, renderbuffer);
858
859 if (context->skipValidation() ||
860 ValidateFramebufferRenderbuffer(context, target, attachment, renderbuffertarget,
861 renderbuffer))
862 {
863 context->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
864 }
865 }
866 }
867
FramebufferTexture2D(GLenum target,GLenum attachment,GLenum textarget,GLuint texture,GLint level)868 void GL_APIENTRY FramebufferTexture2D(GLenum target,
869 GLenum attachment,
870 GLenum textarget,
871 GLuint texture,
872 GLint level)
873 {
874 EVENT(
875 "(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum textarget = 0x%X, GLuint texture "
876 "= %u, GLint level = %d)",
877 target, attachment, textarget, texture, level);
878
879 Context *context = GetValidGlobalContext();
880 if (context)
881 {
882 context->gatherParams<EntryPoint::FramebufferTexture2D>(target, attachment, textarget,
883 texture, level);
884
885 if (context->skipValidation() ||
886 ValidateFramebufferTexture2D(context, target, attachment, textarget, texture, level))
887 {
888 context->framebufferTexture2D(target, attachment, textarget, texture, level);
889 }
890 }
891 }
892
FrontFace(GLenum mode)893 void GL_APIENTRY FrontFace(GLenum mode)
894 {
895 EVENT("(GLenum mode = 0x%X)", mode);
896
897 Context *context = GetValidGlobalContext();
898 if (context)
899 {
900 context->gatherParams<EntryPoint::FrontFace>(mode);
901
902 if (context->skipValidation() || ValidateFrontFace(context, mode))
903 {
904 context->frontFace(mode);
905 }
906 }
907 }
908
GenBuffers(GLsizei n,GLuint * buffers)909 void GL_APIENTRY GenBuffers(GLsizei n, GLuint *buffers)
910 {
911 EVENT("(GLsizei n = %d, GLuint *buffers = 0x%0.8p)", n, buffers);
912
913 Context *context = GetValidGlobalContext();
914 if (context)
915 {
916 context->gatherParams<EntryPoint::GenBuffers>(n, buffers);
917
918 if (context->skipValidation() || ValidateGenBuffers(context, n, buffers))
919 {
920 context->genBuffers(n, buffers);
921 }
922 }
923 }
924
GenerateMipmap(GLenum target)925 void GL_APIENTRY GenerateMipmap(GLenum target)
926 {
927 EVENT("(GLenum target = 0x%X)", target);
928
929 Context *context = GetValidGlobalContext();
930 if (context)
931 {
932 context->gatherParams<EntryPoint::GenerateMipmap>(target);
933
934 if (context->skipValidation() || ValidateGenerateMipmap(context, target))
935 {
936 context->generateMipmap(target);
937 }
938 }
939 }
940
GenFramebuffers(GLsizei n,GLuint * framebuffers)941 void GL_APIENTRY GenFramebuffers(GLsizei n, GLuint *framebuffers)
942 {
943 EVENT("(GLsizei n = %d, GLuint *framebuffers = 0x%0.8p)", n, framebuffers);
944
945 Context *context = GetValidGlobalContext();
946 if (context)
947 {
948 context->gatherParams<EntryPoint::GenFramebuffers>(n, framebuffers);
949
950 if (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffers))
951 {
952 context->genFramebuffers(n, framebuffers);
953 }
954 }
955 }
956
GenRenderbuffers(GLsizei n,GLuint * renderbuffers)957 void GL_APIENTRY GenRenderbuffers(GLsizei n, GLuint *renderbuffers)
958 {
959 EVENT("(GLsizei n = %d, GLuint *renderbuffers = 0x%0.8p)", n, renderbuffers);
960
961 Context *context = GetValidGlobalContext();
962 if (context)
963 {
964 context->gatherParams<EntryPoint::GenRenderbuffers>(n, renderbuffers);
965
966 if (context->skipValidation() || ValidateGenRenderbuffers(context, n, renderbuffers))
967 {
968 context->genRenderbuffers(n, renderbuffers);
969 }
970 }
971 }
972
GenTextures(GLsizei n,GLuint * textures)973 void GL_APIENTRY GenTextures(GLsizei n, GLuint *textures)
974 {
975 EVENT("(GLsizei n = %d, GLuint *textures = 0x%0.8p)", n, textures);
976
977 Context *context = GetValidGlobalContext();
978 if (context)
979 {
980 context->gatherParams<EntryPoint::GenTextures>(n, textures);
981
982 if (context->skipValidation() || ValidateGenTextures(context, n, textures))
983 {
984 context->genTextures(n, textures);
985 }
986 }
987 }
988
GetActiveAttrib(GLuint program,GLuint index,GLsizei bufSize,GLsizei * length,GLint * size,GLenum * type,GLchar * name)989 void GL_APIENTRY GetActiveAttrib(GLuint program,
990 GLuint index,
991 GLsizei bufSize,
992 GLsizei *length,
993 GLint *size,
994 GLenum *type,
995 GLchar *name)
996 {
997 EVENT(
998 "(GLuint program = %u, GLuint index = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, "
999 "GLint *size = 0x%0.8p, GLenum *type = 0x%0.8p, GLchar *name = 0x%0.8p)",
1000 program, index, bufSize, length, size, type, name);
1001
1002 Context *context = GetValidGlobalContext();
1003 if (context)
1004 {
1005 context->gatherParams<EntryPoint::GetActiveAttrib>(program, index, bufSize, length, size,
1006 type, name);
1007
1008 if (context->skipValidation() ||
1009 ValidateGetActiveAttrib(context, program, index, bufSize, length, size, type, name))
1010 {
1011 context->getActiveAttrib(program, index, bufSize, length, size, type, name);
1012 }
1013 }
1014 }
1015
GetActiveUniform(GLuint program,GLuint index,GLsizei bufSize,GLsizei * length,GLint * size,GLenum * type,GLchar * name)1016 void GL_APIENTRY GetActiveUniform(GLuint program,
1017 GLuint index,
1018 GLsizei bufSize,
1019 GLsizei *length,
1020 GLint *size,
1021 GLenum *type,
1022 GLchar *name)
1023 {
1024 EVENT(
1025 "(GLuint program = %u, GLuint index = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, "
1026 "GLint *size = 0x%0.8p, GLenum *type = 0x%0.8p, GLchar *name = 0x%0.8p)",
1027 program, index, bufSize, length, size, type, name);
1028
1029 Context *context = GetValidGlobalContext();
1030 if (context)
1031 {
1032 context->gatherParams<EntryPoint::GetActiveUniform>(program, index, bufSize, length, size,
1033 type, name);
1034
1035 if (context->skipValidation() ||
1036 ValidateGetActiveUniform(context, program, index, bufSize, length, size, type, name))
1037 {
1038 context->getActiveUniform(program, index, bufSize, length, size, type, name);
1039 }
1040 }
1041 }
1042
GetAttachedShaders(GLuint program,GLsizei maxCount,GLsizei * count,GLuint * shaders)1043 void GL_APIENTRY GetAttachedShaders(GLuint program,
1044 GLsizei maxCount,
1045 GLsizei *count,
1046 GLuint *shaders)
1047 {
1048 EVENT(
1049 "(GLuint program = %u, GLsizei maxCount = %d, GLsizei *count = 0x%0.8p, GLuint *shaders = "
1050 "0x%0.8p)",
1051 program, maxCount, count, shaders);
1052
1053 Context *context = GetValidGlobalContext();
1054 if (context)
1055 {
1056 context->gatherParams<EntryPoint::GetAttachedShaders>(program, maxCount, count, shaders);
1057
1058 if (context->skipValidation() ||
1059 ValidateGetAttachedShaders(context, program, maxCount, count, shaders))
1060 {
1061 context->getAttachedShaders(program, maxCount, count, shaders);
1062 }
1063 }
1064 }
1065
GetAttribLocation(GLuint program,const GLchar * name)1066 GLint GL_APIENTRY GetAttribLocation(GLuint program, const GLchar *name)
1067 {
1068 EVENT("(GLuint program = %u, const GLchar *name = 0x%0.8p)", program, name);
1069
1070 Context *context = GetValidGlobalContext();
1071 if (context)
1072 {
1073 context->gatherParams<EntryPoint::GetAttribLocation>(program, name);
1074
1075 if (context->skipValidation() || ValidateGetAttribLocation(context, program, name))
1076 {
1077 return context->getAttribLocation(program, name);
1078 }
1079 }
1080
1081 return GetDefaultReturnValue<EntryPoint::GetAttribLocation, GLint>();
1082 }
1083
GetBooleanv(GLenum pname,GLboolean * data)1084 void GL_APIENTRY GetBooleanv(GLenum pname, GLboolean *data)
1085 {
1086 EVENT("(GLenum pname = 0x%X, GLboolean *data = 0x%0.8p)", pname, data);
1087
1088 Context *context = GetValidGlobalContext();
1089 if (context)
1090 {
1091 context->gatherParams<EntryPoint::GetBooleanv>(pname, data);
1092
1093 if (context->skipValidation() || ValidateGetBooleanv(context, pname, data))
1094 {
1095 context->getBooleanv(pname, data);
1096 }
1097 }
1098 }
1099
GetBufferParameteriv(GLenum target,GLenum pname,GLint * params)1100 void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
1101 {
1102 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
1103 params);
1104
1105 Context *context = GetValidGlobalContext();
1106 if (context)
1107 {
1108 BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
1109 context->gatherParams<EntryPoint::GetBufferParameteriv>(targetPacked, pname, params);
1110
1111 if (context->skipValidation() ||
1112 ValidateGetBufferParameteriv(context, targetPacked, pname, params))
1113 {
1114 context->getBufferParameteriv(targetPacked, pname, params);
1115 }
1116 }
1117 }
1118
GetError()1119 GLenum GL_APIENTRY GetError()
1120 {
1121 EVENT("()");
1122
1123 Context *context = GetGlobalContext();
1124 if (context)
1125 {
1126 context->gatherParams<EntryPoint::GetError>();
1127
1128 if (context->skipValidation() || ValidateGetError(context))
1129 {
1130 return context->getError();
1131 }
1132 }
1133
1134 return GetDefaultReturnValue<EntryPoint::GetError, GLenum>();
1135 }
1136
GetFloatv(GLenum pname,GLfloat * data)1137 void GL_APIENTRY GetFloatv(GLenum pname, GLfloat *data)
1138 {
1139 EVENT("(GLenum pname = 0x%X, GLfloat *data = 0x%0.8p)", pname, data);
1140
1141 Context *context = GetValidGlobalContext();
1142 if (context)
1143 {
1144 context->gatherParams<EntryPoint::GetFloatv>(pname, data);
1145
1146 if (context->skipValidation() || ValidateGetFloatv(context, pname, data))
1147 {
1148 context->getFloatv(pname, data);
1149 }
1150 }
1151 }
1152
GetFramebufferAttachmentParameteriv(GLenum target,GLenum attachment,GLenum pname,GLint * params)1153 void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target,
1154 GLenum attachment,
1155 GLenum pname,
1156 GLint *params)
1157 {
1158 EVENT(
1159 "(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum pname = 0x%X, GLint *params = "
1160 "0x%0.8p)",
1161 target, attachment, pname, params);
1162
1163 Context *context = GetValidGlobalContext();
1164 if (context)
1165 {
1166 context->gatherParams<EntryPoint::GetFramebufferAttachmentParameteriv>(target, attachment,
1167 pname, params);
1168
1169 if (context->skipValidation() ||
1170 ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname, params))
1171 {
1172 context->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
1173 }
1174 }
1175 }
1176
GetIntegerv(GLenum pname,GLint * data)1177 void GL_APIENTRY GetIntegerv(GLenum pname, GLint *data)
1178 {
1179 EVENT("(GLenum pname = 0x%X, GLint *data = 0x%0.8p)", pname, data);
1180
1181 Context *context = GetValidGlobalContext();
1182 if (context)
1183 {
1184 context->gatherParams<EntryPoint::GetIntegerv>(pname, data);
1185
1186 if (context->skipValidation() || ValidateGetIntegerv(context, pname, data))
1187 {
1188 context->getIntegerv(pname, data);
1189 }
1190 }
1191 }
1192
GetProgramiv(GLuint program,GLenum pname,GLint * params)1193 void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint *params)
1194 {
1195 EVENT("(GLuint program = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", program, pname,
1196 params);
1197
1198 Context *context = GetValidGlobalContext();
1199 if (context)
1200 {
1201 context->gatherParams<EntryPoint::GetProgramiv>(program, pname, params);
1202
1203 if (context->skipValidation() || ValidateGetProgramiv(context, program, pname, params))
1204 {
1205 context->getProgramiv(program, pname, params);
1206 }
1207 }
1208 }
1209
GetProgramInfoLog(GLuint program,GLsizei bufSize,GLsizei * length,GLchar * infoLog)1210 void GL_APIENTRY GetProgramInfoLog(GLuint program,
1211 GLsizei bufSize,
1212 GLsizei *length,
1213 GLchar *infoLog)
1214 {
1215 EVENT(
1216 "(GLuint program = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar *infoLog = "
1217 "0x%0.8p)",
1218 program, bufSize, length, infoLog);
1219
1220 Context *context = GetValidGlobalContext();
1221 if (context)
1222 {
1223 context->gatherParams<EntryPoint::GetProgramInfoLog>(program, bufSize, length, infoLog);
1224
1225 if (context->skipValidation() ||
1226 ValidateGetProgramInfoLog(context, program, bufSize, length, infoLog))
1227 {
1228 context->getProgramInfoLog(program, bufSize, length, infoLog);
1229 }
1230 }
1231 }
1232
GetRenderbufferParameteriv(GLenum target,GLenum pname,GLint * params)1233 void GL_APIENTRY GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
1234 {
1235 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
1236 params);
1237
1238 Context *context = GetValidGlobalContext();
1239 if (context)
1240 {
1241 context->gatherParams<EntryPoint::GetRenderbufferParameteriv>(target, pname, params);
1242
1243 if (context->skipValidation() ||
1244 ValidateGetRenderbufferParameteriv(context, target, pname, params))
1245 {
1246 context->getRenderbufferParameteriv(target, pname, params);
1247 }
1248 }
1249 }
1250
GetShaderiv(GLuint shader,GLenum pname,GLint * params)1251 void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint *params)
1252 {
1253 EVENT("(GLuint shader = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", shader, pname,
1254 params);
1255
1256 Context *context = GetValidGlobalContext();
1257 if (context)
1258 {
1259 context->gatherParams<EntryPoint::GetShaderiv>(shader, pname, params);
1260
1261 if (context->skipValidation() || ValidateGetShaderiv(context, shader, pname, params))
1262 {
1263 context->getShaderiv(shader, pname, params);
1264 }
1265 }
1266 }
1267
GetShaderInfoLog(GLuint shader,GLsizei bufSize,GLsizei * length,GLchar * infoLog)1268 void GL_APIENTRY GetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
1269 {
1270 EVENT(
1271 "(GLuint shader = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar *infoLog = "
1272 "0x%0.8p)",
1273 shader, bufSize, length, infoLog);
1274
1275 Context *context = GetValidGlobalContext();
1276 if (context)
1277 {
1278 context->gatherParams<EntryPoint::GetShaderInfoLog>(shader, bufSize, length, infoLog);
1279
1280 if (context->skipValidation() ||
1281 ValidateGetShaderInfoLog(context, shader, bufSize, length, infoLog))
1282 {
1283 context->getShaderInfoLog(shader, bufSize, length, infoLog);
1284 }
1285 }
1286 }
1287
GetShaderPrecisionFormat(GLenum shadertype,GLenum precisiontype,GLint * range,GLint * precision)1288 void GL_APIENTRY GetShaderPrecisionFormat(GLenum shadertype,
1289 GLenum precisiontype,
1290 GLint *range,
1291 GLint *precision)
1292 {
1293 EVENT(
1294 "(GLenum shadertype = 0x%X, GLenum precisiontype = 0x%X, GLint *range = 0x%0.8p, GLint "
1295 "*precision = 0x%0.8p)",
1296 shadertype, precisiontype, range, precision);
1297
1298 Context *context = GetValidGlobalContext();
1299 if (context)
1300 {
1301 context->gatherParams<EntryPoint::GetShaderPrecisionFormat>(shadertype, precisiontype,
1302 range, precision);
1303
1304 if (context->skipValidation() ||
1305 ValidateGetShaderPrecisionFormat(context, shadertype, precisiontype, range, precision))
1306 {
1307 context->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
1308 }
1309 }
1310 }
1311
GetShaderSource(GLuint shader,GLsizei bufSize,GLsizei * length,GLchar * source)1312 void GL_APIENTRY GetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
1313 {
1314 EVENT(
1315 "(GLuint shader = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar *source = "
1316 "0x%0.8p)",
1317 shader, bufSize, length, source);
1318
1319 Context *context = GetValidGlobalContext();
1320 if (context)
1321 {
1322 context->gatherParams<EntryPoint::GetShaderSource>(shader, bufSize, length, source);
1323
1324 if (context->skipValidation() ||
1325 ValidateGetShaderSource(context, shader, bufSize, length, source))
1326 {
1327 context->getShaderSource(shader, bufSize, length, source);
1328 }
1329 }
1330 }
1331
GetString(GLenum name)1332 const GLubyte *GL_APIENTRY GetString(GLenum name)
1333 {
1334 EVENT("(GLenum name = 0x%X)", name);
1335
1336 Context *context = GetValidGlobalContext();
1337 if (context)
1338 {
1339 context->gatherParams<EntryPoint::GetString>(name);
1340
1341 if (context->skipValidation() || ValidateGetString(context, name))
1342 {
1343 return context->getString(name);
1344 }
1345 }
1346
1347 return GetDefaultReturnValue<EntryPoint::GetString, const GLubyte *>();
1348 }
1349
GetTexParameterfv(GLenum target,GLenum pname,GLfloat * params)1350 void GL_APIENTRY GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
1351 {
1352 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLfloat *params = 0x%0.8p)", target, pname,
1353 params);
1354
1355 Context *context = GetValidGlobalContext();
1356 if (context)
1357 {
1358 context->gatherParams<EntryPoint::GetTexParameterfv>(target, pname, params);
1359
1360 if (context->skipValidation() || ValidateGetTexParameterfv(context, target, pname, params))
1361 {
1362 context->getTexParameterfv(target, pname, params);
1363 }
1364 }
1365 }
1366
GetTexParameteriv(GLenum target,GLenum pname,GLint * params)1367 void GL_APIENTRY GetTexParameteriv(GLenum target, GLenum pname, GLint *params)
1368 {
1369 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
1370 params);
1371
1372 Context *context = GetValidGlobalContext();
1373 if (context)
1374 {
1375 context->gatherParams<EntryPoint::GetTexParameteriv>(target, pname, params);
1376
1377 if (context->skipValidation() || ValidateGetTexParameteriv(context, target, pname, params))
1378 {
1379 context->getTexParameteriv(target, pname, params);
1380 }
1381 }
1382 }
1383
GetUniformfv(GLuint program,GLint location,GLfloat * params)1384 void GL_APIENTRY GetUniformfv(GLuint program, GLint location, GLfloat *params)
1385 {
1386 EVENT("(GLuint program = %u, GLint location = %d, GLfloat *params = 0x%0.8p)", program,
1387 location, params);
1388
1389 Context *context = GetValidGlobalContext();
1390 if (context)
1391 {
1392 context->gatherParams<EntryPoint::GetUniformfv>(program, location, params);
1393
1394 if (context->skipValidation() || ValidateGetUniformfv(context, program, location, params))
1395 {
1396 context->getUniformfv(program, location, params);
1397 }
1398 }
1399 }
1400
GetUniformiv(GLuint program,GLint location,GLint * params)1401 void GL_APIENTRY GetUniformiv(GLuint program, GLint location, GLint *params)
1402 {
1403 EVENT("(GLuint program = %u, GLint location = %d, GLint *params = 0x%0.8p)", program, location,
1404 params);
1405
1406 Context *context = GetValidGlobalContext();
1407 if (context)
1408 {
1409 context->gatherParams<EntryPoint::GetUniformiv>(program, location, params);
1410
1411 if (context->skipValidation() || ValidateGetUniformiv(context, program, location, params))
1412 {
1413 context->getUniformiv(program, location, params);
1414 }
1415 }
1416 }
1417
GetUniformLocation(GLuint program,const GLchar * name)1418 GLint GL_APIENTRY GetUniformLocation(GLuint program, const GLchar *name)
1419 {
1420 EVENT("(GLuint program = %u, const GLchar *name = 0x%0.8p)", program, name);
1421
1422 Context *context = GetValidGlobalContext();
1423 if (context)
1424 {
1425 context->gatherParams<EntryPoint::GetUniformLocation>(program, name);
1426
1427 if (context->skipValidation() || ValidateGetUniformLocation(context, program, name))
1428 {
1429 return context->getUniformLocation(program, name);
1430 }
1431 }
1432
1433 return GetDefaultReturnValue<EntryPoint::GetUniformLocation, GLint>();
1434 }
1435
GetVertexAttribfv(GLuint index,GLenum pname,GLfloat * params)1436 void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
1437 {
1438 EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLfloat *params = 0x%0.8p)", index, pname,
1439 params);
1440
1441 Context *context = GetValidGlobalContext();
1442 if (context)
1443 {
1444 context->gatherParams<EntryPoint::GetVertexAttribfv>(index, pname, params);
1445
1446 if (context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params))
1447 {
1448 context->getVertexAttribfv(index, pname, params);
1449 }
1450 }
1451 }
1452
GetVertexAttribiv(GLuint index,GLenum pname,GLint * params)1453 void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
1454 {
1455 EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", index, pname,
1456 params);
1457
1458 Context *context = GetValidGlobalContext();
1459 if (context)
1460 {
1461 context->gatherParams<EntryPoint::GetVertexAttribiv>(index, pname, params);
1462
1463 if (context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params))
1464 {
1465 context->getVertexAttribiv(index, pname, params);
1466 }
1467 }
1468 }
1469
GetVertexAttribPointerv(GLuint index,GLenum pname,void ** pointer)1470 void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
1471 {
1472 EVENT("(GLuint index = %u, GLenum pname = 0x%X, void **pointer = 0x%0.8p)", index, pname,
1473 pointer);
1474
1475 Context *context = GetValidGlobalContext();
1476 if (context)
1477 {
1478 context->gatherParams<EntryPoint::GetVertexAttribPointerv>(index, pname, pointer);
1479
1480 if (context->skipValidation() ||
1481 ValidateGetVertexAttribPointerv(context, index, pname, pointer))
1482 {
1483 context->getVertexAttribPointerv(index, pname, pointer);
1484 }
1485 }
1486 }
1487
Hint(GLenum target,GLenum mode)1488 void GL_APIENTRY Hint(GLenum target, GLenum mode)
1489 {
1490 EVENT("(GLenum target = 0x%X, GLenum mode = 0x%X)", target, mode);
1491
1492 Context *context = GetValidGlobalContext();
1493 if (context)
1494 {
1495 context->gatherParams<EntryPoint::Hint>(target, mode);
1496
1497 if (context->skipValidation() || ValidateHint(context, target, mode))
1498 {
1499 context->hint(target, mode);
1500 }
1501 }
1502 }
1503
IsBuffer(GLuint buffer)1504 GLboolean GL_APIENTRY IsBuffer(GLuint buffer)
1505 {
1506 EVENT("(GLuint buffer = %u)", buffer);
1507
1508 Context *context = GetValidGlobalContext();
1509 if (context)
1510 {
1511 context->gatherParams<EntryPoint::IsBuffer>(buffer);
1512
1513 if (context->skipValidation() || ValidateIsBuffer(context, buffer))
1514 {
1515 return context->isBuffer(buffer);
1516 }
1517 }
1518
1519 return GetDefaultReturnValue<EntryPoint::IsBuffer, GLboolean>();
1520 }
1521
IsEnabled(GLenum cap)1522 GLboolean GL_APIENTRY IsEnabled(GLenum cap)
1523 {
1524 EVENT("(GLenum cap = 0x%X)", cap);
1525
1526 Context *context = GetValidGlobalContext();
1527 if (context)
1528 {
1529 context->gatherParams<EntryPoint::IsEnabled>(cap);
1530
1531 if (context->skipValidation() || ValidateIsEnabled(context, cap))
1532 {
1533 return context->isEnabled(cap);
1534 }
1535 }
1536
1537 return GetDefaultReturnValue<EntryPoint::IsEnabled, GLboolean>();
1538 }
1539
IsFramebuffer(GLuint framebuffer)1540 GLboolean GL_APIENTRY IsFramebuffer(GLuint framebuffer)
1541 {
1542 EVENT("(GLuint framebuffer = %u)", framebuffer);
1543
1544 Context *context = GetValidGlobalContext();
1545 if (context)
1546 {
1547 context->gatherParams<EntryPoint::IsFramebuffer>(framebuffer);
1548
1549 if (context->skipValidation() || ValidateIsFramebuffer(context, framebuffer))
1550 {
1551 return context->isFramebuffer(framebuffer);
1552 }
1553 }
1554
1555 return GetDefaultReturnValue<EntryPoint::IsFramebuffer, GLboolean>();
1556 }
1557
IsProgram(GLuint program)1558 GLboolean GL_APIENTRY IsProgram(GLuint program)
1559 {
1560 EVENT("(GLuint program = %u)", program);
1561
1562 Context *context = GetValidGlobalContext();
1563 if (context)
1564 {
1565 context->gatherParams<EntryPoint::IsProgram>(program);
1566
1567 if (context->skipValidation() || ValidateIsProgram(context, program))
1568 {
1569 return context->isProgram(program);
1570 }
1571 }
1572
1573 return GetDefaultReturnValue<EntryPoint::IsProgram, GLboolean>();
1574 }
1575
IsRenderbuffer(GLuint renderbuffer)1576 GLboolean GL_APIENTRY IsRenderbuffer(GLuint renderbuffer)
1577 {
1578 EVENT("(GLuint renderbuffer = %u)", renderbuffer);
1579
1580 Context *context = GetValidGlobalContext();
1581 if (context)
1582 {
1583 context->gatherParams<EntryPoint::IsRenderbuffer>(renderbuffer);
1584
1585 if (context->skipValidation() || ValidateIsRenderbuffer(context, renderbuffer))
1586 {
1587 return context->isRenderbuffer(renderbuffer);
1588 }
1589 }
1590
1591 return GetDefaultReturnValue<EntryPoint::IsRenderbuffer, GLboolean>();
1592 }
1593
IsShader(GLuint shader)1594 GLboolean GL_APIENTRY IsShader(GLuint shader)
1595 {
1596 EVENT("(GLuint shader = %u)", shader);
1597
1598 Context *context = GetValidGlobalContext();
1599 if (context)
1600 {
1601 context->gatherParams<EntryPoint::IsShader>(shader);
1602
1603 if (context->skipValidation() || ValidateIsShader(context, shader))
1604 {
1605 return context->isShader(shader);
1606 }
1607 }
1608
1609 return GetDefaultReturnValue<EntryPoint::IsShader, GLboolean>();
1610 }
1611
IsTexture(GLuint texture)1612 GLboolean GL_APIENTRY IsTexture(GLuint texture)
1613 {
1614 EVENT("(GLuint texture = %u)", texture);
1615
1616 Context *context = GetValidGlobalContext();
1617 if (context)
1618 {
1619 context->gatherParams<EntryPoint::IsTexture>(texture);
1620
1621 if (context->skipValidation() || ValidateIsTexture(context, texture))
1622 {
1623 return context->isTexture(texture);
1624 }
1625 }
1626
1627 return GetDefaultReturnValue<EntryPoint::IsTexture, GLboolean>();
1628 }
1629
LineWidth(GLfloat width)1630 void GL_APIENTRY LineWidth(GLfloat width)
1631 {
1632 EVENT("(GLfloat width = %f)", width);
1633
1634 Context *context = GetValidGlobalContext();
1635 if (context)
1636 {
1637 context->gatherParams<EntryPoint::LineWidth>(width);
1638
1639 if (context->skipValidation() || ValidateLineWidth(context, width))
1640 {
1641 context->lineWidth(width);
1642 }
1643 }
1644 }
1645
LinkProgram(GLuint program)1646 void GL_APIENTRY LinkProgram(GLuint program)
1647 {
1648 EVENT("(GLuint program = %u)", program);
1649
1650 Context *context = GetValidGlobalContext();
1651 if (context)
1652 {
1653 context->gatherParams<EntryPoint::LinkProgram>(program);
1654
1655 if (context->skipValidation() || ValidateLinkProgram(context, program))
1656 {
1657 context->linkProgram(program);
1658 }
1659 }
1660 }
1661
PixelStorei(GLenum pname,GLint param)1662 void GL_APIENTRY PixelStorei(GLenum pname, GLint param)
1663 {
1664 EVENT("(GLenum pname = 0x%X, GLint param = %d)", pname, param);
1665
1666 Context *context = GetValidGlobalContext();
1667 if (context)
1668 {
1669 context->gatherParams<EntryPoint::PixelStorei>(pname, param);
1670
1671 if (context->skipValidation() || ValidatePixelStorei(context, pname, param))
1672 {
1673 context->pixelStorei(pname, param);
1674 }
1675 }
1676 }
1677
PolygonOffset(GLfloat factor,GLfloat units)1678 void GL_APIENTRY PolygonOffset(GLfloat factor, GLfloat units)
1679 {
1680 EVENT("(GLfloat factor = %f, GLfloat units = %f)", factor, units);
1681
1682 Context *context = GetValidGlobalContext();
1683 if (context)
1684 {
1685 context->gatherParams<EntryPoint::PolygonOffset>(factor, units);
1686
1687 if (context->skipValidation() || ValidatePolygonOffset(context, factor, units))
1688 {
1689 context->polygonOffset(factor, units);
1690 }
1691 }
1692 }
1693
ReadPixels(GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,void * pixels)1694 void GL_APIENTRY ReadPixels(GLint x,
1695 GLint y,
1696 GLsizei width,
1697 GLsizei height,
1698 GLenum format,
1699 GLenum type,
1700 void *pixels)
1701 {
1702 EVENT(
1703 "(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLenum format = "
1704 "0x%X, GLenum type = 0x%X, void *pixels = 0x%0.8p)",
1705 x, y, width, height, format, type, pixels);
1706
1707 Context *context = GetValidGlobalContext();
1708 if (context)
1709 {
1710 context->gatherParams<EntryPoint::ReadPixels>(x, y, width, height, format, type, pixels);
1711
1712 if (context->skipValidation() ||
1713 ValidateReadPixels(context, x, y, width, height, format, type, pixels))
1714 {
1715 context->readPixels(x, y, width, height, format, type, pixels);
1716 }
1717 }
1718 }
1719
ReleaseShaderCompiler()1720 void GL_APIENTRY ReleaseShaderCompiler()
1721 {
1722 EVENT("()");
1723
1724 Context *context = GetValidGlobalContext();
1725 if (context)
1726 {
1727 context->gatherParams<EntryPoint::ReleaseShaderCompiler>();
1728
1729 if (context->skipValidation() || ValidateReleaseShaderCompiler(context))
1730 {
1731 context->releaseShaderCompiler();
1732 }
1733 }
1734 }
1735
RenderbufferStorage(GLenum target,GLenum internalformat,GLsizei width,GLsizei height)1736 void GL_APIENTRY RenderbufferStorage(GLenum target,
1737 GLenum internalformat,
1738 GLsizei width,
1739 GLsizei height)
1740 {
1741 EVENT(
1742 "(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei height = "
1743 "%d)",
1744 target, internalformat, width, height);
1745
1746 Context *context = GetValidGlobalContext();
1747 if (context)
1748 {
1749 context->gatherParams<EntryPoint::RenderbufferStorage>(target, internalformat, width,
1750 height);
1751
1752 if (context->skipValidation() ||
1753 ValidateRenderbufferStorage(context, target, internalformat, width, height))
1754 {
1755 context->renderbufferStorage(target, internalformat, width, height);
1756 }
1757 }
1758 }
1759
SampleCoverage(GLfloat value,GLboolean invert)1760 void GL_APIENTRY SampleCoverage(GLfloat value, GLboolean invert)
1761 {
1762 EVENT("(GLfloat value = %f, GLboolean invert = %u)", value, invert);
1763
1764 Context *context = GetValidGlobalContext();
1765 if (context)
1766 {
1767 context->gatherParams<EntryPoint::SampleCoverage>(value, invert);
1768
1769 if (context->skipValidation() || ValidateSampleCoverage(context, value, invert))
1770 {
1771 context->sampleCoverage(value, invert);
1772 }
1773 }
1774 }
1775
Scissor(GLint x,GLint y,GLsizei width,GLsizei height)1776 void GL_APIENTRY Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
1777 {
1778 EVENT("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width,
1779 height);
1780
1781 Context *context = GetValidGlobalContext();
1782 if (context)
1783 {
1784 context->gatherParams<EntryPoint::Scissor>(x, y, width, height);
1785
1786 if (context->skipValidation() || ValidateScissor(context, x, y, width, height))
1787 {
1788 context->scissor(x, y, width, height);
1789 }
1790 }
1791 }
1792
ShaderBinary(GLsizei count,const GLuint * shaders,GLenum binaryformat,const void * binary,GLsizei length)1793 void GL_APIENTRY ShaderBinary(GLsizei count,
1794 const GLuint *shaders,
1795 GLenum binaryformat,
1796 const void *binary,
1797 GLsizei length)
1798 {
1799 EVENT(
1800 "(GLsizei count = %d, const GLuint *shaders = 0x%0.8p, GLenum binaryformat = 0x%X, const "
1801 "void *binary = 0x%0.8p, GLsizei length = %d)",
1802 count, shaders, binaryformat, binary, length);
1803
1804 Context *context = GetValidGlobalContext();
1805 if (context)
1806 {
1807 context->gatherParams<EntryPoint::ShaderBinary>(count, shaders, binaryformat, binary,
1808 length);
1809
1810 if (context->skipValidation() ||
1811 ValidateShaderBinary(context, count, shaders, binaryformat, binary, length))
1812 {
1813 context->shaderBinary(count, shaders, binaryformat, binary, length);
1814 }
1815 }
1816 }
1817
ShaderSource(GLuint shader,GLsizei count,const GLchar * const * string,const GLint * length)1818 void GL_APIENTRY ShaderSource(GLuint shader,
1819 GLsizei count,
1820 const GLchar *const *string,
1821 const GLint *length)
1822 {
1823 EVENT(
1824 "(GLuint shader = %u, GLsizei count = %d, const GLchar *const*string = 0x%0.8p, const "
1825 "GLint *length = 0x%0.8p)",
1826 shader, count, string, length);
1827
1828 Context *context = GetValidGlobalContext();
1829 if (context)
1830 {
1831 context->gatherParams<EntryPoint::ShaderSource>(shader, count, string, length);
1832
1833 if (context->skipValidation() ||
1834 ValidateShaderSource(context, shader, count, string, length))
1835 {
1836 context->shaderSource(shader, count, string, length);
1837 }
1838 }
1839 }
1840
StencilFunc(GLenum func,GLint ref,GLuint mask)1841 void GL_APIENTRY StencilFunc(GLenum func, GLint ref, GLuint mask)
1842 {
1843 EVENT("(GLenum func = 0x%X, GLint ref = %d, GLuint mask = %u)", func, ref, mask);
1844
1845 Context *context = GetValidGlobalContext();
1846 if (context)
1847 {
1848 context->gatherParams<EntryPoint::StencilFunc>(func, ref, mask);
1849
1850 if (context->skipValidation() || ValidateStencilFunc(context, func, ref, mask))
1851 {
1852 context->stencilFunc(func, ref, mask);
1853 }
1854 }
1855 }
1856
StencilFuncSeparate(GLenum face,GLenum func,GLint ref,GLuint mask)1857 void GL_APIENTRY StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1858 {
1859 EVENT("(GLenum face = 0x%X, GLenum func = 0x%X, GLint ref = %d, GLuint mask = %u)", face, func,
1860 ref, mask);
1861
1862 Context *context = GetValidGlobalContext();
1863 if (context)
1864 {
1865 context->gatherParams<EntryPoint::StencilFuncSeparate>(face, func, ref, mask);
1866
1867 if (context->skipValidation() ||
1868 ValidateStencilFuncSeparate(context, face, func, ref, mask))
1869 {
1870 context->stencilFuncSeparate(face, func, ref, mask);
1871 }
1872 }
1873 }
1874
StencilMask(GLuint mask)1875 void GL_APIENTRY StencilMask(GLuint mask)
1876 {
1877 EVENT("(GLuint mask = %u)", mask);
1878
1879 Context *context = GetValidGlobalContext();
1880 if (context)
1881 {
1882 context->gatherParams<EntryPoint::StencilMask>(mask);
1883
1884 if (context->skipValidation() || ValidateStencilMask(context, mask))
1885 {
1886 context->stencilMask(mask);
1887 }
1888 }
1889 }
1890
StencilMaskSeparate(GLenum face,GLuint mask)1891 void GL_APIENTRY StencilMaskSeparate(GLenum face, GLuint mask)
1892 {
1893 EVENT("(GLenum face = 0x%X, GLuint mask = %u)", face, mask);
1894
1895 Context *context = GetValidGlobalContext();
1896 if (context)
1897 {
1898 context->gatherParams<EntryPoint::StencilMaskSeparate>(face, mask);
1899
1900 if (context->skipValidation() || ValidateStencilMaskSeparate(context, face, mask))
1901 {
1902 context->stencilMaskSeparate(face, mask);
1903 }
1904 }
1905 }
1906
StencilOp(GLenum fail,GLenum zfail,GLenum zpass)1907 void GL_APIENTRY StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
1908 {
1909 EVENT("(GLenum fail = 0x%X, GLenum zfail = 0x%X, GLenum zpass = 0x%X)", fail, zfail, zpass);
1910
1911 Context *context = GetValidGlobalContext();
1912 if (context)
1913 {
1914 context->gatherParams<EntryPoint::StencilOp>(fail, zfail, zpass);
1915
1916 if (context->skipValidation() || ValidateStencilOp(context, fail, zfail, zpass))
1917 {
1918 context->stencilOp(fail, zfail, zpass);
1919 }
1920 }
1921 }
1922
StencilOpSeparate(GLenum face,GLenum sfail,GLenum dpfail,GLenum dppass)1923 void GL_APIENTRY StencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
1924 {
1925 EVENT("(GLenum face = 0x%X, GLenum sfail = 0x%X, GLenum dpfail = 0x%X, GLenum dppass = 0x%X)",
1926 face, sfail, dpfail, dppass);
1927
1928 Context *context = GetValidGlobalContext();
1929 if (context)
1930 {
1931 context->gatherParams<EntryPoint::StencilOpSeparate>(face, sfail, dpfail, dppass);
1932
1933 if (context->skipValidation() ||
1934 ValidateStencilOpSeparate(context, face, sfail, dpfail, dppass))
1935 {
1936 context->stencilOpSeparate(face, sfail, dpfail, dppass);
1937 }
1938 }
1939 }
1940
TexImage2D(GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void * pixels)1941 void GL_APIENTRY TexImage2D(GLenum target,
1942 GLint level,
1943 GLint internalformat,
1944 GLsizei width,
1945 GLsizei height,
1946 GLint border,
1947 GLenum format,
1948 GLenum type,
1949 const void *pixels)
1950 {
1951 EVENT(
1952 "(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, "
1953 "GLsizei height = %d, GLint border = %d, GLenum format = 0x%X, GLenum type = 0x%X, const "
1954 "void *pixels = 0x%0.8p)",
1955 target, level, internalformat, width, height, border, format, type, pixels);
1956
1957 Context *context = GetValidGlobalContext();
1958 if (context)
1959 {
1960 context->gatherParams<EntryPoint::TexImage2D>(target, level, internalformat, width, height,
1961 border, format, type, pixels);
1962
1963 if (context->skipValidation() ||
1964 ValidateTexImage2D(context, target, level, internalformat, width, height, border,
1965 format, type, pixels))
1966 {
1967 context->texImage2D(target, level, internalformat, width, height, border, format, type,
1968 pixels);
1969 }
1970 }
1971 }
1972
TexParameterf(GLenum target,GLenum pname,GLfloat param)1973 void GL_APIENTRY TexParameterf(GLenum target, GLenum pname, GLfloat param)
1974 {
1975 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLfloat param = %f)", target, pname, param);
1976
1977 Context *context = GetValidGlobalContext();
1978 if (context)
1979 {
1980 context->gatherParams<EntryPoint::TexParameterf>(target, pname, param);
1981
1982 if (context->skipValidation() || ValidateTexParameterf(context, target, pname, param))
1983 {
1984 context->texParameterf(target, pname, param);
1985 }
1986 }
1987 }
1988
TexParameterfv(GLenum target,GLenum pname,const GLfloat * params)1989 void GL_APIENTRY TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
1990 {
1991 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, const GLfloat *params = 0x%0.8p)", target,
1992 pname, params);
1993
1994 Context *context = GetValidGlobalContext();
1995 if (context)
1996 {
1997 context->gatherParams<EntryPoint::TexParameterfv>(target, pname, params);
1998
1999 if (context->skipValidation() || ValidateTexParameterfv(context, target, pname, params))
2000 {
2001 context->texParameterfv(target, pname, params);
2002 }
2003 }
2004 }
2005
TexParameteri(GLenum target,GLenum pname,GLint param)2006 void GL_APIENTRY TexParameteri(GLenum target, GLenum pname, GLint param)
2007 {
2008 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param);
2009
2010 Context *context = GetValidGlobalContext();
2011 if (context)
2012 {
2013 context->gatherParams<EntryPoint::TexParameteri>(target, pname, param);
2014
2015 if (context->skipValidation() || ValidateTexParameteri(context, target, pname, param))
2016 {
2017 context->texParameteri(target, pname, param);
2018 }
2019 }
2020 }
2021
TexParameteriv(GLenum target,GLenum pname,const GLint * params)2022 void GL_APIENTRY TexParameteriv(GLenum target, GLenum pname, const GLint *params)
2023 {
2024 EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, const GLint *params = 0x%0.8p)", target,
2025 pname, params);
2026
2027 Context *context = GetValidGlobalContext();
2028 if (context)
2029 {
2030 context->gatherParams<EntryPoint::TexParameteriv>(target, pname, params);
2031
2032 if (context->skipValidation() || ValidateTexParameteriv(context, target, pname, params))
2033 {
2034 context->texParameteriv(target, pname, params);
2035 }
2036 }
2037 }
2038
TexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void * pixels)2039 void GL_APIENTRY TexSubImage2D(GLenum target,
2040 GLint level,
2041 GLint xoffset,
2042 GLint yoffset,
2043 GLsizei width,
2044 GLsizei height,
2045 GLenum format,
2046 GLenum type,
2047 const void *pixels)
2048 {
2049 EVENT(
2050 "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
2051 "width = %d, GLsizei height = %d, GLenum format = 0x%X, GLenum type = 0x%X, const void "
2052 "*pixels = 0x%0.8p)",
2053 target, level, xoffset, yoffset, width, height, format, type, pixels);
2054
2055 Context *context = GetValidGlobalContext();
2056 if (context)
2057 {
2058 context->gatherParams<EntryPoint::TexSubImage2D>(target, level, xoffset, yoffset, width,
2059 height, format, type, pixels);
2060
2061 if (context->skipValidation() ||
2062 ValidateTexSubImage2D(context, target, level, xoffset, yoffset, width, height, format,
2063 type, pixels))
2064 {
2065 context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type,
2066 pixels);
2067 }
2068 }
2069 }
2070
Uniform1f(GLint location,GLfloat v0)2071 void GL_APIENTRY Uniform1f(GLint location, GLfloat v0)
2072 {
2073 EVENT("(GLint location = %d, GLfloat v0 = %f)", location, v0);
2074
2075 Context *context = GetValidGlobalContext();
2076 if (context)
2077 {
2078 context->gatherParams<EntryPoint::Uniform1f>(location, v0);
2079
2080 if (context->skipValidation() || ValidateUniform1f(context, location, v0))
2081 {
2082 context->uniform1f(location, v0);
2083 }
2084 }
2085 }
2086
Uniform1fv(GLint location,GLsizei count,const GLfloat * value)2087 void GL_APIENTRY Uniform1fv(GLint location, GLsizei count, const GLfloat *value)
2088 {
2089 EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat *value = 0x%0.8p)", location,
2090 count, value);
2091
2092 Context *context = GetValidGlobalContext();
2093 if (context)
2094 {
2095 context->gatherParams<EntryPoint::Uniform1fv>(location, count, value);
2096
2097 if (context->skipValidation() || ValidateUniform1fv(context, location, count, value))
2098 {
2099 context->uniform1fv(location, count, value);
2100 }
2101 }
2102 }
2103
Uniform1i(GLint location,GLint v0)2104 void GL_APIENTRY Uniform1i(GLint location, GLint v0)
2105 {
2106 EVENT("(GLint location = %d, GLint v0 = %d)", location, v0);
2107
2108 Context *context = GetValidGlobalContext();
2109 if (context)
2110 {
2111 context->gatherParams<EntryPoint::Uniform1i>(location, v0);
2112
2113 if (context->skipValidation() || ValidateUniform1i(context, location, v0))
2114 {
2115 context->uniform1i(location, v0);
2116 }
2117 }
2118 }
2119
Uniform1iv(GLint location,GLsizei count,const GLint * value)2120 void GL_APIENTRY Uniform1iv(GLint location, GLsizei count, const GLint *value)
2121 {
2122 EVENT("(GLint location = %d, GLsizei count = %d, const GLint *value = 0x%0.8p)", location,
2123 count, value);
2124
2125 Context *context = GetValidGlobalContext();
2126 if (context)
2127 {
2128 context->gatherParams<EntryPoint::Uniform1iv>(location, count, value);
2129
2130 if (context->skipValidation() || ValidateUniform1iv(context, location, count, value))
2131 {
2132 context->uniform1iv(location, count, value);
2133 }
2134 }
2135 }
2136
Uniform2f(GLint location,GLfloat v0,GLfloat v1)2137 void GL_APIENTRY Uniform2f(GLint location, GLfloat v0, GLfloat v1)
2138 {
2139 EVENT("(GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f)", location, v0, v1);
2140
2141 Context *context = GetValidGlobalContext();
2142 if (context)
2143 {
2144 context->gatherParams<EntryPoint::Uniform2f>(location, v0, v1);
2145
2146 if (context->skipValidation() || ValidateUniform2f(context, location, v0, v1))
2147 {
2148 context->uniform2f(location, v0, v1);
2149 }
2150 }
2151 }
2152
Uniform2fv(GLint location,GLsizei count,const GLfloat * value)2153 void GL_APIENTRY Uniform2fv(GLint location, GLsizei count, const GLfloat *value)
2154 {
2155 EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat *value = 0x%0.8p)", location,
2156 count, value);
2157
2158 Context *context = GetValidGlobalContext();
2159 if (context)
2160 {
2161 context->gatherParams<EntryPoint::Uniform2fv>(location, count, value);
2162
2163 if (context->skipValidation() || ValidateUniform2fv(context, location, count, value))
2164 {
2165 context->uniform2fv(location, count, value);
2166 }
2167 }
2168 }
2169
Uniform2i(GLint location,GLint v0,GLint v1)2170 void GL_APIENTRY Uniform2i(GLint location, GLint v0, GLint v1)
2171 {
2172 EVENT("(GLint location = %d, GLint v0 = %d, GLint v1 = %d)", location, v0, v1);
2173
2174 Context *context = GetValidGlobalContext();
2175 if (context)
2176 {
2177 context->gatherParams<EntryPoint::Uniform2i>(location, v0, v1);
2178
2179 if (context->skipValidation() || ValidateUniform2i(context, location, v0, v1))
2180 {
2181 context->uniform2i(location, v0, v1);
2182 }
2183 }
2184 }
2185
Uniform2iv(GLint location,GLsizei count,const GLint * value)2186 void GL_APIENTRY Uniform2iv(GLint location, GLsizei count, const GLint *value)
2187 {
2188 EVENT("(GLint location = %d, GLsizei count = %d, const GLint *value = 0x%0.8p)", location,
2189 count, value);
2190
2191 Context *context = GetValidGlobalContext();
2192 if (context)
2193 {
2194 context->gatherParams<EntryPoint::Uniform2iv>(location, count, value);
2195
2196 if (context->skipValidation() || ValidateUniform2iv(context, location, count, value))
2197 {
2198 context->uniform2iv(location, count, value);
2199 }
2200 }
2201 }
2202
Uniform3f(GLint location,GLfloat v0,GLfloat v1,GLfloat v2)2203 void GL_APIENTRY Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
2204 {
2205 EVENT("(GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = %f)", location, v0,
2206 v1, v2);
2207
2208 Context *context = GetValidGlobalContext();
2209 if (context)
2210 {
2211 context->gatherParams<EntryPoint::Uniform3f>(location, v0, v1, v2);
2212
2213 if (context->skipValidation() || ValidateUniform3f(context, location, v0, v1, v2))
2214 {
2215 context->uniform3f(location, v0, v1, v2);
2216 }
2217 }
2218 }
2219
Uniform3fv(GLint location,GLsizei count,const GLfloat * value)2220 void GL_APIENTRY Uniform3fv(GLint location, GLsizei count, const GLfloat *value)
2221 {
2222 EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat *value = 0x%0.8p)", location,
2223 count, value);
2224
2225 Context *context = GetValidGlobalContext();
2226 if (context)
2227 {
2228 context->gatherParams<EntryPoint::Uniform3fv>(location, count, value);
2229
2230 if (context->skipValidation() || ValidateUniform3fv(context, location, count, value))
2231 {
2232 context->uniform3fv(location, count, value);
2233 }
2234 }
2235 }
2236
Uniform3i(GLint location,GLint v0,GLint v1,GLint v2)2237 void GL_APIENTRY Uniform3i(GLint location, GLint v0, GLint v1, GLint v2)
2238 {
2239 EVENT("(GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d)", location, v0, v1,
2240 v2);
2241
2242 Context *context = GetValidGlobalContext();
2243 if (context)
2244 {
2245 context->gatherParams<EntryPoint::Uniform3i>(location, v0, v1, v2);
2246
2247 if (context->skipValidation() || ValidateUniform3i(context, location, v0, v1, v2))
2248 {
2249 context->uniform3i(location, v0, v1, v2);
2250 }
2251 }
2252 }
2253
Uniform3iv(GLint location,GLsizei count,const GLint * value)2254 void GL_APIENTRY Uniform3iv(GLint location, GLsizei count, const GLint *value)
2255 {
2256 EVENT("(GLint location = %d, GLsizei count = %d, const GLint *value = 0x%0.8p)", location,
2257 count, value);
2258
2259 Context *context = GetValidGlobalContext();
2260 if (context)
2261 {
2262 context->gatherParams<EntryPoint::Uniform3iv>(location, count, value);
2263
2264 if (context->skipValidation() || ValidateUniform3iv(context, location, count, value))
2265 {
2266 context->uniform3iv(location, count, value);
2267 }
2268 }
2269 }
2270
Uniform4f(GLint location,GLfloat v0,GLfloat v1,GLfloat v2,GLfloat v3)2271 void GL_APIENTRY Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
2272 {
2273 EVENT(
2274 "(GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = %f, GLfloat v3 = %f)",
2275 location, v0, v1, v2, v3);
2276
2277 Context *context = GetValidGlobalContext();
2278 if (context)
2279 {
2280 context->gatherParams<EntryPoint::Uniform4f>(location, v0, v1, v2, v3);
2281
2282 if (context->skipValidation() || ValidateUniform4f(context, location, v0, v1, v2, v3))
2283 {
2284 context->uniform4f(location, v0, v1, v2, v3);
2285 }
2286 }
2287 }
2288
Uniform4fv(GLint location,GLsizei count,const GLfloat * value)2289 void GL_APIENTRY Uniform4fv(GLint location, GLsizei count, const GLfloat *value)
2290 {
2291 EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat *value = 0x%0.8p)", location,
2292 count, value);
2293
2294 Context *context = GetValidGlobalContext();
2295 if (context)
2296 {
2297 context->gatherParams<EntryPoint::Uniform4fv>(location, count, value);
2298
2299 if (context->skipValidation() || ValidateUniform4fv(context, location, count, value))
2300 {
2301 context->uniform4fv(location, count, value);
2302 }
2303 }
2304 }
2305
Uniform4i(GLint location,GLint v0,GLint v1,GLint v2,GLint v3)2306 void GL_APIENTRY Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
2307 {
2308 EVENT("(GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d, GLint v3 = %d)",
2309 location, v0, v1, v2, v3);
2310
2311 Context *context = GetValidGlobalContext();
2312 if (context)
2313 {
2314 context->gatherParams<EntryPoint::Uniform4i>(location, v0, v1, v2, v3);
2315
2316 if (context->skipValidation() || ValidateUniform4i(context, location, v0, v1, v2, v3))
2317 {
2318 context->uniform4i(location, v0, v1, v2, v3);
2319 }
2320 }
2321 }
2322
Uniform4iv(GLint location,GLsizei count,const GLint * value)2323 void GL_APIENTRY Uniform4iv(GLint location, GLsizei count, const GLint *value)
2324 {
2325 EVENT("(GLint location = %d, GLsizei count = %d, const GLint *value = 0x%0.8p)", location,
2326 count, value);
2327
2328 Context *context = GetValidGlobalContext();
2329 if (context)
2330 {
2331 context->gatherParams<EntryPoint::Uniform4iv>(location, count, value);
2332
2333 if (context->skipValidation() || ValidateUniform4iv(context, location, count, value))
2334 {
2335 context->uniform4iv(location, count, value);
2336 }
2337 }
2338 }
2339
UniformMatrix2fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2340 void GL_APIENTRY UniformMatrix2fv(GLint location,
2341 GLsizei count,
2342 GLboolean transpose,
2343 const GLfloat *value)
2344 {
2345 EVENT(
2346 "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
2347 "= 0x%0.8p)",
2348 location, count, transpose, value);
2349
2350 Context *context = GetValidGlobalContext();
2351 if (context)
2352 {
2353 context->gatherParams<EntryPoint::UniformMatrix2fv>(location, count, transpose, value);
2354
2355 if (context->skipValidation() ||
2356 ValidateUniformMatrix2fv(context, location, count, transpose, value))
2357 {
2358 context->uniformMatrix2fv(location, count, transpose, value);
2359 }
2360 }
2361 }
2362
UniformMatrix3fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2363 void GL_APIENTRY UniformMatrix3fv(GLint location,
2364 GLsizei count,
2365 GLboolean transpose,
2366 const GLfloat *value)
2367 {
2368 EVENT(
2369 "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
2370 "= 0x%0.8p)",
2371 location, count, transpose, value);
2372
2373 Context *context = GetValidGlobalContext();
2374 if (context)
2375 {
2376 context->gatherParams<EntryPoint::UniformMatrix3fv>(location, count, transpose, value);
2377
2378 if (context->skipValidation() ||
2379 ValidateUniformMatrix3fv(context, location, count, transpose, value))
2380 {
2381 context->uniformMatrix3fv(location, count, transpose, value);
2382 }
2383 }
2384 }
2385
UniformMatrix4fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2386 void GL_APIENTRY UniformMatrix4fv(GLint location,
2387 GLsizei count,
2388 GLboolean transpose,
2389 const GLfloat *value)
2390 {
2391 EVENT(
2392 "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
2393 "= 0x%0.8p)",
2394 location, count, transpose, value);
2395
2396 Context *context = GetValidGlobalContext();
2397 if (context)
2398 {
2399 context->gatherParams<EntryPoint::UniformMatrix4fv>(location, count, transpose, value);
2400
2401 if (context->skipValidation() ||
2402 ValidateUniformMatrix4fv(context, location, count, transpose, value))
2403 {
2404 context->uniformMatrix4fv(location, count, transpose, value);
2405 }
2406 }
2407 }
2408
UseProgram(GLuint program)2409 void GL_APIENTRY UseProgram(GLuint program)
2410 {
2411 EVENT("(GLuint program = %u)", program);
2412
2413 Context *context = GetValidGlobalContext();
2414 if (context)
2415 {
2416 context->gatherParams<EntryPoint::UseProgram>(program);
2417
2418 if (context->skipValidation() || ValidateUseProgram(context, program))
2419 {
2420 context->useProgram(program);
2421 }
2422 }
2423 }
2424
ValidateProgram(GLuint program)2425 void GL_APIENTRY ValidateProgram(GLuint program)
2426 {
2427 EVENT("(GLuint program = %u)", program);
2428
2429 Context *context = GetValidGlobalContext();
2430 if (context)
2431 {
2432 context->gatherParams<EntryPoint::ValidateProgram>(program);
2433
2434 if (context->skipValidation() || ValidateValidateProgram(context, program))
2435 {
2436 context->validateProgram(program);
2437 }
2438 }
2439 }
2440
VertexAttrib1f(GLuint index,GLfloat x)2441 void GL_APIENTRY VertexAttrib1f(GLuint index, GLfloat x)
2442 {
2443 EVENT("(GLuint index = %u, GLfloat x = %f)", index, x);
2444
2445 Context *context = GetValidGlobalContext();
2446 if (context)
2447 {
2448 context->gatherParams<EntryPoint::VertexAttrib1f>(index, x);
2449
2450 if (context->skipValidation() || ValidateVertexAttrib1f(context, index, x))
2451 {
2452 context->vertexAttrib1f(index, x);
2453 }
2454 }
2455 }
2456
VertexAttrib1fv(GLuint index,const GLfloat * v)2457 void GL_APIENTRY VertexAttrib1fv(GLuint index, const GLfloat *v)
2458 {
2459 EVENT("(GLuint index = %u, const GLfloat *v = 0x%0.8p)", index, v);
2460
2461 Context *context = GetValidGlobalContext();
2462 if (context)
2463 {
2464 context->gatherParams<EntryPoint::VertexAttrib1fv>(index, v);
2465
2466 if (context->skipValidation() || ValidateVertexAttrib1fv(context, index, v))
2467 {
2468 context->vertexAttrib1fv(index, v);
2469 }
2470 }
2471 }
2472
VertexAttrib2f(GLuint index,GLfloat x,GLfloat y)2473 void GL_APIENTRY VertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
2474 {
2475 EVENT("(GLuint index = %u, GLfloat x = %f, GLfloat y = %f)", index, x, y);
2476
2477 Context *context = GetValidGlobalContext();
2478 if (context)
2479 {
2480 context->gatherParams<EntryPoint::VertexAttrib2f>(index, x, y);
2481
2482 if (context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y))
2483 {
2484 context->vertexAttrib2f(index, x, y);
2485 }
2486 }
2487 }
2488
VertexAttrib2fv(GLuint index,const GLfloat * v)2489 void GL_APIENTRY VertexAttrib2fv(GLuint index, const GLfloat *v)
2490 {
2491 EVENT("(GLuint index = %u, const GLfloat *v = 0x%0.8p)", index, v);
2492
2493 Context *context = GetValidGlobalContext();
2494 if (context)
2495 {
2496 context->gatherParams<EntryPoint::VertexAttrib2fv>(index, v);
2497
2498 if (context->skipValidation() || ValidateVertexAttrib2fv(context, index, v))
2499 {
2500 context->vertexAttrib2fv(index, v);
2501 }
2502 }
2503 }
2504
VertexAttrib3f(GLuint index,GLfloat x,GLfloat y,GLfloat z)2505 void GL_APIENTRY VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
2506 {
2507 EVENT("(GLuint index = %u, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", index, x, y, z);
2508
2509 Context *context = GetValidGlobalContext();
2510 if (context)
2511 {
2512 context->gatherParams<EntryPoint::VertexAttrib3f>(index, x, y, z);
2513
2514 if (context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z))
2515 {
2516 context->vertexAttrib3f(index, x, y, z);
2517 }
2518 }
2519 }
2520
VertexAttrib3fv(GLuint index,const GLfloat * v)2521 void GL_APIENTRY VertexAttrib3fv(GLuint index, const GLfloat *v)
2522 {
2523 EVENT("(GLuint index = %u, const GLfloat *v = 0x%0.8p)", index, v);
2524
2525 Context *context = GetValidGlobalContext();
2526 if (context)
2527 {
2528 context->gatherParams<EntryPoint::VertexAttrib3fv>(index, v);
2529
2530 if (context->skipValidation() || ValidateVertexAttrib3fv(context, index, v))
2531 {
2532 context->vertexAttrib3fv(index, v);
2533 }
2534 }
2535 }
2536
VertexAttrib4f(GLuint index,GLfloat x,GLfloat y,GLfloat z,GLfloat w)2537 void GL_APIENTRY VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2538 {
2539 EVENT("(GLuint index = %u, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f, GLfloat w = %f)",
2540 index, x, y, z, w);
2541
2542 Context *context = GetValidGlobalContext();
2543 if (context)
2544 {
2545 context->gatherParams<EntryPoint::VertexAttrib4f>(index, x, y, z, w);
2546
2547 if (context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w))
2548 {
2549 context->vertexAttrib4f(index, x, y, z, w);
2550 }
2551 }
2552 }
2553
VertexAttrib4fv(GLuint index,const GLfloat * v)2554 void GL_APIENTRY VertexAttrib4fv(GLuint index, const GLfloat *v)
2555 {
2556 EVENT("(GLuint index = %u, const GLfloat *v = 0x%0.8p)", index, v);
2557
2558 Context *context = GetValidGlobalContext();
2559 if (context)
2560 {
2561 context->gatherParams<EntryPoint::VertexAttrib4fv>(index, v);
2562
2563 if (context->skipValidation() || ValidateVertexAttrib4fv(context, index, v))
2564 {
2565 context->vertexAttrib4fv(index, v);
2566 }
2567 }
2568 }
2569
VertexAttribPointer(GLuint index,GLint size,GLenum type,GLboolean normalized,GLsizei stride,const void * pointer)2570 void GL_APIENTRY VertexAttribPointer(GLuint index,
2571 GLint size,
2572 GLenum type,
2573 GLboolean normalized,
2574 GLsizei stride,
2575 const void *pointer)
2576 {
2577 EVENT(
2578 "(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLboolean normalized = %u, "
2579 "GLsizei stride = %d, const void *pointer = 0x%0.8p)",
2580 index, size, type, normalized, stride, pointer);
2581
2582 Context *context = GetValidGlobalContext();
2583 if (context)
2584 {
2585 context->gatherParams<EntryPoint::VertexAttribPointer>(index, size, type, normalized,
2586 stride, pointer);
2587
2588 if (context->skipValidation() ||
2589 ValidateVertexAttribPointer(context, index, size, type, normalized, stride, pointer))
2590 {
2591 context->vertexAttribPointer(index, size, type, normalized, stride, pointer);
2592 }
2593 }
2594 }
2595
Viewport(GLint x,GLint y,GLsizei width,GLsizei height)2596 void GL_APIENTRY Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
2597 {
2598 EVENT("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width,
2599 height);
2600
2601 Context *context = GetValidGlobalContext();
2602 if (context)
2603 {
2604 context->gatherParams<EntryPoint::Viewport>(x, y, width, height);
2605
2606 if (context->skipValidation() || ValidateViewport(context, x, y, width, height))
2607 {
2608 context->viewport(x, y, width, height);
2609 }
2610 }
2611 }
2612 } // namespace gl
2613