1 //
2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6
7 #include "test_utils/angle_test_configs.h"
8
9 #include "common/platform.h"
10 #include "util/util_gl.h"
11
12 namespace angle
13 {
14
PlatformParameters()15 PlatformParameters::PlatformParameters() : PlatformParameters(2, 0, GLESDriverType::AngleEGL) {}
16
PlatformParameters(EGLint majorVersion,EGLint minorVersion,const EGLPlatformParameters & eglPlatformParameters)17 PlatformParameters::PlatformParameters(EGLint majorVersion,
18 EGLint minorVersion,
19 const EGLPlatformParameters &eglPlatformParameters)
20 : driver(GLESDriverType::AngleEGL),
21 noFixture(false),
22 eglParameters(eglPlatformParameters),
23 majorVersion(majorVersion),
24 minorVersion(minorVersion)
25 {
26 initDefaultParameters();
27 }
28
PlatformParameters(EGLint majorVersion,EGLint minorVersion,GLESDriverType driver)29 PlatformParameters::PlatformParameters(EGLint majorVersion,
30 EGLint minorVersion,
31 GLESDriverType driver)
32 : driver(driver), noFixture(false), majorVersion(majorVersion), minorVersion(minorVersion)
33 {
34 initDefaultParameters();
35 }
36
getRenderer() const37 EGLint PlatformParameters::getRenderer() const
38 {
39 return eglParameters.renderer;
40 }
41
getDeviceType() const42 EGLint PlatformParameters::getDeviceType() const
43 {
44 return eglParameters.deviceType;
45 }
46
isSwiftshader() const47 bool PlatformParameters::isSwiftshader() const
48 {
49 return eglParameters.deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
50 }
51
initDefaultParameters()52 void PlatformParameters::initDefaultParameters()
53 {
54 // Default debug layers to enabled in tests.
55 eglParameters.debugLayersEnabled = EGL_TRUE;
56 }
57
operator <(const PlatformParameters & a,const PlatformParameters & b)58 bool operator<(const PlatformParameters &a, const PlatformParameters &b)
59 {
60 return a.tie() < b.tie();
61 }
62
operator ==(const PlatformParameters & a,const PlatformParameters & b)63 bool operator==(const PlatformParameters &a, const PlatformParameters &b)
64 {
65 return a.tie() == b.tie();
66 }
67
operator !=(const PlatformParameters & a,const PlatformParameters & b)68 bool operator!=(const PlatformParameters &a, const PlatformParameters &b)
69 {
70 return a.tie() != b.tie();
71 }
72
GetRendererName(EGLint renderer)73 const char *GetRendererName(EGLint renderer)
74 {
75 switch (renderer)
76 {
77 case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
78 return "Default";
79 case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
80 return "D3D9";
81 case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
82 return "D3D11";
83 case EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE:
84 return "Metal";
85 case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE:
86 return "Null";
87 case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
88 return "OpenGL";
89 case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
90 return "OpenGLES";
91 case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
92 return "Vulkan";
93 default:
94 return "Undefined";
95 }
96 }
97
operator <<(std::ostream & stream,const PlatformParameters & pp)98 std::ostream &operator<<(std::ostream &stream, const PlatformParameters &pp)
99 {
100 stream << "ES" << pp.majorVersion << "_";
101 if (pp.minorVersion != 0)
102 {
103 stream << pp.minorVersion << "_";
104 }
105
106 switch (pp.driver)
107 {
108 case GLESDriverType::AngleEGL:
109 stream << GetRendererName(pp.eglParameters.renderer);
110 break;
111 case GLESDriverType::SystemWGL:
112 stream << "WGL";
113 break;
114 case GLESDriverType::SystemEGL:
115 stream << "GLES";
116 break;
117 default:
118 stream << "Error";
119 break;
120 }
121
122 if (pp.eglParameters.majorVersion != EGL_DONT_CARE)
123 {
124 stream << "_" << pp.eglParameters.majorVersion;
125 }
126
127 if (pp.eglParameters.minorVersion != EGL_DONT_CARE)
128 {
129 stream << "_" << pp.eglParameters.minorVersion;
130 }
131
132 switch (pp.eglParameters.deviceType)
133 {
134 case EGL_DONT_CARE:
135 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE:
136 // default
137 break;
138
139 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
140 stream << "_Null";
141 break;
142
143 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE:
144 stream << "_Reference";
145 break;
146
147 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE:
148 stream << "_Warp";
149 break;
150
151 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE:
152 stream << "_SwiftShader";
153 break;
154
155 default:
156 stream << "_Error";
157 break;
158 }
159
160 switch (pp.eglParameters.presentPath)
161 {
162 case EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE:
163 stream << "_PresentPathCopy";
164 break;
165
166 case EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE:
167 stream << "_PresentPathFast";
168 break;
169
170 case EGL_DONT_CARE:
171 // default
172 break;
173
174 default:
175 stream << "_Error";
176 break;
177 }
178
179 if (pp.noFixture)
180 {
181 stream << "_NoFixture";
182 }
183
184 if (pp.eglParameters.contextVirtualization == EGL_FALSE)
185 {
186 stream << "_NoVirtual";
187 }
188
189 if (pp.eglParameters.transformFeedbackFeature == EGL_FALSE)
190 {
191 stream << "_NoTransformFeedback";
192 }
193 else if (pp.eglParameters.transformFeedbackFeature == EGL_TRUE)
194 {
195 stream << "_TransformFeedback";
196 }
197
198 if (pp.eglParameters.allocateNonZeroMemoryFeature == EGL_FALSE)
199 {
200 stream << "_NoAllocateNonZeroMemory";
201 }
202 else if (pp.eglParameters.allocateNonZeroMemoryFeature == EGL_TRUE)
203 {
204 stream << "_AllocateNonZeroMemory";
205 }
206
207 return stream;
208 }
209
210 // EGL platforms
211 namespace egl_platform
212 {
213
DEFAULT()214 EGLPlatformParameters DEFAULT()
215 {
216 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE);
217 }
218
DEFAULT_NULL()219 EGLPlatformParameters DEFAULT_NULL()
220 {
221 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE, EGL_DONT_CARE,
222 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
223 }
224
D3D9()225 EGLPlatformParameters D3D9()
226 {
227 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
228 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
229 }
230
D3D9_NULL()231 EGLPlatformParameters D3D9_NULL()
232 {
233 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
234 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
235 }
236
D3D9_REFERENCE()237 EGLPlatformParameters D3D9_REFERENCE()
238 {
239 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
240 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
241 }
242
D3D11()243 EGLPlatformParameters D3D11()
244 {
245 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
246 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
247 }
248
D3D11_PRESENT_PATH_FAST()249 EGLPlatformParameters D3D11_PRESENT_PATH_FAST()
250 {
251 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
252 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE,
253 EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE);
254 }
255
D3D11_FL11_1()256 EGLPlatformParameters D3D11_FL11_1()
257 {
258 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
259 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
260 }
261
D3D11_FL11_0()262 EGLPlatformParameters D3D11_FL11_0()
263 {
264 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
265 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
266 }
267
D3D11_FL10_1()268 EGLPlatformParameters D3D11_FL10_1()
269 {
270 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
271 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
272 }
273
D3D11_FL10_0()274 EGLPlatformParameters D3D11_FL10_0()
275 {
276 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
277 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
278 }
279
D3D11_FL9_3()280 EGLPlatformParameters D3D11_FL9_3()
281 {
282 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3,
283 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
284 }
285
D3D11_NULL()286 EGLPlatformParameters D3D11_NULL()
287 {
288 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
289 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
290 }
291
D3D11_WARP()292 EGLPlatformParameters D3D11_WARP()
293 {
294 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
295 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
296 }
297
D3D11_FL11_1_WARP()298 EGLPlatformParameters D3D11_FL11_1_WARP()
299 {
300 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
301 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
302 }
303
D3D11_FL11_0_WARP()304 EGLPlatformParameters D3D11_FL11_0_WARP()
305 {
306 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
307 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
308 }
309
D3D11_FL10_1_WARP()310 EGLPlatformParameters D3D11_FL10_1_WARP()
311 {
312 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
313 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
314 }
315
D3D11_FL10_0_WARP()316 EGLPlatformParameters D3D11_FL10_0_WARP()
317 {
318 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
319 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
320 }
321
D3D11_FL9_3_WARP()322 EGLPlatformParameters D3D11_FL9_3_WARP()
323 {
324 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3,
325 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
326 }
327
D3D11_REFERENCE()328 EGLPlatformParameters D3D11_REFERENCE()
329 {
330 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
331 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
332 }
333
D3D11_FL11_1_REFERENCE()334 EGLPlatformParameters D3D11_FL11_1_REFERENCE()
335 {
336 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
337 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
338 }
339
D3D11_FL11_0_REFERENCE()340 EGLPlatformParameters D3D11_FL11_0_REFERENCE()
341 {
342 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
343 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
344 }
345
D3D11_FL10_1_REFERENCE()346 EGLPlatformParameters D3D11_FL10_1_REFERENCE()
347 {
348 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
349 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
350 }
351
D3D11_FL10_0_REFERENCE()352 EGLPlatformParameters D3D11_FL10_0_REFERENCE()
353 {
354 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
355 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
356 }
357
D3D11_FL9_3_REFERENCE()358 EGLPlatformParameters D3D11_FL9_3_REFERENCE()
359 {
360 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3,
361 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
362 }
363
OPENGL()364 EGLPlatformParameters OPENGL()
365 {
366 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
367 }
368
OPENGL(EGLint major,EGLint minor)369 EGLPlatformParameters OPENGL(EGLint major, EGLint minor)
370 {
371 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, major, minor, EGL_DONT_CARE);
372 }
373
OPENGL_NULL()374 EGLPlatformParameters OPENGL_NULL()
375 {
376 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
377 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
378 }
379
OPENGLES()380 EGLPlatformParameters OPENGLES()
381 {
382 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
383 }
384
OPENGLES(EGLint major,EGLint minor)385 EGLPlatformParameters OPENGLES(EGLint major, EGLint minor)
386 {
387 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, major, minor,
388 EGL_DONT_CARE);
389 }
390
OPENGLES_NULL()391 EGLPlatformParameters OPENGLES_NULL()
392 {
393 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, EGL_DONT_CARE,
394 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
395 }
396
OPENGL_OR_GLES()397 EGLPlatformParameters OPENGL_OR_GLES()
398 {
399 #if defined(ANGLE_PLATFORM_ANDROID)
400 return OPENGLES();
401 #else
402 return OPENGL();
403 #endif
404 }
405
OPENGL_OR_GLES(EGLint major,EGLint minor)406 EGLPlatformParameters OPENGL_OR_GLES(EGLint major, EGLint minor)
407 {
408 #if defined(ANGLE_PLATFORM_ANDROID)
409 return OPENGLES(major, minor);
410 #else
411 return OPENGL(major, minor);
412 #endif
413 }
414
OPENGL_OR_GLES_NULL()415 EGLPlatformParameters OPENGL_OR_GLES_NULL()
416 {
417 #if defined(ANGLE_PLATFORM_ANDROID)
418 return OPENGLES_NULL();
419 #else
420 return OPENGL_NULL();
421 #endif
422 }
423
VULKAN()424 EGLPlatformParameters VULKAN()
425 {
426 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
427 }
428
VULKAN_NULL()429 EGLPlatformParameters VULKAN_NULL()
430 {
431 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
432 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
433 }
434
VULKAN_SWIFTSHADER()435 EGLPlatformParameters VULKAN_SWIFTSHADER()
436 {
437 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
438 EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE);
439 }
METAL()440 EGLPlatformParameters METAL()
441 {
442 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE);
443 }
444
445 } // namespace egl_platform
446
447 // ANGLE tests platforms
ES1_D3D9()448 PlatformParameters ES1_D3D9()
449 {
450 return PlatformParameters(1, 0, egl_platform::D3D9());
451 }
452
ES2_D3D9()453 PlatformParameters ES2_D3D9()
454 {
455 return PlatformParameters(2, 0, egl_platform::D3D9());
456 }
457
ES1_D3D11()458 PlatformParameters ES1_D3D11()
459 {
460 return PlatformParameters(1, 0, egl_platform::D3D11());
461 }
462
ES2_D3D11()463 PlatformParameters ES2_D3D11()
464 {
465 return PlatformParameters(2, 0, egl_platform::D3D11());
466 }
467
ES2_D3D11_PRESENT_PATH_FAST()468 PlatformParameters ES2_D3D11_PRESENT_PATH_FAST()
469 {
470 return PlatformParameters(2, 0, egl_platform::D3D11_PRESENT_PATH_FAST());
471 }
472
ES2_D3D11_FL11_0()473 PlatformParameters ES2_D3D11_FL11_0()
474 {
475 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0());
476 }
477
ES2_D3D11_FL10_1()478 PlatformParameters ES2_D3D11_FL10_1()
479 {
480 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1());
481 }
482
ES2_D3D11_FL10_0()483 PlatformParameters ES2_D3D11_FL10_0()
484 {
485 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0());
486 }
487
ES2_D3D11_FL9_3()488 PlatformParameters ES2_D3D11_FL9_3()
489 {
490 return PlatformParameters(2, 0, egl_platform::D3D11_FL9_3());
491 }
492
ES2_D3D11_WARP()493 PlatformParameters ES2_D3D11_WARP()
494 {
495 return PlatformParameters(2, 0, egl_platform::D3D11_WARP());
496 }
497
ES2_D3D11_FL11_0_WARP()498 PlatformParameters ES2_D3D11_FL11_0_WARP()
499 {
500 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0_WARP());
501 }
502
ES2_D3D11_FL10_1_WARP()503 PlatformParameters ES2_D3D11_FL10_1_WARP()
504 {
505 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1_WARP());
506 }
507
ES2_D3D11_FL10_0_WARP()508 PlatformParameters ES2_D3D11_FL10_0_WARP()
509 {
510 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0_WARP());
511 }
512
ES2_D3D11_FL9_3_WARP()513 PlatformParameters ES2_D3D11_FL9_3_WARP()
514 {
515 return PlatformParameters(2, 0, egl_platform::D3D11_FL9_3_WARP());
516 }
517
ES2_D3D11_REFERENCE()518 PlatformParameters ES2_D3D11_REFERENCE()
519 {
520 return PlatformParameters(2, 0, egl_platform::D3D11_REFERENCE());
521 }
522
ES2_D3D11_FL11_0_REFERENCE()523 PlatformParameters ES2_D3D11_FL11_0_REFERENCE()
524 {
525 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0_REFERENCE());
526 }
527
ES2_D3D11_FL10_1_REFERENCE()528 PlatformParameters ES2_D3D11_FL10_1_REFERENCE()
529 {
530 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1_REFERENCE());
531 }
532
ES2_D3D11_FL10_0_REFERENCE()533 PlatformParameters ES2_D3D11_FL10_0_REFERENCE()
534 {
535 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0_REFERENCE());
536 }
537
ES2_D3D11_FL9_3_REFERENCE()538 PlatformParameters ES2_D3D11_FL9_3_REFERENCE()
539 {
540 return PlatformParameters(2, 0, egl_platform::D3D11_FL9_3_REFERENCE());
541 }
542
ES3_D3D11()543 PlatformParameters ES3_D3D11()
544 {
545 return PlatformParameters(3, 0, egl_platform::D3D11());
546 }
547
ES3_D3D11_FL11_1()548 PlatformParameters ES3_D3D11_FL11_1()
549 {
550 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_1());
551 }
552
ES3_D3D11_FL11_0()553 PlatformParameters ES3_D3D11_FL11_0()
554 {
555 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_0());
556 }
557
ES3_D3D11_FL10_1()558 PlatformParameters ES3_D3D11_FL10_1()
559 {
560 return PlatformParameters(3, 0, egl_platform::D3D11_FL10_1());
561 }
562
ES31_D3D11()563 PlatformParameters ES31_D3D11()
564 {
565 return PlatformParameters(3, 1, egl_platform::D3D11());
566 }
567
ES31_D3D11_FL11_1()568 PlatformParameters ES31_D3D11_FL11_1()
569 {
570 return PlatformParameters(3, 1, egl_platform::D3D11_FL11_1());
571 }
572
ES31_D3D11_FL11_0()573 PlatformParameters ES31_D3D11_FL11_0()
574 {
575 return PlatformParameters(3, 1, egl_platform::D3D11_FL11_0());
576 }
577
ES3_D3D11_WARP()578 PlatformParameters ES3_D3D11_WARP()
579 {
580 return PlatformParameters(3, 0, egl_platform::D3D11_WARP());
581 }
582
ES3_D3D11_FL11_1_WARP()583 PlatformParameters ES3_D3D11_FL11_1_WARP()
584 {
585 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_1_WARP());
586 }
587
ES3_D3D11_FL11_0_WARP()588 PlatformParameters ES3_D3D11_FL11_0_WARP()
589 {
590 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_0_WARP());
591 }
592
ES3_D3D11_FL10_1_WARP()593 PlatformParameters ES3_D3D11_FL10_1_WARP()
594 {
595 return PlatformParameters(3, 0, egl_platform::D3D11_FL10_1_WARP());
596 }
597
ES1_OPENGLES()598 PlatformParameters ES1_OPENGLES()
599 {
600 return PlatformParameters(1, 0, egl_platform::OPENGLES());
601 }
602
ES2_OPENGLES()603 PlatformParameters ES2_OPENGLES()
604 {
605 return PlatformParameters(2, 0, egl_platform::OPENGLES());
606 }
607
ES2_OPENGLES(EGLint major,EGLint minor)608 PlatformParameters ES2_OPENGLES(EGLint major, EGLint minor)
609 {
610 return PlatformParameters(2, 0, egl_platform::OPENGLES(major, minor));
611 }
612
ES3_OPENGLES()613 PlatformParameters ES3_OPENGLES()
614 {
615 return PlatformParameters(3, 0, egl_platform::OPENGLES());
616 }
617
ES3_OPENGLES(EGLint major,EGLint minor)618 PlatformParameters ES3_OPENGLES(EGLint major, EGLint minor)
619 {
620 return PlatformParameters(3, 0, egl_platform::OPENGLES(major, minor));
621 }
622
ES31_OPENGLES()623 PlatformParameters ES31_OPENGLES()
624 {
625 return PlatformParameters(3, 1, egl_platform::OPENGLES());
626 }
627
ES31_OPENGLES(EGLint major,EGLint minor)628 PlatformParameters ES31_OPENGLES(EGLint major, EGLint minor)
629 {
630 return PlatformParameters(3, 1, egl_platform::OPENGLES(major, minor));
631 }
632
ES1_OPENGL()633 PlatformParameters ES1_OPENGL()
634 {
635 return PlatformParameters(1, 0, egl_platform::OPENGL());
636 }
637
ES2_OPENGL()638 PlatformParameters ES2_OPENGL()
639 {
640 return PlatformParameters(2, 0, egl_platform::OPENGL());
641 }
642
ES2_OPENGL(EGLint major,EGLint minor)643 PlatformParameters ES2_OPENGL(EGLint major, EGLint minor)
644 {
645 return PlatformParameters(2, 0, egl_platform::OPENGL(major, minor));
646 }
647
ES3_OPENGL()648 PlatformParameters ES3_OPENGL()
649 {
650 return PlatformParameters(3, 0, egl_platform::OPENGL());
651 }
652
ES3_OPENGL(EGLint major,EGLint minor)653 PlatformParameters ES3_OPENGL(EGLint major, EGLint minor)
654 {
655 return PlatformParameters(3, 0, egl_platform::OPENGL(major, minor));
656 }
657
ES31_OPENGL()658 PlatformParameters ES31_OPENGL()
659 {
660 return PlatformParameters(3, 1, egl_platform::OPENGL());
661 }
662
ES31_OPENGL(EGLint major,EGLint minor)663 PlatformParameters ES31_OPENGL(EGLint major, EGLint minor)
664 {
665 return PlatformParameters(3, 1, egl_platform::OPENGL(major, minor));
666 }
667
ES1_NULL()668 PlatformParameters ES1_NULL()
669 {
670 return PlatformParameters(1, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
671 }
672
ES2_NULL()673 PlatformParameters ES2_NULL()
674 {
675 return PlatformParameters(2, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
676 }
677
ES3_NULL()678 PlatformParameters ES3_NULL()
679 {
680 return PlatformParameters(3, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
681 }
682
ES31_NULL()683 PlatformParameters ES31_NULL()
684 {
685 return PlatformParameters(3, 1, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
686 }
687
ES1_VULKAN()688 PlatformParameters ES1_VULKAN()
689 {
690 return PlatformParameters(1, 0, egl_platform::VULKAN());
691 }
692
ES1_VULKAN_NULL()693 PlatformParameters ES1_VULKAN_NULL()
694 {
695 return PlatformParameters(1, 0, egl_platform::VULKAN_NULL());
696 }
697
ES1_VULKAN_SWIFTSHADER()698 PlatformParameters ES1_VULKAN_SWIFTSHADER()
699 {
700 return PlatformParameters(1, 0, egl_platform::VULKAN_SWIFTSHADER());
701 }
702
ES2_VULKAN()703 PlatformParameters ES2_VULKAN()
704 {
705 return PlatformParameters(2, 0, egl_platform::VULKAN());
706 }
707
ES2_VULKAN_NULL()708 PlatformParameters ES2_VULKAN_NULL()
709 {
710 return PlatformParameters(2, 0, egl_platform::VULKAN_NULL());
711 }
712
ES2_VULKAN_SWIFTSHADER()713 PlatformParameters ES2_VULKAN_SWIFTSHADER()
714 {
715 return PlatformParameters(2, 0, egl_platform::VULKAN_SWIFTSHADER());
716 }
717
ES3_VULKAN()718 PlatformParameters ES3_VULKAN()
719 {
720 return PlatformParameters(3, 0, egl_platform::VULKAN());
721 }
722
ES3_VULKAN_NULL()723 PlatformParameters ES3_VULKAN_NULL()
724 {
725 return PlatformParameters(3, 0, egl_platform::VULKAN_NULL());
726 }
727
ES3_VULKAN_SWIFTSHADER()728 PlatformParameters ES3_VULKAN_SWIFTSHADER()
729 {
730 return PlatformParameters(3, 0, egl_platform::VULKAN_SWIFTSHADER());
731 }
732
ES31_VULKAN()733 PlatformParameters ES31_VULKAN()
734 {
735 return PlatformParameters(3, 1, egl_platform::VULKAN());
736 }
737
ES31_VULKAN_NULL()738 PlatformParameters ES31_VULKAN_NULL()
739 {
740 return PlatformParameters(3, 1, egl_platform::VULKAN_NULL());
741 }
742
ES31_VULKAN_SWIFTSHADER()743 PlatformParameters ES31_VULKAN_SWIFTSHADER()
744 {
745 return PlatformParameters(3, 1, egl_platform::VULKAN_SWIFTSHADER());
746 }
747
ES1_METAL()748 PlatformParameters ES1_METAL()
749 {
750 return PlatformParameters(1, 0, egl_platform::METAL());
751 }
752
ES2_METAL()753 PlatformParameters ES2_METAL()
754 {
755 return PlatformParameters(2, 0, egl_platform::METAL());
756 }
757
ES3_METAL()758 PlatformParameters ES3_METAL()
759 {
760 return PlatformParameters(3, 0, egl_platform::METAL());
761 }
762
ES2_WGL()763 PlatformParameters ES2_WGL()
764 {
765 return PlatformParameters(2, 0, GLESDriverType::SystemWGL);
766 }
767
ES3_WGL()768 PlatformParameters ES3_WGL()
769 {
770 return PlatformParameters(3, 0, GLESDriverType::SystemWGL);
771 }
772 } // namespace angle
773