Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/src/libGLESv2/entry_points_gles_1_0_autogen.cpp
1693 views
1
// GENERATED FILE - DO NOT EDIT.
2
// Generated by generate_entry_points.py using data from gl.xml.
3
//
4
// Copyright 2020 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_1_0_autogen.cpp:
9
// Defines the GLES 1.0 entry points.
10
11
#include "libGLESv2/entry_points_gles_1_0_autogen.h"
12
13
#include "common/entry_points_enum_autogen.h"
14
#include "libANGLE/Context.h"
15
#include "libANGLE/Context.inl.h"
16
#include "libANGLE/capture/capture_gles_1_0_autogen.h"
17
#include "libANGLE/capture/gl_enum_utils.h"
18
#include "libANGLE/entry_points_utils.h"
19
#include "libANGLE/validationES1.h"
20
#include "libGLESv2/global_state.h"
21
22
using namespace gl;
23
24
extern "C" {
25
void GL_APIENTRY GL_AlphaFunc(GLenum func, GLfloat ref)
26
{
27
Context *context = GetValidGlobalContext();
28
EVENT(context, GLAlphaFunc, "context = %d, func = %s, ref = %f", CID(context),
29
GLenumToString(GLenumGroup::AlphaFunction, func), ref);
30
31
if (context)
32
{
33
AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func);
34
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
35
bool isCallValid =
36
(context->skipValidation() || ValidateAlphaFunc(context, funcPacked, ref));
37
if (isCallValid)
38
{
39
context->alphaFunc(funcPacked, ref);
40
}
41
ANGLE_CAPTURE(AlphaFunc, isCallValid, context, funcPacked, ref);
42
}
43
else
44
{
45
GenerateContextLostErrorOnCurrentGlobalContext();
46
}
47
}
48
49
void GL_APIENTRY GL_AlphaFuncx(GLenum func, GLfixed ref)
50
{
51
Context *context = GetValidGlobalContext();
52
EVENT(context, GLAlphaFuncx, "context = %d, func = %s, ref = 0x%X", CID(context),
53
GLenumToString(GLenumGroup::AlphaFunction, func), ref);
54
55
if (context)
56
{
57
AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func);
58
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
59
bool isCallValid =
60
(context->skipValidation() || ValidateAlphaFuncx(context, funcPacked, ref));
61
if (isCallValid)
62
{
63
context->alphaFuncx(funcPacked, ref);
64
}
65
ANGLE_CAPTURE(AlphaFuncx, isCallValid, context, funcPacked, ref);
66
}
67
else
68
{
69
GenerateContextLostErrorOnCurrentGlobalContext();
70
}
71
}
72
73
void GL_APIENTRY GL_ClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
74
{
75
Context *context = GetValidGlobalContext();
76
EVENT(context, GLClearColorx,
77
"context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", CID(context), red,
78
green, blue, alpha);
79
80
if (context)
81
{
82
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
83
bool isCallValid =
84
(context->skipValidation() || ValidateClearColorx(context, red, green, blue, alpha));
85
if (isCallValid)
86
{
87
context->clearColorx(red, green, blue, alpha);
88
}
89
ANGLE_CAPTURE(ClearColorx, isCallValid, context, red, green, blue, alpha);
90
}
91
else
92
{
93
GenerateContextLostErrorOnCurrentGlobalContext();
94
}
95
}
96
97
void GL_APIENTRY GL_ClearDepthx(GLfixed depth)
98
{
99
Context *context = GetValidGlobalContext();
100
EVENT(context, GLClearDepthx, "context = %d, depth = 0x%X", CID(context), depth);
101
102
if (context)
103
{
104
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
105
bool isCallValid = (context->skipValidation() || ValidateClearDepthx(context, depth));
106
if (isCallValid)
107
{
108
context->clearDepthx(depth);
109
}
110
ANGLE_CAPTURE(ClearDepthx, isCallValid, context, depth);
111
}
112
else
113
{
114
GenerateContextLostErrorOnCurrentGlobalContext();
115
}
116
}
117
118
void GL_APIENTRY GL_ClientActiveTexture(GLenum texture)
119
{
120
Context *context = GetValidGlobalContext();
121
EVENT(context, GLClientActiveTexture, "context = %d, texture = %s", CID(context),
122
GLenumToString(GLenumGroup::TextureUnit, texture));
123
124
if (context)
125
{
126
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
127
bool isCallValid =
128
(context->skipValidation() || ValidateClientActiveTexture(context, texture));
129
if (isCallValid)
130
{
131
context->clientActiveTexture(texture);
132
}
133
ANGLE_CAPTURE(ClientActiveTexture, isCallValid, context, texture);
134
}
135
else
136
{
137
GenerateContextLostErrorOnCurrentGlobalContext();
138
}
139
}
140
141
void GL_APIENTRY GL_ClipPlanef(GLenum p, const GLfloat *eqn)
142
{
143
Context *context = GetValidGlobalContext();
144
EVENT(context, GLClipPlanef, "context = %d, p = %s, eqn = 0x%016" PRIxPTR "", CID(context),
145
GLenumToString(GLenumGroup::ClipPlaneName, p), (uintptr_t)eqn);
146
147
if (context)
148
{
149
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
150
bool isCallValid = (context->skipValidation() || ValidateClipPlanef(context, p, eqn));
151
if (isCallValid)
152
{
153
context->clipPlanef(p, eqn);
154
}
155
ANGLE_CAPTURE(ClipPlanef, isCallValid, context, p, eqn);
156
}
157
else
158
{
159
GenerateContextLostErrorOnCurrentGlobalContext();
160
}
161
}
162
163
void GL_APIENTRY GL_ClipPlanex(GLenum plane, const GLfixed *equation)
164
{
165
Context *context = GetValidGlobalContext();
166
EVENT(context, GLClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
167
CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
168
169
if (context)
170
{
171
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
172
bool isCallValid =
173
(context->skipValidation() || ValidateClipPlanex(context, plane, equation));
174
if (isCallValid)
175
{
176
context->clipPlanex(plane, equation);
177
}
178
ANGLE_CAPTURE(ClipPlanex, isCallValid, context, plane, equation);
179
}
180
else
181
{
182
GenerateContextLostErrorOnCurrentGlobalContext();
183
}
184
}
185
186
void GL_APIENTRY GL_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
187
{
188
Context *context = GetValidGlobalContext();
189
EVENT(context, GLColor4f, "context = %d, red = %f, green = %f, blue = %f, alpha = %f",
190
CID(context), red, green, blue, alpha);
191
192
if (context)
193
{
194
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
195
bool isCallValid =
196
(context->skipValidation() || ValidateColor4f(context, red, green, blue, alpha));
197
if (isCallValid)
198
{
199
context->color4f(red, green, blue, alpha);
200
}
201
ANGLE_CAPTURE(Color4f, isCallValid, context, red, green, blue, alpha);
202
}
203
else
204
{
205
GenerateContextLostErrorOnCurrentGlobalContext();
206
}
207
}
208
209
void GL_APIENTRY GL_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
210
{
211
Context *context = GetValidGlobalContext();
212
EVENT(context, GLColor4ub, "context = %d, red = %d, green = %d, blue = %d, alpha = %d",
213
CID(context), red, green, blue, alpha);
214
215
if (context)
216
{
217
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
218
bool isCallValid =
219
(context->skipValidation() || ValidateColor4ub(context, red, green, blue, alpha));
220
if (isCallValid)
221
{
222
context->color4ub(red, green, blue, alpha);
223
}
224
ANGLE_CAPTURE(Color4ub, isCallValid, context, red, green, blue, alpha);
225
}
226
else
227
{
228
GenerateContextLostErrorOnCurrentGlobalContext();
229
}
230
}
231
232
void GL_APIENTRY GL_Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
233
{
234
Context *context = GetValidGlobalContext();
235
EVENT(context, GLColor4x, "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X",
236
CID(context), red, green, blue, alpha);
237
238
if (context)
239
{
240
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
241
bool isCallValid =
242
(context->skipValidation() || ValidateColor4x(context, red, green, blue, alpha));
243
if (isCallValid)
244
{
245
context->color4x(red, green, blue, alpha);
246
}
247
ANGLE_CAPTURE(Color4x, isCallValid, context, red, green, blue, alpha);
248
}
249
else
250
{
251
GenerateContextLostErrorOnCurrentGlobalContext();
252
}
253
}
254
255
void GL_APIENTRY GL_ColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
256
{
257
Context *context = GetValidGlobalContext();
258
EVENT(context, GLColorPointer,
259
"context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
260
CID(context), size, GLenumToString(GLenumGroup::ColorPointerType, type), stride,
261
(uintptr_t)pointer);
262
263
if (context)
264
{
265
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
266
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
267
bool isCallValid = (context->skipValidation() ||
268
ValidateColorPointer(context, size, typePacked, stride, pointer));
269
if (isCallValid)
270
{
271
context->colorPointer(size, typePacked, stride, pointer);
272
}
273
ANGLE_CAPTURE(ColorPointer, isCallValid, context, size, typePacked, stride, pointer);
274
}
275
else
276
{
277
GenerateContextLostErrorOnCurrentGlobalContext();
278
}
279
}
280
281
void GL_APIENTRY GL_DepthRangex(GLfixed n, GLfixed f)
282
{
283
Context *context = GetValidGlobalContext();
284
EVENT(context, GLDepthRangex, "context = %d, n = 0x%X, f = 0x%X", CID(context), n, f);
285
286
if (context)
287
{
288
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
289
bool isCallValid = (context->skipValidation() || ValidateDepthRangex(context, n, f));
290
if (isCallValid)
291
{
292
context->depthRangex(n, f);
293
}
294
ANGLE_CAPTURE(DepthRangex, isCallValid, context, n, f);
295
}
296
else
297
{
298
GenerateContextLostErrorOnCurrentGlobalContext();
299
}
300
}
301
302
void GL_APIENTRY GL_DisableClientState(GLenum array)
303
{
304
Context *context = GetValidGlobalContext();
305
EVENT(context, GLDisableClientState, "context = %d, array = %s", CID(context),
306
GLenumToString(GLenumGroup::EnableCap, array));
307
308
if (context)
309
{
310
ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
311
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
312
bool isCallValid =
313
(context->skipValidation() || ValidateDisableClientState(context, arrayPacked));
314
if (isCallValid)
315
{
316
context->disableClientState(arrayPacked);
317
}
318
ANGLE_CAPTURE(DisableClientState, isCallValid, context, arrayPacked);
319
}
320
else
321
{
322
GenerateContextLostErrorOnCurrentGlobalContext();
323
}
324
}
325
326
void GL_APIENTRY GL_EnableClientState(GLenum array)
327
{
328
Context *context = GetValidGlobalContext();
329
EVENT(context, GLEnableClientState, "context = %d, array = %s", CID(context),
330
GLenumToString(GLenumGroup::EnableCap, array));
331
332
if (context)
333
{
334
ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
335
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
336
bool isCallValid =
337
(context->skipValidation() || ValidateEnableClientState(context, arrayPacked));
338
if (isCallValid)
339
{
340
context->enableClientState(arrayPacked);
341
}
342
ANGLE_CAPTURE(EnableClientState, isCallValid, context, arrayPacked);
343
}
344
else
345
{
346
GenerateContextLostErrorOnCurrentGlobalContext();
347
}
348
}
349
350
void GL_APIENTRY GL_Fogf(GLenum pname, GLfloat param)
351
{
352
Context *context = GetValidGlobalContext();
353
EVENT(context, GLFogf, "context = %d, pname = %s, param = %f", CID(context),
354
GLenumToString(GLenumGroup::FogParameter, pname), param);
355
356
if (context)
357
{
358
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
359
bool isCallValid = (context->skipValidation() || ValidateFogf(context, pname, param));
360
if (isCallValid)
361
{
362
context->fogf(pname, param);
363
}
364
ANGLE_CAPTURE(Fogf, isCallValid, context, pname, param);
365
}
366
else
367
{
368
GenerateContextLostErrorOnCurrentGlobalContext();
369
}
370
}
371
372
void GL_APIENTRY GL_Fogfv(GLenum pname, const GLfloat *params)
373
{
374
Context *context = GetValidGlobalContext();
375
EVENT(context, GLFogfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
376
GLenumToString(GLenumGroup::FogParameter, pname), (uintptr_t)params);
377
378
if (context)
379
{
380
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
381
bool isCallValid = (context->skipValidation() || ValidateFogfv(context, pname, params));
382
if (isCallValid)
383
{
384
context->fogfv(pname, params);
385
}
386
ANGLE_CAPTURE(Fogfv, isCallValid, context, pname, params);
387
}
388
else
389
{
390
GenerateContextLostErrorOnCurrentGlobalContext();
391
}
392
}
393
394
void GL_APIENTRY GL_Fogx(GLenum pname, GLfixed param)
395
{
396
Context *context = GetValidGlobalContext();
397
EVENT(context, GLFogx, "context = %d, pname = %s, param = 0x%X", CID(context),
398
GLenumToString(GLenumGroup::FogPName, pname), param);
399
400
if (context)
401
{
402
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
403
bool isCallValid = (context->skipValidation() || ValidateFogx(context, pname, param));
404
if (isCallValid)
405
{
406
context->fogx(pname, param);
407
}
408
ANGLE_CAPTURE(Fogx, isCallValid, context, pname, param);
409
}
410
else
411
{
412
GenerateContextLostErrorOnCurrentGlobalContext();
413
}
414
}
415
416
void GL_APIENTRY GL_Fogxv(GLenum pname, const GLfixed *param)
417
{
418
Context *context = GetValidGlobalContext();
419
EVENT(context, GLFogxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", CID(context),
420
GLenumToString(GLenumGroup::FogPName, pname), (uintptr_t)param);
421
422
if (context)
423
{
424
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
425
bool isCallValid = (context->skipValidation() || ValidateFogxv(context, pname, param));
426
if (isCallValid)
427
{
428
context->fogxv(pname, param);
429
}
430
ANGLE_CAPTURE(Fogxv, isCallValid, context, pname, param);
431
}
432
else
433
{
434
GenerateContextLostErrorOnCurrentGlobalContext();
435
}
436
}
437
438
void GL_APIENTRY GL_Frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
439
{
440
Context *context = GetValidGlobalContext();
441
EVENT(context, GLFrustumf, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f",
442
CID(context), l, r, b, t, n, f);
443
444
if (context)
445
{
446
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
447
bool isCallValid =
448
(context->skipValidation() || ValidateFrustumf(context, l, r, b, t, n, f));
449
if (isCallValid)
450
{
451
context->frustumf(l, r, b, t, n, f);
452
}
453
ANGLE_CAPTURE(Frustumf, isCallValid, context, l, r, b, t, n, f);
454
}
455
else
456
{
457
GenerateContextLostErrorOnCurrentGlobalContext();
458
}
459
}
460
461
void GL_APIENTRY GL_Frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
462
{
463
Context *context = GetValidGlobalContext();
464
EVENT(context, GLFrustumx,
465
"context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context),
466
l, r, b, t, n, f);
467
468
if (context)
469
{
470
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
471
bool isCallValid =
472
(context->skipValidation() || ValidateFrustumx(context, l, r, b, t, n, f));
473
if (isCallValid)
474
{
475
context->frustumx(l, r, b, t, n, f);
476
}
477
ANGLE_CAPTURE(Frustumx, isCallValid, context, l, r, b, t, n, f);
478
}
479
else
480
{
481
GenerateContextLostErrorOnCurrentGlobalContext();
482
}
483
}
484
485
void GL_APIENTRY GL_GetClipPlanef(GLenum plane, GLfloat *equation)
486
{
487
Context *context = GetValidGlobalContext();
488
EVENT(context, GLGetClipPlanef, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
489
CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
490
491
if (context)
492
{
493
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
494
bool isCallValid =
495
(context->skipValidation() || ValidateGetClipPlanef(context, plane, equation));
496
if (isCallValid)
497
{
498
context->getClipPlanef(plane, equation);
499
}
500
ANGLE_CAPTURE(GetClipPlanef, isCallValid, context, plane, equation);
501
}
502
else
503
{
504
GenerateContextLostErrorOnCurrentGlobalContext();
505
}
506
}
507
508
void GL_APIENTRY GL_GetClipPlanex(GLenum plane, GLfixed *equation)
509
{
510
Context *context = GetValidGlobalContext();
511
EVENT(context, GLGetClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
512
CID(context), GLenumToString(GLenumGroup::ClipPlaneName, plane), (uintptr_t)equation);
513
514
if (context)
515
{
516
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
517
bool isCallValid =
518
(context->skipValidation() || ValidateGetClipPlanex(context, plane, equation));
519
if (isCallValid)
520
{
521
context->getClipPlanex(plane, equation);
522
}
523
ANGLE_CAPTURE(GetClipPlanex, isCallValid, context, plane, equation);
524
}
525
else
526
{
527
GenerateContextLostErrorOnCurrentGlobalContext();
528
}
529
}
530
531
void GL_APIENTRY GL_GetFixedv(GLenum pname, GLfixed *params)
532
{
533
Context *context = GetValidGlobalContext();
534
EVENT(context, GLGetFixedv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
535
CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)params);
536
537
if (context)
538
{
539
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
540
bool isCallValid = (context->skipValidation() || ValidateGetFixedv(context, pname, params));
541
if (isCallValid)
542
{
543
context->getFixedv(pname, params);
544
}
545
ANGLE_CAPTURE(GetFixedv, isCallValid, context, pname, params);
546
}
547
else
548
{
549
GenerateContextLostErrorOnCurrentGlobalContext();
550
}
551
}
552
553
void GL_APIENTRY GL_GetLightfv(GLenum light, GLenum pname, GLfloat *params)
554
{
555
Context *context = GetValidGlobalContext();
556
EVENT(context, GLGetLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
557
CID(context), GLenumToString(GLenumGroup::LightName, light),
558
GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
559
560
if (context)
561
{
562
LightParameter pnamePacked = PackParam<LightParameter>(pname);
563
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
564
bool isCallValid =
565
(context->skipValidation() || ValidateGetLightfv(context, light, pnamePacked, params));
566
if (isCallValid)
567
{
568
context->getLightfv(light, pnamePacked, params);
569
}
570
ANGLE_CAPTURE(GetLightfv, isCallValid, context, light, pnamePacked, params);
571
}
572
else
573
{
574
GenerateContextLostErrorOnCurrentGlobalContext();
575
}
576
}
577
578
void GL_APIENTRY GL_GetLightxv(GLenum light, GLenum pname, GLfixed *params)
579
{
580
Context *context = GetValidGlobalContext();
581
EVENT(context, GLGetLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
582
CID(context), GLenumToString(GLenumGroup::LightName, light),
583
GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
584
585
if (context)
586
{
587
LightParameter pnamePacked = PackParam<LightParameter>(pname);
588
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
589
bool isCallValid =
590
(context->skipValidation() || ValidateGetLightxv(context, light, pnamePacked, params));
591
if (isCallValid)
592
{
593
context->getLightxv(light, pnamePacked, params);
594
}
595
ANGLE_CAPTURE(GetLightxv, isCallValid, context, light, pnamePacked, params);
596
}
597
else
598
{
599
GenerateContextLostErrorOnCurrentGlobalContext();
600
}
601
}
602
603
void GL_APIENTRY GL_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
604
{
605
Context *context = GetValidGlobalContext();
606
EVENT(context, GLGetMaterialfv,
607
"context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
608
GLenumToString(GLenumGroup::MaterialFace, face),
609
GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
610
611
if (context)
612
{
613
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
614
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
615
bool isCallValid = (context->skipValidation() ||
616
ValidateGetMaterialfv(context, face, pnamePacked, params));
617
if (isCallValid)
618
{
619
context->getMaterialfv(face, pnamePacked, params);
620
}
621
ANGLE_CAPTURE(GetMaterialfv, isCallValid, context, face, pnamePacked, params);
622
}
623
else
624
{
625
GenerateContextLostErrorOnCurrentGlobalContext();
626
}
627
}
628
629
void GL_APIENTRY GL_GetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
630
{
631
Context *context = GetValidGlobalContext();
632
EVENT(context, GLGetMaterialxv,
633
"context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
634
GLenumToString(GLenumGroup::MaterialFace, face),
635
GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
636
637
if (context)
638
{
639
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
640
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
641
bool isCallValid = (context->skipValidation() ||
642
ValidateGetMaterialxv(context, face, pnamePacked, params));
643
if (isCallValid)
644
{
645
context->getMaterialxv(face, pnamePacked, params);
646
}
647
ANGLE_CAPTURE(GetMaterialxv, isCallValid, context, face, pnamePacked, params);
648
}
649
else
650
{
651
GenerateContextLostErrorOnCurrentGlobalContext();
652
}
653
}
654
655
void GL_APIENTRY GL_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
656
{
657
Context *context = GetValidGlobalContext();
658
EVENT(context, GLGetTexEnvfv,
659
"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
660
GLenumToString(GLenumGroup::TextureEnvTarget, target),
661
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
662
663
if (context)
664
{
665
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
666
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
667
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
668
bool isCallValid = (context->skipValidation() ||
669
ValidateGetTexEnvfv(context, targetPacked, pnamePacked, params));
670
if (isCallValid)
671
{
672
context->getTexEnvfv(targetPacked, pnamePacked, params);
673
}
674
ANGLE_CAPTURE(GetTexEnvfv, isCallValid, context, targetPacked, pnamePacked, params);
675
}
676
else
677
{
678
GenerateContextLostErrorOnCurrentGlobalContext();
679
}
680
}
681
682
void GL_APIENTRY GL_GetTexEnviv(GLenum target, GLenum pname, GLint *params)
683
{
684
Context *context = GetValidGlobalContext();
685
EVENT(context, GLGetTexEnviv,
686
"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
687
GLenumToString(GLenumGroup::TextureEnvTarget, target),
688
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
689
690
if (context)
691
{
692
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
693
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
694
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
695
bool isCallValid = (context->skipValidation() ||
696
ValidateGetTexEnviv(context, targetPacked, pnamePacked, params));
697
if (isCallValid)
698
{
699
context->getTexEnviv(targetPacked, pnamePacked, params);
700
}
701
ANGLE_CAPTURE(GetTexEnviv, isCallValid, context, targetPacked, pnamePacked, params);
702
}
703
else
704
{
705
GenerateContextLostErrorOnCurrentGlobalContext();
706
}
707
}
708
709
void GL_APIENTRY GL_GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params)
710
{
711
Context *context = GetValidGlobalContext();
712
EVENT(context, GLGetTexEnvxv,
713
"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
714
GLenumToString(GLenumGroup::TextureEnvTarget, target),
715
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
716
717
if (context)
718
{
719
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
720
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
721
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
722
bool isCallValid = (context->skipValidation() ||
723
ValidateGetTexEnvxv(context, targetPacked, pnamePacked, params));
724
if (isCallValid)
725
{
726
context->getTexEnvxv(targetPacked, pnamePacked, params);
727
}
728
ANGLE_CAPTURE(GetTexEnvxv, isCallValid, context, targetPacked, pnamePacked, params);
729
}
730
else
731
{
732
GenerateContextLostErrorOnCurrentGlobalContext();
733
}
734
}
735
736
void GL_APIENTRY GL_GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
737
{
738
Context *context = GetValidGlobalContext();
739
EVENT(context, GLGetTexParameterxv,
740
"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
741
GLenumToString(GLenumGroup::TextureTarget, target),
742
GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
743
744
if (context)
745
{
746
TextureType targetPacked = PackParam<TextureType>(target);
747
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
748
bool isCallValid = (context->skipValidation() ||
749
ValidateGetTexParameterxv(context, targetPacked, pname, params));
750
if (isCallValid)
751
{
752
context->getTexParameterxv(targetPacked, pname, params);
753
}
754
ANGLE_CAPTURE(GetTexParameterxv, isCallValid, context, targetPacked, pname, params);
755
}
756
else
757
{
758
GenerateContextLostErrorOnCurrentGlobalContext();
759
}
760
}
761
762
void GL_APIENTRY GL_LightModelf(GLenum pname, GLfloat param)
763
{
764
Context *context = GetValidGlobalContext();
765
EVENT(context, GLLightModelf, "context = %d, pname = %s, param = %f", CID(context),
766
GLenumToString(GLenumGroup::LightModelParameter, pname), param);
767
768
if (context)
769
{
770
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
771
bool isCallValid =
772
(context->skipValidation() || ValidateLightModelf(context, pname, param));
773
if (isCallValid)
774
{
775
context->lightModelf(pname, param);
776
}
777
ANGLE_CAPTURE(LightModelf, isCallValid, context, pname, param);
778
}
779
else
780
{
781
GenerateContextLostErrorOnCurrentGlobalContext();
782
}
783
}
784
785
void GL_APIENTRY GL_LightModelfv(GLenum pname, const GLfloat *params)
786
{
787
Context *context = GetValidGlobalContext();
788
EVENT(context, GLLightModelfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
789
CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)params);
790
791
if (context)
792
{
793
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
794
bool isCallValid =
795
(context->skipValidation() || ValidateLightModelfv(context, pname, params));
796
if (isCallValid)
797
{
798
context->lightModelfv(pname, params);
799
}
800
ANGLE_CAPTURE(LightModelfv, isCallValid, context, pname, params);
801
}
802
else
803
{
804
GenerateContextLostErrorOnCurrentGlobalContext();
805
}
806
}
807
808
void GL_APIENTRY GL_LightModelx(GLenum pname, GLfixed param)
809
{
810
Context *context = GetValidGlobalContext();
811
EVENT(context, GLLightModelx, "context = %d, pname = %s, param = 0x%X", CID(context),
812
GLenumToString(GLenumGroup::LightModelParameter, pname), param);
813
814
if (context)
815
{
816
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
817
bool isCallValid =
818
(context->skipValidation() || ValidateLightModelx(context, pname, param));
819
if (isCallValid)
820
{
821
context->lightModelx(pname, param);
822
}
823
ANGLE_CAPTURE(LightModelx, isCallValid, context, pname, param);
824
}
825
else
826
{
827
GenerateContextLostErrorOnCurrentGlobalContext();
828
}
829
}
830
831
void GL_APIENTRY GL_LightModelxv(GLenum pname, const GLfixed *param)
832
{
833
Context *context = GetValidGlobalContext();
834
EVENT(context, GLLightModelxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "",
835
CID(context), GLenumToString(GLenumGroup::LightModelParameter, pname), (uintptr_t)param);
836
837
if (context)
838
{
839
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
840
bool isCallValid =
841
(context->skipValidation() || ValidateLightModelxv(context, pname, param));
842
if (isCallValid)
843
{
844
context->lightModelxv(pname, param);
845
}
846
ANGLE_CAPTURE(LightModelxv, isCallValid, context, pname, param);
847
}
848
else
849
{
850
GenerateContextLostErrorOnCurrentGlobalContext();
851
}
852
}
853
854
void GL_APIENTRY GL_Lightf(GLenum light, GLenum pname, GLfloat param)
855
{
856
Context *context = GetValidGlobalContext();
857
EVENT(context, GLLightf, "context = %d, light = %s, pname = %s, param = %f", CID(context),
858
GLenumToString(GLenumGroup::LightName, light),
859
GLenumToString(GLenumGroup::LightParameter, pname), param);
860
861
if (context)
862
{
863
LightParameter pnamePacked = PackParam<LightParameter>(pname);
864
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
865
bool isCallValid =
866
(context->skipValidation() || ValidateLightf(context, light, pnamePacked, param));
867
if (isCallValid)
868
{
869
context->lightf(light, pnamePacked, param);
870
}
871
ANGLE_CAPTURE(Lightf, isCallValid, context, light, pnamePacked, param);
872
}
873
else
874
{
875
GenerateContextLostErrorOnCurrentGlobalContext();
876
}
877
}
878
879
void GL_APIENTRY GL_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
880
{
881
Context *context = GetValidGlobalContext();
882
EVENT(context, GLLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
883
CID(context), GLenumToString(GLenumGroup::LightName, light),
884
GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
885
886
if (context)
887
{
888
LightParameter pnamePacked = PackParam<LightParameter>(pname);
889
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
890
bool isCallValid =
891
(context->skipValidation() || ValidateLightfv(context, light, pnamePacked, params));
892
if (isCallValid)
893
{
894
context->lightfv(light, pnamePacked, params);
895
}
896
ANGLE_CAPTURE(Lightfv, isCallValid, context, light, pnamePacked, params);
897
}
898
else
899
{
900
GenerateContextLostErrorOnCurrentGlobalContext();
901
}
902
}
903
904
void GL_APIENTRY GL_Lightx(GLenum light, GLenum pname, GLfixed param)
905
{
906
Context *context = GetValidGlobalContext();
907
EVENT(context, GLLightx, "context = %d, light = %s, pname = %s, param = 0x%X", CID(context),
908
GLenumToString(GLenumGroup::LightName, light),
909
GLenumToString(GLenumGroup::LightParameter, pname), param);
910
911
if (context)
912
{
913
LightParameter pnamePacked = PackParam<LightParameter>(pname);
914
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
915
bool isCallValid =
916
(context->skipValidation() || ValidateLightx(context, light, pnamePacked, param));
917
if (isCallValid)
918
{
919
context->lightx(light, pnamePacked, param);
920
}
921
ANGLE_CAPTURE(Lightx, isCallValid, context, light, pnamePacked, param);
922
}
923
else
924
{
925
GenerateContextLostErrorOnCurrentGlobalContext();
926
}
927
}
928
929
void GL_APIENTRY GL_Lightxv(GLenum light, GLenum pname, const GLfixed *params)
930
{
931
Context *context = GetValidGlobalContext();
932
EVENT(context, GLLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
933
CID(context), GLenumToString(GLenumGroup::LightName, light),
934
GLenumToString(GLenumGroup::LightParameter, pname), (uintptr_t)params);
935
936
if (context)
937
{
938
LightParameter pnamePacked = PackParam<LightParameter>(pname);
939
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
940
bool isCallValid =
941
(context->skipValidation() || ValidateLightxv(context, light, pnamePacked, params));
942
if (isCallValid)
943
{
944
context->lightxv(light, pnamePacked, params);
945
}
946
ANGLE_CAPTURE(Lightxv, isCallValid, context, light, pnamePacked, params);
947
}
948
else
949
{
950
GenerateContextLostErrorOnCurrentGlobalContext();
951
}
952
}
953
954
void GL_APIENTRY GL_LineWidthx(GLfixed width)
955
{
956
Context *context = GetValidGlobalContext();
957
EVENT(context, GLLineWidthx, "context = %d, width = 0x%X", CID(context), width);
958
959
if (context)
960
{
961
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
962
bool isCallValid = (context->skipValidation() || ValidateLineWidthx(context, width));
963
if (isCallValid)
964
{
965
context->lineWidthx(width);
966
}
967
ANGLE_CAPTURE(LineWidthx, isCallValid, context, width);
968
}
969
else
970
{
971
GenerateContextLostErrorOnCurrentGlobalContext();
972
}
973
}
974
975
void GL_APIENTRY GL_LoadIdentity()
976
{
977
Context *context = GetValidGlobalContext();
978
EVENT(context, GLLoadIdentity, "context = %d", CID(context));
979
980
if (context)
981
{
982
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
983
bool isCallValid = (context->skipValidation() || ValidateLoadIdentity(context));
984
if (isCallValid)
985
{
986
context->loadIdentity();
987
}
988
ANGLE_CAPTURE(LoadIdentity, isCallValid, context);
989
}
990
else
991
{
992
GenerateContextLostErrorOnCurrentGlobalContext();
993
}
994
}
995
996
void GL_APIENTRY GL_LoadMatrixf(const GLfloat *m)
997
{
998
Context *context = GetValidGlobalContext();
999
EVENT(context, GLLoadMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1000
(uintptr_t)m);
1001
1002
if (context)
1003
{
1004
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1005
bool isCallValid = (context->skipValidation() || ValidateLoadMatrixf(context, m));
1006
if (isCallValid)
1007
{
1008
context->loadMatrixf(m);
1009
}
1010
ANGLE_CAPTURE(LoadMatrixf, isCallValid, context, m);
1011
}
1012
else
1013
{
1014
GenerateContextLostErrorOnCurrentGlobalContext();
1015
}
1016
}
1017
1018
void GL_APIENTRY GL_LoadMatrixx(const GLfixed *m)
1019
{
1020
Context *context = GetValidGlobalContext();
1021
EVENT(context, GLLoadMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1022
(uintptr_t)m);
1023
1024
if (context)
1025
{
1026
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1027
bool isCallValid = (context->skipValidation() || ValidateLoadMatrixx(context, m));
1028
if (isCallValid)
1029
{
1030
context->loadMatrixx(m);
1031
}
1032
ANGLE_CAPTURE(LoadMatrixx, isCallValid, context, m);
1033
}
1034
else
1035
{
1036
GenerateContextLostErrorOnCurrentGlobalContext();
1037
}
1038
}
1039
1040
void GL_APIENTRY GL_LogicOp(GLenum opcode)
1041
{
1042
Context *context = GetValidGlobalContext();
1043
EVENT(context, GLLogicOp, "context = %d, opcode = %s", CID(context),
1044
GLenumToString(GLenumGroup::LogicOp, opcode));
1045
1046
if (context)
1047
{
1048
LogicalOperation opcodePacked = PackParam<LogicalOperation>(opcode);
1049
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1050
bool isCallValid = (context->skipValidation() || ValidateLogicOp(context, opcodePacked));
1051
if (isCallValid)
1052
{
1053
context->logicOp(opcodePacked);
1054
}
1055
ANGLE_CAPTURE(LogicOp, isCallValid, context, opcodePacked);
1056
}
1057
else
1058
{
1059
GenerateContextLostErrorOnCurrentGlobalContext();
1060
}
1061
}
1062
1063
void GL_APIENTRY GL_Materialf(GLenum face, GLenum pname, GLfloat param)
1064
{
1065
Context *context = GetValidGlobalContext();
1066
EVENT(context, GLMaterialf, "context = %d, face = %s, pname = %s, param = %f", CID(context),
1067
GLenumToString(GLenumGroup::MaterialFace, face),
1068
GLenumToString(GLenumGroup::MaterialParameter, pname), param);
1069
1070
if (context)
1071
{
1072
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1073
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1074
bool isCallValid =
1075
(context->skipValidation() || ValidateMaterialf(context, face, pnamePacked, param));
1076
if (isCallValid)
1077
{
1078
context->materialf(face, pnamePacked, param);
1079
}
1080
ANGLE_CAPTURE(Materialf, isCallValid, context, face, pnamePacked, param);
1081
}
1082
else
1083
{
1084
GenerateContextLostErrorOnCurrentGlobalContext();
1085
}
1086
}
1087
1088
void GL_APIENTRY GL_Materialfv(GLenum face, GLenum pname, const GLfloat *params)
1089
{
1090
Context *context = GetValidGlobalContext();
1091
EVENT(context, GLMaterialfv, "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "",
1092
CID(context), GLenumToString(GLenumGroup::MaterialFace, face),
1093
GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)params);
1094
1095
if (context)
1096
{
1097
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1098
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1099
bool isCallValid =
1100
(context->skipValidation() || ValidateMaterialfv(context, face, pnamePacked, params));
1101
if (isCallValid)
1102
{
1103
context->materialfv(face, pnamePacked, params);
1104
}
1105
ANGLE_CAPTURE(Materialfv, isCallValid, context, face, pnamePacked, params);
1106
}
1107
else
1108
{
1109
GenerateContextLostErrorOnCurrentGlobalContext();
1110
}
1111
}
1112
1113
void GL_APIENTRY GL_Materialx(GLenum face, GLenum pname, GLfixed param)
1114
{
1115
Context *context = GetValidGlobalContext();
1116
EVENT(context, GLMaterialx, "context = %d, face = %s, pname = %s, param = 0x%X", CID(context),
1117
GLenumToString(GLenumGroup::MaterialFace, face),
1118
GLenumToString(GLenumGroup::MaterialParameter, pname), param);
1119
1120
if (context)
1121
{
1122
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1123
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1124
bool isCallValid =
1125
(context->skipValidation() || ValidateMaterialx(context, face, pnamePacked, param));
1126
if (isCallValid)
1127
{
1128
context->materialx(face, pnamePacked, param);
1129
}
1130
ANGLE_CAPTURE(Materialx, isCallValid, context, face, pnamePacked, param);
1131
}
1132
else
1133
{
1134
GenerateContextLostErrorOnCurrentGlobalContext();
1135
}
1136
}
1137
1138
void GL_APIENTRY GL_Materialxv(GLenum face, GLenum pname, const GLfixed *param)
1139
{
1140
Context *context = GetValidGlobalContext();
1141
EVENT(context, GLMaterialxv, "context = %d, face = %s, pname = %s, param = 0x%016" PRIxPTR "",
1142
CID(context), GLenumToString(GLenumGroup::MaterialFace, face),
1143
GLenumToString(GLenumGroup::MaterialParameter, pname), (uintptr_t)param);
1144
1145
if (context)
1146
{
1147
MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1148
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1149
bool isCallValid =
1150
(context->skipValidation() || ValidateMaterialxv(context, face, pnamePacked, param));
1151
if (isCallValid)
1152
{
1153
context->materialxv(face, pnamePacked, param);
1154
}
1155
ANGLE_CAPTURE(Materialxv, isCallValid, context, face, pnamePacked, param);
1156
}
1157
else
1158
{
1159
GenerateContextLostErrorOnCurrentGlobalContext();
1160
}
1161
}
1162
1163
void GL_APIENTRY GL_MatrixMode(GLenum mode)
1164
{
1165
Context *context = GetValidGlobalContext();
1166
EVENT(context, GLMatrixMode, "context = %d, mode = %s", CID(context),
1167
GLenumToString(GLenumGroup::MatrixMode, mode));
1168
1169
if (context)
1170
{
1171
MatrixType modePacked = PackParam<MatrixType>(mode);
1172
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1173
bool isCallValid = (context->skipValidation() || ValidateMatrixMode(context, modePacked));
1174
if (isCallValid)
1175
{
1176
context->matrixMode(modePacked);
1177
}
1178
ANGLE_CAPTURE(MatrixMode, isCallValid, context, modePacked);
1179
}
1180
else
1181
{
1182
GenerateContextLostErrorOnCurrentGlobalContext();
1183
}
1184
}
1185
1186
void GL_APIENTRY GL_MultMatrixf(const GLfloat *m)
1187
{
1188
Context *context = GetValidGlobalContext();
1189
EVENT(context, GLMultMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1190
(uintptr_t)m);
1191
1192
if (context)
1193
{
1194
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1195
bool isCallValid = (context->skipValidation() || ValidateMultMatrixf(context, m));
1196
if (isCallValid)
1197
{
1198
context->multMatrixf(m);
1199
}
1200
ANGLE_CAPTURE(MultMatrixf, isCallValid, context, m);
1201
}
1202
else
1203
{
1204
GenerateContextLostErrorOnCurrentGlobalContext();
1205
}
1206
}
1207
1208
void GL_APIENTRY GL_MultMatrixx(const GLfixed *m)
1209
{
1210
Context *context = GetValidGlobalContext();
1211
EVENT(context, GLMultMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1212
(uintptr_t)m);
1213
1214
if (context)
1215
{
1216
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1217
bool isCallValid = (context->skipValidation() || ValidateMultMatrixx(context, m));
1218
if (isCallValid)
1219
{
1220
context->multMatrixx(m);
1221
}
1222
ANGLE_CAPTURE(MultMatrixx, isCallValid, context, m);
1223
}
1224
else
1225
{
1226
GenerateContextLostErrorOnCurrentGlobalContext();
1227
}
1228
}
1229
1230
void GL_APIENTRY GL_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1231
{
1232
Context *context = GetValidGlobalContext();
1233
EVENT(context, GLMultiTexCoord4f, "context = %d, target = %s, s = %f, t = %f, r = %f, q = %f",
1234
CID(context), GLenumToString(GLenumGroup::TextureUnit, target), s, t, r, q);
1235
1236
if (context)
1237
{
1238
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1239
bool isCallValid =
1240
(context->skipValidation() || ValidateMultiTexCoord4f(context, target, s, t, r, q));
1241
if (isCallValid)
1242
{
1243
context->multiTexCoord4f(target, s, t, r, q);
1244
}
1245
ANGLE_CAPTURE(MultiTexCoord4f, isCallValid, context, target, s, t, r, q);
1246
}
1247
else
1248
{
1249
GenerateContextLostErrorOnCurrentGlobalContext();
1250
}
1251
}
1252
1253
void GL_APIENTRY GL_MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
1254
{
1255
Context *context = GetValidGlobalContext();
1256
EVENT(context, GLMultiTexCoord4x,
1257
"context = %d, texture = %s, s = 0x%X, t = 0x%X, r = 0x%X, q = 0x%X", CID(context),
1258
GLenumToString(GLenumGroup::TextureUnit, texture), s, t, r, q);
1259
1260
if (context)
1261
{
1262
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1263
bool isCallValid =
1264
(context->skipValidation() || ValidateMultiTexCoord4x(context, texture, s, t, r, q));
1265
if (isCallValid)
1266
{
1267
context->multiTexCoord4x(texture, s, t, r, q);
1268
}
1269
ANGLE_CAPTURE(MultiTexCoord4x, isCallValid, context, texture, s, t, r, q);
1270
}
1271
else
1272
{
1273
GenerateContextLostErrorOnCurrentGlobalContext();
1274
}
1275
}
1276
1277
void GL_APIENTRY GL_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1278
{
1279
Context *context = GetValidGlobalContext();
1280
EVENT(context, GLNormal3f, "context = %d, nx = %f, ny = %f, nz = %f", CID(context), nx, ny, nz);
1281
1282
if (context)
1283
{
1284
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1285
bool isCallValid = (context->skipValidation() || ValidateNormal3f(context, nx, ny, nz));
1286
if (isCallValid)
1287
{
1288
context->normal3f(nx, ny, nz);
1289
}
1290
ANGLE_CAPTURE(Normal3f, isCallValid, context, nx, ny, nz);
1291
}
1292
else
1293
{
1294
GenerateContextLostErrorOnCurrentGlobalContext();
1295
}
1296
}
1297
1298
void GL_APIENTRY GL_Normal3x(GLfixed nx, GLfixed ny, GLfixed nz)
1299
{
1300
Context *context = GetValidGlobalContext();
1301
EVENT(context, GLNormal3x, "context = %d, nx = 0x%X, ny = 0x%X, nz = 0x%X", CID(context), nx,
1302
ny, nz);
1303
1304
if (context)
1305
{
1306
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1307
bool isCallValid = (context->skipValidation() || ValidateNormal3x(context, nx, ny, nz));
1308
if (isCallValid)
1309
{
1310
context->normal3x(nx, ny, nz);
1311
}
1312
ANGLE_CAPTURE(Normal3x, isCallValid, context, nx, ny, nz);
1313
}
1314
else
1315
{
1316
GenerateContextLostErrorOnCurrentGlobalContext();
1317
}
1318
}
1319
1320
void GL_APIENTRY GL_NormalPointer(GLenum type, GLsizei stride, const void *pointer)
1321
{
1322
Context *context = GetValidGlobalContext();
1323
EVENT(context, GLNormalPointer,
1324
"context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context),
1325
GLenumToString(GLenumGroup::NormalPointerType, type), stride, (uintptr_t)pointer);
1326
1327
if (context)
1328
{
1329
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
1330
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1331
bool isCallValid = (context->skipValidation() ||
1332
ValidateNormalPointer(context, typePacked, stride, pointer));
1333
if (isCallValid)
1334
{
1335
context->normalPointer(typePacked, stride, pointer);
1336
}
1337
ANGLE_CAPTURE(NormalPointer, isCallValid, context, typePacked, stride, pointer);
1338
}
1339
else
1340
{
1341
GenerateContextLostErrorOnCurrentGlobalContext();
1342
}
1343
}
1344
1345
void GL_APIENTRY GL_Orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
1346
{
1347
Context *context = GetValidGlobalContext();
1348
EVENT(context, GLOrthof, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f",
1349
CID(context), l, r, b, t, n, f);
1350
1351
if (context)
1352
{
1353
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1354
bool isCallValid = (context->skipValidation() || ValidateOrthof(context, l, r, b, t, n, f));
1355
if (isCallValid)
1356
{
1357
context->orthof(l, r, b, t, n, f);
1358
}
1359
ANGLE_CAPTURE(Orthof, isCallValid, context, l, r, b, t, n, f);
1360
}
1361
else
1362
{
1363
GenerateContextLostErrorOnCurrentGlobalContext();
1364
}
1365
}
1366
1367
void GL_APIENTRY GL_Orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
1368
{
1369
Context *context = GetValidGlobalContext();
1370
EVENT(context, GLOrthox,
1371
"context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context),
1372
l, r, b, t, n, f);
1373
1374
if (context)
1375
{
1376
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1377
bool isCallValid = (context->skipValidation() || ValidateOrthox(context, l, r, b, t, n, f));
1378
if (isCallValid)
1379
{
1380
context->orthox(l, r, b, t, n, f);
1381
}
1382
ANGLE_CAPTURE(Orthox, isCallValid, context, l, r, b, t, n, f);
1383
}
1384
else
1385
{
1386
GenerateContextLostErrorOnCurrentGlobalContext();
1387
}
1388
}
1389
1390
void GL_APIENTRY GL_PointParameterf(GLenum pname, GLfloat param)
1391
{
1392
Context *context = GetValidGlobalContext();
1393
EVENT(context, GLPointParameterf, "context = %d, pname = %s, param = %f", CID(context),
1394
GLenumToString(GLenumGroup::DefaultGroup, pname), param);
1395
1396
if (context)
1397
{
1398
PointParameter pnamePacked = PackParam<PointParameter>(pname);
1399
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1400
bool isCallValid =
1401
(context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param));
1402
if (isCallValid)
1403
{
1404
context->pointParameterf(pnamePacked, param);
1405
}
1406
ANGLE_CAPTURE(PointParameterf, isCallValid, context, pnamePacked, param);
1407
}
1408
else
1409
{
1410
GenerateContextLostErrorOnCurrentGlobalContext();
1411
}
1412
}
1413
1414
void GL_APIENTRY GL_PointParameterfv(GLenum pname, const GLfloat *params)
1415
{
1416
Context *context = GetValidGlobalContext();
1417
EVENT(context, GLPointParameterfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
1418
CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
1419
1420
if (context)
1421
{
1422
PointParameter pnamePacked = PackParam<PointParameter>(pname);
1423
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1424
bool isCallValid =
1425
(context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params));
1426
if (isCallValid)
1427
{
1428
context->pointParameterfv(pnamePacked, params);
1429
}
1430
ANGLE_CAPTURE(PointParameterfv, isCallValid, context, pnamePacked, params);
1431
}
1432
else
1433
{
1434
GenerateContextLostErrorOnCurrentGlobalContext();
1435
}
1436
}
1437
1438
void GL_APIENTRY GL_PointParameterx(GLenum pname, GLfixed param)
1439
{
1440
Context *context = GetValidGlobalContext();
1441
EVENT(context, GLPointParameterx, "context = %d, pname = %s, param = 0x%X", CID(context),
1442
GLenumToString(GLenumGroup::DefaultGroup, pname), param);
1443
1444
if (context)
1445
{
1446
PointParameter pnamePacked = PackParam<PointParameter>(pname);
1447
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1448
bool isCallValid =
1449
(context->skipValidation() || ValidatePointParameterx(context, pnamePacked, param));
1450
if (isCallValid)
1451
{
1452
context->pointParameterx(pnamePacked, param);
1453
}
1454
ANGLE_CAPTURE(PointParameterx, isCallValid, context, pnamePacked, param);
1455
}
1456
else
1457
{
1458
GenerateContextLostErrorOnCurrentGlobalContext();
1459
}
1460
}
1461
1462
void GL_APIENTRY GL_PointParameterxv(GLenum pname, const GLfixed *params)
1463
{
1464
Context *context = GetValidGlobalContext();
1465
EVENT(context, GLPointParameterxv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
1466
CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
1467
1468
if (context)
1469
{
1470
PointParameter pnamePacked = PackParam<PointParameter>(pname);
1471
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1472
bool isCallValid =
1473
(context->skipValidation() || ValidatePointParameterxv(context, pnamePacked, params));
1474
if (isCallValid)
1475
{
1476
context->pointParameterxv(pnamePacked, params);
1477
}
1478
ANGLE_CAPTURE(PointParameterxv, isCallValid, context, pnamePacked, params);
1479
}
1480
else
1481
{
1482
GenerateContextLostErrorOnCurrentGlobalContext();
1483
}
1484
}
1485
1486
void GL_APIENTRY GL_PointSize(GLfloat size)
1487
{
1488
Context *context = GetValidGlobalContext();
1489
EVENT(context, GLPointSize, "context = %d, size = %f", CID(context), size);
1490
1491
if (context)
1492
{
1493
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1494
bool isCallValid = (context->skipValidation() || ValidatePointSize(context, size));
1495
if (isCallValid)
1496
{
1497
context->pointSize(size);
1498
}
1499
ANGLE_CAPTURE(PointSize, isCallValid, context, size);
1500
}
1501
else
1502
{
1503
GenerateContextLostErrorOnCurrentGlobalContext();
1504
}
1505
}
1506
1507
void GL_APIENTRY GL_PointSizex(GLfixed size)
1508
{
1509
Context *context = GetValidGlobalContext();
1510
EVENT(context, GLPointSizex, "context = %d, size = 0x%X", CID(context), size);
1511
1512
if (context)
1513
{
1514
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1515
bool isCallValid = (context->skipValidation() || ValidatePointSizex(context, size));
1516
if (isCallValid)
1517
{
1518
context->pointSizex(size);
1519
}
1520
ANGLE_CAPTURE(PointSizex, isCallValid, context, size);
1521
}
1522
else
1523
{
1524
GenerateContextLostErrorOnCurrentGlobalContext();
1525
}
1526
}
1527
1528
void GL_APIENTRY GL_PolygonOffsetx(GLfixed factor, GLfixed units)
1529
{
1530
Context *context = GetValidGlobalContext();
1531
EVENT(context, GLPolygonOffsetx, "context = %d, factor = 0x%X, units = 0x%X", CID(context),
1532
factor, units);
1533
1534
if (context)
1535
{
1536
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1537
bool isCallValid =
1538
(context->skipValidation() || ValidatePolygonOffsetx(context, factor, units));
1539
if (isCallValid)
1540
{
1541
context->polygonOffsetx(factor, units);
1542
}
1543
ANGLE_CAPTURE(PolygonOffsetx, isCallValid, context, factor, units);
1544
}
1545
else
1546
{
1547
GenerateContextLostErrorOnCurrentGlobalContext();
1548
}
1549
}
1550
1551
void GL_APIENTRY GL_PopMatrix()
1552
{
1553
Context *context = GetValidGlobalContext();
1554
EVENT(context, GLPopMatrix, "context = %d", CID(context));
1555
1556
if (context)
1557
{
1558
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1559
bool isCallValid = (context->skipValidation() || ValidatePopMatrix(context));
1560
if (isCallValid)
1561
{
1562
context->popMatrix();
1563
}
1564
ANGLE_CAPTURE(PopMatrix, isCallValid, context);
1565
}
1566
else
1567
{
1568
GenerateContextLostErrorOnCurrentGlobalContext();
1569
}
1570
}
1571
1572
void GL_APIENTRY GL_PushMatrix()
1573
{
1574
Context *context = GetValidGlobalContext();
1575
EVENT(context, GLPushMatrix, "context = %d", CID(context));
1576
1577
if (context)
1578
{
1579
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1580
bool isCallValid = (context->skipValidation() || ValidatePushMatrix(context));
1581
if (isCallValid)
1582
{
1583
context->pushMatrix();
1584
}
1585
ANGLE_CAPTURE(PushMatrix, isCallValid, context);
1586
}
1587
else
1588
{
1589
GenerateContextLostErrorOnCurrentGlobalContext();
1590
}
1591
}
1592
1593
void GL_APIENTRY GL_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
1594
{
1595
Context *context = GetValidGlobalContext();
1596
EVENT(context, GLRotatef, "context = %d, angle = %f, x = %f, y = %f, z = %f", CID(context),
1597
angle, x, y, z);
1598
1599
if (context)
1600
{
1601
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1602
bool isCallValid = (context->skipValidation() || ValidateRotatef(context, angle, x, y, z));
1603
if (isCallValid)
1604
{
1605
context->rotatef(angle, x, y, z);
1606
}
1607
ANGLE_CAPTURE(Rotatef, isCallValid, context, angle, x, y, z);
1608
}
1609
else
1610
{
1611
GenerateContextLostErrorOnCurrentGlobalContext();
1612
}
1613
}
1614
1615
void GL_APIENTRY GL_Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
1616
{
1617
Context *context = GetValidGlobalContext();
1618
EVENT(context, GLRotatex, "context = %d, angle = 0x%X, x = 0x%X, y = 0x%X, z = 0x%X",
1619
CID(context), angle, x, y, z);
1620
1621
if (context)
1622
{
1623
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1624
bool isCallValid = (context->skipValidation() || ValidateRotatex(context, angle, x, y, z));
1625
if (isCallValid)
1626
{
1627
context->rotatex(angle, x, y, z);
1628
}
1629
ANGLE_CAPTURE(Rotatex, isCallValid, context, angle, x, y, z);
1630
}
1631
else
1632
{
1633
GenerateContextLostErrorOnCurrentGlobalContext();
1634
}
1635
}
1636
1637
void GL_APIENTRY GL_SampleCoveragex(GLclampx value, GLboolean invert)
1638
{
1639
Context *context = GetValidGlobalContext();
1640
EVENT(context, GLSampleCoveragex, "context = %d, value = 0x%X, invert = %s", CID(context),
1641
value, GLbooleanToString(invert));
1642
1643
if (context)
1644
{
1645
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1646
bool isCallValid =
1647
(context->skipValidation() || ValidateSampleCoveragex(context, value, invert));
1648
if (isCallValid)
1649
{
1650
context->sampleCoveragex(value, invert);
1651
}
1652
ANGLE_CAPTURE(SampleCoveragex, isCallValid, context, value, invert);
1653
}
1654
else
1655
{
1656
GenerateContextLostErrorOnCurrentGlobalContext();
1657
}
1658
}
1659
1660
void GL_APIENTRY GL_Scalef(GLfloat x, GLfloat y, GLfloat z)
1661
{
1662
Context *context = GetValidGlobalContext();
1663
EVENT(context, GLScalef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
1664
1665
if (context)
1666
{
1667
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1668
bool isCallValid = (context->skipValidation() || ValidateScalef(context, x, y, z));
1669
if (isCallValid)
1670
{
1671
context->scalef(x, y, z);
1672
}
1673
ANGLE_CAPTURE(Scalef, isCallValid, context, x, y, z);
1674
}
1675
else
1676
{
1677
GenerateContextLostErrorOnCurrentGlobalContext();
1678
}
1679
}
1680
1681
void GL_APIENTRY GL_Scalex(GLfixed x, GLfixed y, GLfixed z)
1682
{
1683
Context *context = GetValidGlobalContext();
1684
EVENT(context, GLScalex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, z);
1685
1686
if (context)
1687
{
1688
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1689
bool isCallValid = (context->skipValidation() || ValidateScalex(context, x, y, z));
1690
if (isCallValid)
1691
{
1692
context->scalex(x, y, z);
1693
}
1694
ANGLE_CAPTURE(Scalex, isCallValid, context, x, y, z);
1695
}
1696
else
1697
{
1698
GenerateContextLostErrorOnCurrentGlobalContext();
1699
}
1700
}
1701
1702
void GL_APIENTRY GL_ShadeModel(GLenum mode)
1703
{
1704
Context *context = GetValidGlobalContext();
1705
EVENT(context, GLShadeModel, "context = %d, mode = %s", CID(context),
1706
GLenumToString(GLenumGroup::ShadingModel, mode));
1707
1708
if (context)
1709
{
1710
ShadingModel modePacked = PackParam<ShadingModel>(mode);
1711
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1712
bool isCallValid = (context->skipValidation() || ValidateShadeModel(context, modePacked));
1713
if (isCallValid)
1714
{
1715
context->shadeModel(modePacked);
1716
}
1717
ANGLE_CAPTURE(ShadeModel, isCallValid, context, modePacked);
1718
}
1719
else
1720
{
1721
GenerateContextLostErrorOnCurrentGlobalContext();
1722
}
1723
}
1724
1725
void GL_APIENTRY GL_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
1726
{
1727
Context *context = GetValidGlobalContext();
1728
EVENT(context, GLTexCoordPointer,
1729
"context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
1730
CID(context), size, GLenumToString(GLenumGroup::TexCoordPointerType, type), stride,
1731
(uintptr_t)pointer);
1732
1733
if (context)
1734
{
1735
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
1736
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1737
bool isCallValid = (context->skipValidation() ||
1738
ValidateTexCoordPointer(context, size, typePacked, stride, pointer));
1739
if (isCallValid)
1740
{
1741
context->texCoordPointer(size, typePacked, stride, pointer);
1742
}
1743
ANGLE_CAPTURE(TexCoordPointer, isCallValid, context, size, typePacked, stride, pointer);
1744
}
1745
else
1746
{
1747
GenerateContextLostErrorOnCurrentGlobalContext();
1748
}
1749
}
1750
1751
void GL_APIENTRY GL_TexEnvf(GLenum target, GLenum pname, GLfloat param)
1752
{
1753
Context *context = GetValidGlobalContext();
1754
EVENT(context, GLTexEnvf, "context = %d, target = %s, pname = %s, param = %f", CID(context),
1755
GLenumToString(GLenumGroup::TextureEnvTarget, target),
1756
GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
1757
1758
if (context)
1759
{
1760
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1761
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1762
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1763
bool isCallValid = (context->skipValidation() ||
1764
ValidateTexEnvf(context, targetPacked, pnamePacked, param));
1765
if (isCallValid)
1766
{
1767
context->texEnvf(targetPacked, pnamePacked, param);
1768
}
1769
ANGLE_CAPTURE(TexEnvf, isCallValid, context, targetPacked, pnamePacked, param);
1770
}
1771
else
1772
{
1773
GenerateContextLostErrorOnCurrentGlobalContext();
1774
}
1775
}
1776
1777
void GL_APIENTRY GL_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
1778
{
1779
Context *context = GetValidGlobalContext();
1780
EVENT(context, GLTexEnvfv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
1781
CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target),
1782
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
1783
1784
if (context)
1785
{
1786
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1787
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1788
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1789
bool isCallValid = (context->skipValidation() ||
1790
ValidateTexEnvfv(context, targetPacked, pnamePacked, params));
1791
if (isCallValid)
1792
{
1793
context->texEnvfv(targetPacked, pnamePacked, params);
1794
}
1795
ANGLE_CAPTURE(TexEnvfv, isCallValid, context, targetPacked, pnamePacked, params);
1796
}
1797
else
1798
{
1799
GenerateContextLostErrorOnCurrentGlobalContext();
1800
}
1801
}
1802
1803
void GL_APIENTRY GL_TexEnvi(GLenum target, GLenum pname, GLint param)
1804
{
1805
Context *context = GetValidGlobalContext();
1806
EVENT(context, GLTexEnvi, "context = %d, target = %s, pname = %s, param = %d", CID(context),
1807
GLenumToString(GLenumGroup::TextureEnvTarget, target),
1808
GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
1809
1810
if (context)
1811
{
1812
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1813
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1814
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1815
bool isCallValid = (context->skipValidation() ||
1816
ValidateTexEnvi(context, targetPacked, pnamePacked, param));
1817
if (isCallValid)
1818
{
1819
context->texEnvi(targetPacked, pnamePacked, param);
1820
}
1821
ANGLE_CAPTURE(TexEnvi, isCallValid, context, targetPacked, pnamePacked, param);
1822
}
1823
else
1824
{
1825
GenerateContextLostErrorOnCurrentGlobalContext();
1826
}
1827
}
1828
1829
void GL_APIENTRY GL_TexEnviv(GLenum target, GLenum pname, const GLint *params)
1830
{
1831
Context *context = GetValidGlobalContext();
1832
EVENT(context, GLTexEnviv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
1833
CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target),
1834
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
1835
1836
if (context)
1837
{
1838
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1839
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1840
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1841
bool isCallValid = (context->skipValidation() ||
1842
ValidateTexEnviv(context, targetPacked, pnamePacked, params));
1843
if (isCallValid)
1844
{
1845
context->texEnviv(targetPacked, pnamePacked, params);
1846
}
1847
ANGLE_CAPTURE(TexEnviv, isCallValid, context, targetPacked, pnamePacked, params);
1848
}
1849
else
1850
{
1851
GenerateContextLostErrorOnCurrentGlobalContext();
1852
}
1853
}
1854
1855
void GL_APIENTRY GL_TexEnvx(GLenum target, GLenum pname, GLfixed param)
1856
{
1857
Context *context = GetValidGlobalContext();
1858
EVENT(context, GLTexEnvx, "context = %d, target = %s, pname = %s, param = 0x%X", CID(context),
1859
GLenumToString(GLenumGroup::TextureEnvTarget, target),
1860
GLenumToString(GLenumGroup::TextureEnvParameter, pname), param);
1861
1862
if (context)
1863
{
1864
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1865
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1866
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1867
bool isCallValid = (context->skipValidation() ||
1868
ValidateTexEnvx(context, targetPacked, pnamePacked, param));
1869
if (isCallValid)
1870
{
1871
context->texEnvx(targetPacked, pnamePacked, param);
1872
}
1873
ANGLE_CAPTURE(TexEnvx, isCallValid, context, targetPacked, pnamePacked, param);
1874
}
1875
else
1876
{
1877
GenerateContextLostErrorOnCurrentGlobalContext();
1878
}
1879
}
1880
1881
void GL_APIENTRY GL_TexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
1882
{
1883
Context *context = GetValidGlobalContext();
1884
EVENT(context, GLTexEnvxv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
1885
CID(context), GLenumToString(GLenumGroup::TextureEnvTarget, target),
1886
GLenumToString(GLenumGroup::TextureEnvParameter, pname), (uintptr_t)params);
1887
1888
if (context)
1889
{
1890
TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
1891
TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
1892
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1893
bool isCallValid = (context->skipValidation() ||
1894
ValidateTexEnvxv(context, targetPacked, pnamePacked, params));
1895
if (isCallValid)
1896
{
1897
context->texEnvxv(targetPacked, pnamePacked, params);
1898
}
1899
ANGLE_CAPTURE(TexEnvxv, isCallValid, context, targetPacked, pnamePacked, params);
1900
}
1901
else
1902
{
1903
GenerateContextLostErrorOnCurrentGlobalContext();
1904
}
1905
}
1906
1907
void GL_APIENTRY GL_TexParameterx(GLenum target, GLenum pname, GLfixed param)
1908
{
1909
Context *context = GetValidGlobalContext();
1910
EVENT(context, GLTexParameterx, "context = %d, target = %s, pname = %s, param = 0x%X",
1911
CID(context), GLenumToString(GLenumGroup::TextureTarget, target),
1912
GLenumToString(GLenumGroup::GetTextureParameter, pname), param);
1913
1914
if (context)
1915
{
1916
TextureType targetPacked = PackParam<TextureType>(target);
1917
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1918
bool isCallValid = (context->skipValidation() ||
1919
ValidateTexParameterx(context, targetPacked, pname, param));
1920
if (isCallValid)
1921
{
1922
context->texParameterx(targetPacked, pname, param);
1923
}
1924
ANGLE_CAPTURE(TexParameterx, isCallValid, context, targetPacked, pname, param);
1925
}
1926
else
1927
{
1928
GenerateContextLostErrorOnCurrentGlobalContext();
1929
}
1930
}
1931
1932
void GL_APIENTRY GL_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
1933
{
1934
Context *context = GetValidGlobalContext();
1935
EVENT(context, GLTexParameterxv,
1936
"context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
1937
GLenumToString(GLenumGroup::TextureTarget, target),
1938
GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1939
1940
if (context)
1941
{
1942
TextureType targetPacked = PackParam<TextureType>(target);
1943
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1944
bool isCallValid = (context->skipValidation() ||
1945
ValidateTexParameterxv(context, targetPacked, pname, params));
1946
if (isCallValid)
1947
{
1948
context->texParameterxv(targetPacked, pname, params);
1949
}
1950
ANGLE_CAPTURE(TexParameterxv, isCallValid, context, targetPacked, pname, params);
1951
}
1952
else
1953
{
1954
GenerateContextLostErrorOnCurrentGlobalContext();
1955
}
1956
}
1957
1958
void GL_APIENTRY GL_Translatef(GLfloat x, GLfloat y, GLfloat z)
1959
{
1960
Context *context = GetValidGlobalContext();
1961
EVENT(context, GLTranslatef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
1962
1963
if (context)
1964
{
1965
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1966
bool isCallValid = (context->skipValidation() || ValidateTranslatef(context, x, y, z));
1967
if (isCallValid)
1968
{
1969
context->translatef(x, y, z);
1970
}
1971
ANGLE_CAPTURE(Translatef, isCallValid, context, x, y, z);
1972
}
1973
else
1974
{
1975
GenerateContextLostErrorOnCurrentGlobalContext();
1976
}
1977
}
1978
1979
void GL_APIENTRY GL_Translatex(GLfixed x, GLfixed y, GLfixed z)
1980
{
1981
Context *context = GetValidGlobalContext();
1982
EVENT(context, GLTranslatex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y,
1983
z);
1984
1985
if (context)
1986
{
1987
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
1988
bool isCallValid = (context->skipValidation() || ValidateTranslatex(context, x, y, z));
1989
if (isCallValid)
1990
{
1991
context->translatex(x, y, z);
1992
}
1993
ANGLE_CAPTURE(Translatex, isCallValid, context, x, y, z);
1994
}
1995
else
1996
{
1997
GenerateContextLostErrorOnCurrentGlobalContext();
1998
}
1999
}
2000
2001
void GL_APIENTRY GL_VertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
2002
{
2003
Context *context = GetValidGlobalContext();
2004
EVENT(context, GLVertexPointer,
2005
"context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
2006
CID(context), size, GLenumToString(GLenumGroup::VertexPointerType, type), stride,
2007
(uintptr_t)pointer);
2008
2009
if (context)
2010
{
2011
VertexAttribType typePacked = PackParam<VertexAttribType>(type);
2012
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
2013
bool isCallValid = (context->skipValidation() ||
2014
ValidateVertexPointer(context, size, typePacked, stride, pointer));
2015
if (isCallValid)
2016
{
2017
context->vertexPointer(size, typePacked, stride, pointer);
2018
}
2019
ANGLE_CAPTURE(VertexPointer, isCallValid, context, size, typePacked, stride, pointer);
2020
}
2021
else
2022
{
2023
GenerateContextLostErrorOnCurrentGlobalContext();
2024
}
2025
}
2026
2027
} // extern "C"
2028
2029