1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2019 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_gl_1_1_autogen.cpp:
9 // Defines the GL 1.1 entry points.
10
11 #include "libGL/entry_points_gl_1_1_autogen.h"
12
13 #include "libANGLE/Context.h"
14 #include "libANGLE/Context.inl.h"
15 #include "libANGLE/entry_points_utils.h"
16 #include "libANGLE/gl_enum_utils_autogen.h"
17 #include "libANGLE/validationEGL.h"
18 #include "libANGLE/validationES.h"
19 #include "libANGLE/validationES1.h"
20 #include "libANGLE/validationES2.h"
21 #include "libANGLE/validationES3.h"
22 #include "libANGLE/validationES31.h"
23 #include "libANGLE/validationESEXT.h"
24 #include "libANGLE/validationGL11_autogen.h"
25 #include "libGLESv2/global_state.h"
26
27 namespace gl
28 {
AreTexturesResident(GLsizei n,const GLuint * textures,GLboolean * residences)29 GLboolean GL_APIENTRY AreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
30 {
31 EVENT("(GLsizei n = %d, const GLuint *textures = 0x%016" PRIxPTR
32 ", GLboolean *residences = 0x%016" PRIxPTR ")",
33 n, (uintptr_t)textures, (uintptr_t)residences);
34
35 Context *context = GetValidGlobalContext();
36 GLboolean returnValue;
37 if (context)
38 {
39 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
40 bool isCallValid = (context->skipValidation() ||
41 ValidateAreTexturesResident(context, n, textures, residences));
42 if (isCallValid)
43 {
44 returnValue = context->areTexturesResident(n, textures, residences);
45 }
46 else
47 {
48 returnValue = GetDefaultReturnValue<EntryPoint::AreTexturesResident, GLboolean>();
49 }
50 ANGLE_CAPTURE(AreTexturesResident, isCallValid, context, n, textures, residences,
51 returnValue);
52 }
53 else
54 {
55 returnValue = GetDefaultReturnValue<EntryPoint::AreTexturesResident, GLboolean>();
56 }
57 return returnValue;
58 }
59
ArrayElement(GLint i)60 void GL_APIENTRY ArrayElement(GLint i)
61 {
62 EVENT("(GLint i = %d)", i);
63
64 Context *context = GetValidGlobalContext();
65 if (context)
66 {
67 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
68 bool isCallValid = (context->skipValidation() || ValidateArrayElement(context, i));
69 if (isCallValid)
70 {
71 context->arrayElement(i);
72 }
73 ANGLE_CAPTURE(ArrayElement, isCallValid, context, i);
74 }
75 }
76
BindTexture(GLenum target,GLuint texture)77 void GL_APIENTRY BindTexture(GLenum target, GLuint texture)
78 {
79 EVENT("(GLenum target = %s, GLuint texture = %u)",
80 GLenumToString(GLenumGroup::TextureTarget, target), texture);
81
82 Context *context = GetValidGlobalContext();
83 if (context)
84 {
85 TextureType targetPacked = FromGL<TextureType>(target);
86 TextureID texturePacked = FromGL<TextureID>(texture);
87 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
88 bool isCallValid = (context->skipValidation() ||
89 ValidateBindTexture(context, targetPacked, texturePacked));
90 if (isCallValid)
91 {
92 context->bindTexture(targetPacked, texturePacked);
93 }
94 ANGLE_CAPTURE(BindTexture, isCallValid, context, targetPacked, texturePacked);
95 }
96 }
97
ColorPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)98 void GL_APIENTRY ColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
99 {
100 EVENT(
101 "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
102 "0x%016" PRIxPTR ")",
103 size, GLenumToString(GLenumGroup::ColorPointerType, type), stride, (uintptr_t)pointer);
104
105 Context *context = GetValidGlobalContext();
106 if (context)
107 {
108 VertexAttribType typePacked = FromGL<VertexAttribType>(type);
109 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
110 bool isCallValid = (context->skipValidation() ||
111 ValidateColorPointer(context, size, typePacked, stride, pointer));
112 if (isCallValid)
113 {
114 context->colorPointer(size, typePacked, stride, pointer);
115 }
116 ANGLE_CAPTURE(ColorPointer, isCallValid, context, size, typePacked, stride, pointer);
117 }
118 }
119
CopyTexImage1D(GLenum target,GLint level,GLenum internalformat,GLint x,GLint y,GLsizei width,GLint border)120 void GL_APIENTRY CopyTexImage1D(GLenum target,
121 GLint level,
122 GLenum internalformat,
123 GLint x,
124 GLint y,
125 GLsizei width,
126 GLint border)
127 {
128 EVENT(
129 "(GLenum target = %s, GLint level = %d, GLenum internalformat = %s, GLint x = %d, GLint y "
130 "= %d, GLsizei width = %d, GLint border = %d)",
131 GLenumToString(GLenumGroup::TextureTarget, target), level,
132 GLenumToString(GLenumGroup::InternalFormat, internalformat), x, y, width, border);
133
134 Context *context = GetValidGlobalContext();
135 if (context)
136 {
137 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
138 bool isCallValid =
139 (context->skipValidation() ||
140 ValidateCopyTexImage1D(context, target, level, internalformat, x, y, width, border));
141 if (isCallValid)
142 {
143 context->copyTexImage1D(target, level, internalformat, x, y, width, border);
144 }
145 ANGLE_CAPTURE(CopyTexImage1D, isCallValid, context, target, level, internalformat, x, y,
146 width, border);
147 }
148 }
149
CopyTexImage2D(GLenum target,GLint level,GLenum internalformat,GLint x,GLint y,GLsizei width,GLsizei height,GLint border)150 void GL_APIENTRY CopyTexImage2D(GLenum target,
151 GLint level,
152 GLenum internalformat,
153 GLint x,
154 GLint y,
155 GLsizei width,
156 GLsizei height,
157 GLint border)
158 {
159 EVENT(
160 "(GLenum target = %s, GLint level = %d, GLenum internalformat = %s, GLint x = %d, GLint y "
161 "= %d, GLsizei width = %d, GLsizei height = %d, GLint border = %d)",
162 GLenumToString(GLenumGroup::TextureTarget, target), level,
163 GLenumToString(GLenumGroup::InternalFormat, internalformat), x, y, width, height, border);
164
165 Context *context = GetValidGlobalContext();
166 if (context)
167 {
168 TextureTarget targetPacked = FromGL<TextureTarget>(target);
169 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
170 bool isCallValid = (context->skipValidation() ||
171 ValidateCopyTexImage2D(context, targetPacked, level, internalformat, x,
172 y, width, height, border));
173 if (isCallValid)
174 {
175 context->copyTexImage2D(targetPacked, level, internalformat, x, y, width, height,
176 border);
177 }
178 ANGLE_CAPTURE(CopyTexImage2D, isCallValid, context, targetPacked, level, internalformat, x,
179 y, width, height, border);
180 }
181 }
182
183 void GL_APIENTRY
CopyTexSubImage1D(GLenum target,GLint level,GLint xoffset,GLint x,GLint y,GLsizei width)184 CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
185 {
186 EVENT(
187 "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint x = %d, GLint y = %d, "
188 "GLsizei width = %d)",
189 GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, x, y, width);
190
191 Context *context = GetValidGlobalContext();
192 if (context)
193 {
194 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
195 bool isCallValid =
196 (context->skipValidation() ||
197 ValidateCopyTexSubImage1D(context, target, level, xoffset, x, y, width));
198 if (isCallValid)
199 {
200 context->copyTexSubImage1D(target, level, xoffset, x, y, width);
201 }
202 ANGLE_CAPTURE(CopyTexSubImage1D, isCallValid, context, target, level, xoffset, x, y, width);
203 }
204 }
205
CopyTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint x,GLint y,GLsizei width,GLsizei height)206 void GL_APIENTRY CopyTexSubImage2D(GLenum target,
207 GLint level,
208 GLint xoffset,
209 GLint yoffset,
210 GLint x,
211 GLint y,
212 GLsizei width,
213 GLsizei height)
214 {
215 EVENT(
216 "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint x = "
217 "%d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
218 GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, x, y, width,
219 height);
220
221 Context *context = GetValidGlobalContext();
222 if (context)
223 {
224 TextureTarget targetPacked = FromGL<TextureTarget>(target);
225 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
226 bool isCallValid = (context->skipValidation() ||
227 ValidateCopyTexSubImage2D(context, targetPacked, level, xoffset,
228 yoffset, x, y, width, height));
229 if (isCallValid)
230 {
231 context->copyTexSubImage2D(targetPacked, level, xoffset, yoffset, x, y, width, height);
232 }
233 ANGLE_CAPTURE(CopyTexSubImage2D, isCallValid, context, targetPacked, level, xoffset,
234 yoffset, x, y, width, height);
235 }
236 }
237
DeleteTextures(GLsizei n,const GLuint * textures)238 void GL_APIENTRY DeleteTextures(GLsizei n, const GLuint *textures)
239 {
240 EVENT("(GLsizei n = %d, const GLuint *textures = 0x%016" PRIxPTR ")", n, (uintptr_t)textures);
241
242 Context *context = GetValidGlobalContext();
243 if (context)
244 {
245 const TextureID *texturesPacked = FromGL<const TextureID *>(textures);
246 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
247 bool isCallValid =
248 (context->skipValidation() || ValidateDeleteTextures(context, n, texturesPacked));
249 if (isCallValid)
250 {
251 context->deleteTextures(n, texturesPacked);
252 }
253 ANGLE_CAPTURE(DeleteTextures, isCallValid, context, n, texturesPacked);
254 }
255 }
256
DisableClientState(GLenum array)257 void GL_APIENTRY DisableClientState(GLenum array)
258 {
259 EVENT("(GLenum array = %s)", GLenumToString(GLenumGroup::EnableCap, array));
260
261 Context *context = GetValidGlobalContext();
262 if (context)
263 {
264 ClientVertexArrayType arrayPacked = FromGL<ClientVertexArrayType>(array);
265 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
266 bool isCallValid =
267 (context->skipValidation() || ValidateDisableClientState(context, arrayPacked));
268 if (isCallValid)
269 {
270 context->disableClientState(arrayPacked);
271 }
272 ANGLE_CAPTURE(DisableClientState, isCallValid, context, arrayPacked);
273 }
274 }
275
DrawArrays(GLenum mode,GLint first,GLsizei count)276 void GL_APIENTRY DrawArrays(GLenum mode, GLint first, GLsizei count)
277 {
278 EVENT("(GLenum mode = %s, GLint first = %d, GLsizei count = %d)",
279 GLenumToString(GLenumGroup::PrimitiveType, mode), first, count);
280
281 Context *context = GetValidGlobalContext();
282 if (context)
283 {
284 PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
285 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
286 bool isCallValid =
287 (context->skipValidation() || ValidateDrawArrays(context, modePacked, first, count));
288 if (isCallValid)
289 {
290 context->drawArrays(modePacked, first, count);
291 }
292 ANGLE_CAPTURE(DrawArrays, isCallValid, context, modePacked, first, count);
293 }
294 }
295
DrawElements(GLenum mode,GLsizei count,GLenum type,const void * indices)296 void GL_APIENTRY DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
297 {
298 EVENT(
299 "(GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void *indices = "
300 "0x%016" PRIxPTR ")",
301 GLenumToString(GLenumGroup::PrimitiveType, mode), count,
302 GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices);
303
304 Context *context = GetValidGlobalContext();
305 if (context)
306 {
307 PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
308 DrawElementsType typePacked = FromGL<DrawElementsType>(type);
309 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
310 bool isCallValid = (context->skipValidation() ||
311 ValidateDrawElements(context, modePacked, count, typePacked, indices));
312 if (isCallValid)
313 {
314 context->drawElements(modePacked, count, typePacked, indices);
315 }
316 ANGLE_CAPTURE(DrawElements, isCallValid, context, modePacked, count, typePacked, indices);
317 }
318 }
319
EdgeFlagPointer(GLsizei stride,const void * pointer)320 void GL_APIENTRY EdgeFlagPointer(GLsizei stride, const void *pointer)
321 {
322 EVENT("(GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")", stride,
323 (uintptr_t)pointer);
324
325 Context *context = GetValidGlobalContext();
326 if (context)
327 {
328 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
329 bool isCallValid =
330 (context->skipValidation() || ValidateEdgeFlagPointer(context, stride, pointer));
331 if (isCallValid)
332 {
333 context->edgeFlagPointer(stride, pointer);
334 }
335 ANGLE_CAPTURE(EdgeFlagPointer, isCallValid, context, stride, pointer);
336 }
337 }
338
EnableClientState(GLenum array)339 void GL_APIENTRY EnableClientState(GLenum array)
340 {
341 EVENT("(GLenum array = %s)", GLenumToString(GLenumGroup::EnableCap, array));
342
343 Context *context = GetValidGlobalContext();
344 if (context)
345 {
346 ClientVertexArrayType arrayPacked = FromGL<ClientVertexArrayType>(array);
347 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
348 bool isCallValid =
349 (context->skipValidation() || ValidateEnableClientState(context, arrayPacked));
350 if (isCallValid)
351 {
352 context->enableClientState(arrayPacked);
353 }
354 ANGLE_CAPTURE(EnableClientState, isCallValid, context, arrayPacked);
355 }
356 }
357
GenTextures(GLsizei n,GLuint * textures)358 void GL_APIENTRY GenTextures(GLsizei n, GLuint *textures)
359 {
360 EVENT("(GLsizei n = %d, GLuint *textures = 0x%016" PRIxPTR ")", n, (uintptr_t)textures);
361
362 Context *context = GetValidGlobalContext();
363 if (context)
364 {
365 TextureID *texturesPacked = FromGL<TextureID *>(textures);
366 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
367 bool isCallValid =
368 (context->skipValidation() || ValidateGenTextures(context, n, texturesPacked));
369 if (isCallValid)
370 {
371 context->genTextures(n, texturesPacked);
372 }
373 ANGLE_CAPTURE(GenTextures, isCallValid, context, n, texturesPacked);
374 }
375 }
376
GetPointerv(GLenum pname,void ** params)377 void GL_APIENTRY GetPointerv(GLenum pname, void **params)
378 {
379 EVENT("(GLenum pname = %s, void **params = 0x%016" PRIxPTR ")",
380 GLenumToString(GLenumGroup::GetPointervPName, pname), (uintptr_t)params);
381
382 Context *context = GetValidGlobalContext();
383 if (context)
384 {
385 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
386 bool isCallValid =
387 (context->skipValidation() || ValidateGetPointerv(context, pname, params));
388 if (isCallValid)
389 {
390 context->getPointerv(pname, params);
391 }
392 ANGLE_CAPTURE(GetPointerv, isCallValid, context, pname, params);
393 }
394 }
395
IndexPointer(GLenum type,GLsizei stride,const void * pointer)396 void GL_APIENTRY IndexPointer(GLenum type, GLsizei stride, const void *pointer)
397 {
398 EVENT("(GLenum type = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
399 GLenumToString(GLenumGroup::IndexPointerType, type), stride, (uintptr_t)pointer);
400
401 Context *context = GetValidGlobalContext();
402 if (context)
403 {
404 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
405 bool isCallValid =
406 (context->skipValidation() || ValidateIndexPointer(context, type, stride, pointer));
407 if (isCallValid)
408 {
409 context->indexPointer(type, stride, pointer);
410 }
411 ANGLE_CAPTURE(IndexPointer, isCallValid, context, type, stride, pointer);
412 }
413 }
414
Indexub(GLubyte c)415 void GL_APIENTRY Indexub(GLubyte c)
416 {
417 EVENT("(GLubyte c = %d)", c);
418
419 Context *context = GetValidGlobalContext();
420 if (context)
421 {
422 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
423 bool isCallValid = (context->skipValidation() || ValidateIndexub(context, c));
424 if (isCallValid)
425 {
426 context->indexub(c);
427 }
428 ANGLE_CAPTURE(Indexub, isCallValid, context, c);
429 }
430 }
431
Indexubv(const GLubyte * c)432 void GL_APIENTRY Indexubv(const GLubyte *c)
433 {
434 EVENT("(const GLubyte *c = 0x%016" PRIxPTR ")", (uintptr_t)c);
435
436 Context *context = GetValidGlobalContext();
437 if (context)
438 {
439 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
440 bool isCallValid = (context->skipValidation() || ValidateIndexubv(context, c));
441 if (isCallValid)
442 {
443 context->indexubv(c);
444 }
445 ANGLE_CAPTURE(Indexubv, isCallValid, context, c);
446 }
447 }
448
InterleavedArrays(GLenum format,GLsizei stride,const void * pointer)449 void GL_APIENTRY InterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
450 {
451 EVENT("(GLenum format = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
452 GLenumToString(GLenumGroup::InterleavedArrayFormat, format), stride, (uintptr_t)pointer);
453
454 Context *context = GetValidGlobalContext();
455 if (context)
456 {
457 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
458 bool isCallValid = (context->skipValidation() ||
459 ValidateInterleavedArrays(context, format, stride, pointer));
460 if (isCallValid)
461 {
462 context->interleavedArrays(format, stride, pointer);
463 }
464 ANGLE_CAPTURE(InterleavedArrays, isCallValid, context, format, stride, pointer);
465 }
466 }
467
IsTexture(GLuint texture)468 GLboolean GL_APIENTRY IsTexture(GLuint texture)
469 {
470 EVENT("(GLuint texture = %u)", texture);
471
472 Context *context = GetValidGlobalContext();
473 GLboolean returnValue;
474 if (context)
475 {
476 TextureID texturePacked = FromGL<TextureID>(texture);
477 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
478 bool isCallValid = (context->skipValidation() || ValidateIsTexture(context, texturePacked));
479 if (isCallValid)
480 {
481 returnValue = context->isTexture(texturePacked);
482 }
483 else
484 {
485 returnValue = GetDefaultReturnValue<EntryPoint::IsTexture, GLboolean>();
486 }
487 ANGLE_CAPTURE(IsTexture, isCallValid, context, texturePacked, returnValue);
488 }
489 else
490 {
491 returnValue = GetDefaultReturnValue<EntryPoint::IsTexture, GLboolean>();
492 }
493 return returnValue;
494 }
495
NormalPointer(GLenum type,GLsizei stride,const void * pointer)496 void GL_APIENTRY NormalPointer(GLenum type, GLsizei stride, const void *pointer)
497 {
498 EVENT("(GLenum type = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
499 GLenumToString(GLenumGroup::NormalPointerType, type), stride, (uintptr_t)pointer);
500
501 Context *context = GetValidGlobalContext();
502 if (context)
503 {
504 VertexAttribType typePacked = FromGL<VertexAttribType>(type);
505 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
506 bool isCallValid = (context->skipValidation() ||
507 ValidateNormalPointer(context, typePacked, stride, pointer));
508 if (isCallValid)
509 {
510 context->normalPointer(typePacked, stride, pointer);
511 }
512 ANGLE_CAPTURE(NormalPointer, isCallValid, context, typePacked, stride, pointer);
513 }
514 }
515
PolygonOffset(GLfloat factor,GLfloat units)516 void GL_APIENTRY PolygonOffset(GLfloat factor, GLfloat units)
517 {
518 EVENT("(GLfloat factor = %f, GLfloat units = %f)", factor, units);
519
520 Context *context = GetValidGlobalContext();
521 if (context)
522 {
523 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
524 bool isCallValid =
525 (context->skipValidation() || ValidatePolygonOffset(context, factor, units));
526 if (isCallValid)
527 {
528 context->polygonOffset(factor, units);
529 }
530 ANGLE_CAPTURE(PolygonOffset, isCallValid, context, factor, units);
531 }
532 }
533
PopClientAttrib()534 void GL_APIENTRY PopClientAttrib()
535 {
536 EVENT("()");
537
538 Context *context = GetValidGlobalContext();
539 if (context)
540 {
541 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
542 bool isCallValid = (context->skipValidation() || ValidatePopClientAttrib(context));
543 if (isCallValid)
544 {
545 context->popClientAttrib();
546 }
547 ANGLE_CAPTURE(PopClientAttrib, isCallValid, context);
548 }
549 }
550
PrioritizeTextures(GLsizei n,const GLuint * textures,const GLfloat * priorities)551 void GL_APIENTRY PrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities)
552 {
553 EVENT("(GLsizei n = %d, const GLuint *textures = 0x%016" PRIxPTR
554 ", const GLfloat *priorities = 0x%016" PRIxPTR ")",
555 n, (uintptr_t)textures, (uintptr_t)priorities);
556
557 Context *context = GetValidGlobalContext();
558 if (context)
559 {
560 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
561 bool isCallValid = (context->skipValidation() ||
562 ValidatePrioritizeTextures(context, n, textures, priorities));
563 if (isCallValid)
564 {
565 context->prioritizeTextures(n, textures, priorities);
566 }
567 ANGLE_CAPTURE(PrioritizeTextures, isCallValid, context, n, textures, priorities);
568 }
569 }
570
PushClientAttrib(GLbitfield mask)571 void GL_APIENTRY PushClientAttrib(GLbitfield mask)
572 {
573 EVENT("(GLbitfield mask = %s)",
574 GLbitfieldToString(GLenumGroup::ClientAttribMask, mask).c_str());
575
576 Context *context = GetValidGlobalContext();
577 if (context)
578 {
579 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
580 bool isCallValid = (context->skipValidation() || ValidatePushClientAttrib(context, mask));
581 if (isCallValid)
582 {
583 context->pushClientAttrib(mask);
584 }
585 ANGLE_CAPTURE(PushClientAttrib, isCallValid, context, mask);
586 }
587 }
588
TexCoordPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)589 void GL_APIENTRY TexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
590 {
591 EVENT(
592 "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
593 "0x%016" PRIxPTR ")",
594 size, GLenumToString(GLenumGroup::TexCoordPointerType, type), stride, (uintptr_t)pointer);
595
596 Context *context = GetValidGlobalContext();
597 if (context)
598 {
599 VertexAttribType typePacked = FromGL<VertexAttribType>(type);
600 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
601 bool isCallValid = (context->skipValidation() ||
602 ValidateTexCoordPointer(context, size, typePacked, stride, pointer));
603 if (isCallValid)
604 {
605 context->texCoordPointer(size, typePacked, stride, pointer);
606 }
607 ANGLE_CAPTURE(TexCoordPointer, isCallValid, context, size, typePacked, stride, pointer);
608 }
609 }
610
TexSubImage1D(GLenum target,GLint level,GLint xoffset,GLsizei width,GLenum format,GLenum type,const void * pixels)611 void GL_APIENTRY TexSubImage1D(GLenum target,
612 GLint level,
613 GLint xoffset,
614 GLsizei width,
615 GLenum format,
616 GLenum type,
617 const void *pixels)
618 {
619 EVENT(
620 "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLsizei width = %d, GLenum "
621 "format = %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR ")",
622 GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, width,
623 GLenumToString(GLenumGroup::PixelFormat, format),
624 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
625
626 Context *context = GetValidGlobalContext();
627 if (context)
628 {
629 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
630 bool isCallValid =
631 (context->skipValidation() ||
632 ValidateTexSubImage1D(context, target, level, xoffset, width, format, type, pixels));
633 if (isCallValid)
634 {
635 context->texSubImage1D(target, level, xoffset, width, format, type, pixels);
636 }
637 ANGLE_CAPTURE(TexSubImage1D, isCallValid, context, target, level, xoffset, width, format,
638 type, pixels);
639 }
640 }
641
TexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void * pixels)642 void GL_APIENTRY TexSubImage2D(GLenum target,
643 GLint level,
644 GLint xoffset,
645 GLint yoffset,
646 GLsizei width,
647 GLsizei height,
648 GLenum format,
649 GLenum type,
650 const void *pixels)
651 {
652 EVENT(
653 "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
654 "width = %d, GLsizei height = %d, GLenum format = %s, GLenum type = %s, const void *pixels "
655 "= 0x%016" PRIxPTR ")",
656 GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, width, height,
657 GLenumToString(GLenumGroup::PixelFormat, format),
658 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
659
660 Context *context = GetValidGlobalContext();
661 if (context)
662 {
663 TextureTarget targetPacked = FromGL<TextureTarget>(target);
664 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
665 bool isCallValid = (context->skipValidation() ||
666 ValidateTexSubImage2D(context, targetPacked, level, xoffset, yoffset,
667 width, height, format, type, pixels));
668 if (isCallValid)
669 {
670 context->texSubImage2D(targetPacked, level, xoffset, yoffset, width, height, format,
671 type, pixels);
672 }
673 ANGLE_CAPTURE(TexSubImage2D, isCallValid, context, targetPacked, level, xoffset, yoffset,
674 width, height, format, type, pixels);
675 }
676 }
677
VertexPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)678 void GL_APIENTRY VertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
679 {
680 EVENT(
681 "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
682 "0x%016" PRIxPTR ")",
683 size, GLenumToString(GLenumGroup::VertexPointerType, type), stride, (uintptr_t)pointer);
684
685 Context *context = GetValidGlobalContext();
686 if (context)
687 {
688 VertexAttribType typePacked = FromGL<VertexAttribType>(type);
689 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
690 bool isCallValid = (context->skipValidation() ||
691 ValidateVertexPointer(context, size, typePacked, stride, pointer));
692 if (isCallValid)
693 {
694 context->vertexPointer(size, typePacked, stride, pointer);
695 }
696 ANGLE_CAPTURE(VertexPointer, isCallValid, context, size, typePacked, stride, pointer);
697 }
698 }
699 } // namespace gl
700