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/debug.h"
10 #include "common/platform.h"
11 #include "common/string_utils.h"
12 #include "util/util_gl.h"
13
14 #include <algorithm>
15 #include <cctype>
16
17 namespace angle
18 {
19 namespace
20 {
AppendCapitalizedFeature(std::ostream & stream,Feature feature)21 void AppendCapitalizedFeature(std::ostream &stream, Feature feature)
22 {
23 const char *name = GetFeatureName(feature);
24
25 if (name == nullptr)
26 {
27 stream << "InternalError";
28 return;
29 }
30
31 const std::string camelCase = angle::ToCamelCase(name);
32
33 stream << static_cast<char>(std::toupper(camelCase[0])) << (camelCase.c_str() + 1);
34 }
35
HasFeatureOverride(const std::vector<Feature> & overrides,Feature feature)36 bool HasFeatureOverride(const std::vector<Feature> &overrides, Feature feature)
37 {
38 return std::find(overrides.begin(), overrides.end(), feature) != overrides.end();
39 }
40 } // namespace
41
PlatformParameters()42 PlatformParameters::PlatformParameters()
43 : PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, GLESDriverType::AngleEGL)
44 {}
45
PlatformParameters(EGLenum clientType,EGLint majorVersion,EGLint minorVersion,EGLint profileMask,const EGLPlatformParameters & eglPlatformParameters)46 PlatformParameters::PlatformParameters(EGLenum clientType,
47 EGLint majorVersion,
48 EGLint minorVersion,
49 EGLint profileMask,
50 const EGLPlatformParameters &eglPlatformParameters)
51 : driver(GLESDriverType::AngleEGL),
52 noFixture(false),
53 eglParameters(eglPlatformParameters),
54 clientType(clientType),
55 majorVersion(majorVersion),
56 minorVersion(minorVersion),
57 profileMask(profileMask)
58 {
59 initDefaultParameters();
60 }
61
PlatformParameters(EGLenum clientType,EGLint majorVersion,EGLint minorVersion,EGLint profileMask,GLESDriverType driver)62 PlatformParameters::PlatformParameters(EGLenum clientType,
63 EGLint majorVersion,
64 EGLint minorVersion,
65 EGLint profileMask,
66 GLESDriverType driver)
67 : driver(driver),
68 noFixture(false),
69 clientType(clientType),
70 majorVersion(majorVersion),
71 minorVersion(minorVersion),
72 profileMask(profileMask)
73 {
74 initDefaultParameters();
75 }
76
getRenderer() const77 EGLint PlatformParameters::getRenderer() const
78 {
79 return eglParameters.renderer;
80 }
81
getDeviceType() const82 EGLint PlatformParameters::getDeviceType() const
83 {
84 return eglParameters.deviceType;
85 }
86
isSwiftshader() const87 bool PlatformParameters::isSwiftshader() const
88 {
89 return eglParameters.deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
90 }
91
isMetal() const92 bool PlatformParameters::isMetal() const
93 {
94 return eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE;
95 }
96
isVulkan() const97 bool PlatformParameters::isVulkan() const
98 {
99 return eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE;
100 }
101
isANGLE() const102 bool PlatformParameters::isANGLE() const
103 {
104 return driver == GLESDriverType::AngleEGL;
105 }
106
isDesktopOpenGLFrontend() const107 bool PlatformParameters::isDesktopOpenGLFrontend() const
108 {
109 return clientType == EGL_OPENGL_API;
110 }
111
initDefaultParameters()112 void PlatformParameters::initDefaultParameters()
113 {
114 // Default debug layers to enabled in tests.
115 eglParameters.debugLayersEnabled = EGL_TRUE;
116 }
117
isEnableRequested(Feature feature) const118 bool PlatformParameters::isEnableRequested(Feature feature) const
119 {
120 return HasFeatureOverride(eglParameters.enabledFeatureOverrides, feature);
121 }
122
isDisableRequested(Feature feature) const123 bool PlatformParameters::isDisableRequested(Feature feature) const
124 {
125 return HasFeatureOverride(eglParameters.disabledFeatureOverrides, feature);
126 }
127
operator <(const PlatformParameters & a,const PlatformParameters & b)128 bool operator<(const PlatformParameters &a, const PlatformParameters &b)
129 {
130 return a.tie() < b.tie();
131 }
132
operator ==(const PlatformParameters & a,const PlatformParameters & b)133 bool operator==(const PlatformParameters &a, const PlatformParameters &b)
134 {
135 return a.tie() == b.tie();
136 }
137
operator !=(const PlatformParameters & a,const PlatformParameters & b)138 bool operator!=(const PlatformParameters &a, const PlatformParameters &b)
139 {
140 return a.tie() != b.tie();
141 }
142
GetRendererName(EGLint renderer)143 const char *GetRendererName(EGLint renderer)
144 {
145 switch (renderer)
146 {
147 case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
148 return "Default";
149 case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
150 return "D3D9";
151 case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
152 return "D3D11";
153 case EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE:
154 return "Metal";
155 case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE:
156 return "Null";
157 case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
158 return "OpenGL";
159 case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
160 return "OpenGLES";
161 case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
162 return "Vulkan";
163 default:
164 return "Undefined";
165 }
166 }
167
operator <<(std::ostream & stream,const PlatformParameters & pp)168 std::ostream &operator<<(std::ostream &stream, const PlatformParameters &pp)
169 {
170 switch (pp.clientType)
171 {
172 case EGL_OPENGL_ES_API:
173 stream << "ES";
174 break;
175
176 case EGL_OPENGL_API:
177 stream << "GL";
178 break;
179
180 case EGL_OPENVG_API:
181 stream << "VG";
182 break;
183
184 default:
185 UNREACHABLE();
186 stream << "Error";
187 break;
188 }
189
190 stream << pp.majorVersion << "_";
191 if (pp.minorVersion != 0)
192 {
193 stream << pp.minorVersion << "_";
194 }
195
196 if (pp.clientType == EGL_OPENGL_API)
197 {
198 if ((pp.profileMask & EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT) != 0)
199 {
200 stream << "Core_";
201 }
202 if ((pp.profileMask & EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT) != 0)
203 {
204 stream << "Compatibility_";
205 }
206 }
207 else
208 {
209 // Profile mask is only valid for desktop OpenGL contexts.
210 ASSERT(pp.profileMask == 0);
211 }
212
213 switch (pp.driver)
214 {
215 case GLESDriverType::AngleEGL:
216 stream << GetRendererName(pp.eglParameters.renderer);
217 break;
218 case GLESDriverType::AngleVulkanSecondariesEGL:
219 ASSERT(pp.eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
220 stream << "ANGLE_Vulkan_Secondaries";
221 break;
222 case GLESDriverType::SystemWGL:
223 stream << "WGL";
224 break;
225 case GLESDriverType::SystemEGL:
226 stream << "EGL";
227 break;
228 case GLESDriverType::ZinkEGL:
229 stream << "Zink";
230 break;
231 default:
232 stream << "Error";
233 break;
234 }
235
236 if (pp.eglParameters.majorVersion != EGL_DONT_CARE)
237 {
238 stream << "_" << pp.eglParameters.majorVersion;
239 }
240
241 if (pp.eglParameters.minorVersion != EGL_DONT_CARE)
242 {
243 stream << "_" << pp.eglParameters.minorVersion;
244 }
245
246 switch (pp.eglParameters.deviceType)
247 {
248 case EGL_DONT_CARE:
249 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE:
250 // default
251 break;
252
253 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
254 stream << "_Null";
255 break;
256
257 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE:
258 stream << "_Reference";
259 break;
260
261 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE:
262 stream << "_Warp";
263 break;
264
265 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE:
266 stream << "_SwiftShader";
267 break;
268
269 default:
270 stream << "_Error";
271 break;
272 }
273
274 switch (pp.eglParameters.presentPath)
275 {
276 case EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE:
277 stream << "_PresentPathCopy";
278 break;
279
280 case EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE:
281 stream << "_PresentPathFast";
282 break;
283
284 case EGL_DONT_CARE:
285 // default
286 break;
287
288 default:
289 stream << "_Error";
290 break;
291 }
292
293 if (pp.noFixture)
294 {
295 stream << "_NoFixture";
296 }
297
298 if (pp.eglParameters.displayPowerPreference == EGL_LOW_POWER_ANGLE)
299 {
300 stream << "_LowPowerGPU";
301 }
302
303 if (pp.eglParameters.displayPowerPreference == EGL_HIGH_POWER_ANGLE)
304 {
305 stream << "_HighPowerGPU";
306 }
307
308 for (Feature feature : pp.eglParameters.enabledFeatureOverrides)
309 {
310 stream << "_";
311 AppendCapitalizedFeature(stream, feature);
312 }
313 for (Feature feature : pp.eglParameters.disabledFeatureOverrides)
314 {
315 stream << "_No";
316 AppendCapitalizedFeature(stream, feature);
317 }
318
319 return stream;
320 }
321
322 // EGL platforms
323 namespace egl_platform
324 {
325
DEFAULT()326 EGLPlatformParameters DEFAULT()
327 {
328 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE);
329 }
330
DEFAULT_NULL()331 EGLPlatformParameters DEFAULT_NULL()
332 {
333 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE, EGL_DONT_CARE,
334 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
335 }
336
D3D9()337 EGLPlatformParameters D3D9()
338 {
339 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
340 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
341 }
342
D3D9_NULL()343 EGLPlatformParameters D3D9_NULL()
344 {
345 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
346 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
347 }
348
D3D9_REFERENCE()349 EGLPlatformParameters D3D9_REFERENCE()
350 {
351 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
352 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
353 }
354
D3D11()355 EGLPlatformParameters D3D11()
356 {
357 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
358 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
359 }
360
D3D11_PRESENT_PATH_FAST()361 EGLPlatformParameters D3D11_PRESENT_PATH_FAST()
362 {
363 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
364 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE,
365 EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE);
366 }
367
D3D11_FL11_1()368 EGLPlatformParameters D3D11_FL11_1()
369 {
370 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
371 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
372 }
373
D3D11_FL11_0()374 EGLPlatformParameters D3D11_FL11_0()
375 {
376 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
377 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
378 }
379
D3D11_FL10_1()380 EGLPlatformParameters D3D11_FL10_1()
381 {
382 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
383 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
384 }
385
D3D11_FL10_0()386 EGLPlatformParameters D3D11_FL10_0()
387 {
388 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
389 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
390 }
391
D3D11_NULL()392 EGLPlatformParameters D3D11_NULL()
393 {
394 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
395 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
396 }
397
D3D11_WARP()398 EGLPlatformParameters D3D11_WARP()
399 {
400 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
401 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
402 }
403
D3D11_FL11_1_WARP()404 EGLPlatformParameters D3D11_FL11_1_WARP()
405 {
406 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
407 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
408 }
409
D3D11_FL11_0_WARP()410 EGLPlatformParameters D3D11_FL11_0_WARP()
411 {
412 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
413 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
414 }
415
D3D11_FL10_1_WARP()416 EGLPlatformParameters D3D11_FL10_1_WARP()
417 {
418 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
419 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
420 }
421
D3D11_FL10_0_WARP()422 EGLPlatformParameters D3D11_FL10_0_WARP()
423 {
424 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
425 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
426 }
427
D3D11_REFERENCE()428 EGLPlatformParameters D3D11_REFERENCE()
429 {
430 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
431 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
432 }
433
D3D11_FL11_1_REFERENCE()434 EGLPlatformParameters D3D11_FL11_1_REFERENCE()
435 {
436 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
437 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
438 }
439
D3D11_FL11_0_REFERENCE()440 EGLPlatformParameters D3D11_FL11_0_REFERENCE()
441 {
442 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
443 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
444 }
445
D3D11_FL10_1_REFERENCE()446 EGLPlatformParameters D3D11_FL10_1_REFERENCE()
447 {
448 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
449 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
450 }
451
D3D11_FL10_0_REFERENCE()452 EGLPlatformParameters D3D11_FL10_0_REFERENCE()
453 {
454 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
455 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
456 }
457
OPENGL()458 EGLPlatformParameters OPENGL()
459 {
460 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
461 }
462
OPENGL(EGLint major,EGLint minor)463 EGLPlatformParameters OPENGL(EGLint major, EGLint minor)
464 {
465 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, major, minor, EGL_DONT_CARE);
466 }
467
OPENGL_NULL()468 EGLPlatformParameters OPENGL_NULL()
469 {
470 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
471 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
472 }
473
OPENGLES()474 EGLPlatformParameters OPENGLES()
475 {
476 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
477 }
478
OPENGLES(EGLint major,EGLint minor)479 EGLPlatformParameters OPENGLES(EGLint major, EGLint minor)
480 {
481 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, major, minor,
482 EGL_DONT_CARE);
483 }
484
OPENGLES_NULL()485 EGLPlatformParameters OPENGLES_NULL()
486 {
487 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, EGL_DONT_CARE,
488 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
489 }
490
OPENGL_OR_GLES()491 EGLPlatformParameters OPENGL_OR_GLES()
492 {
493 #if defined(ANGLE_PLATFORM_ANDROID)
494 return OPENGLES();
495 #else
496 return OPENGL();
497 #endif
498 }
499
OPENGL_OR_GLES(EGLint major,EGLint minor)500 EGLPlatformParameters OPENGL_OR_GLES(EGLint major, EGLint minor)
501 {
502 #if defined(ANGLE_PLATFORM_ANDROID)
503 return OPENGLES(major, minor);
504 #else
505 return OPENGL(major, minor);
506 #endif
507 }
508
OPENGL_OR_GLES_NULL()509 EGLPlatformParameters OPENGL_OR_GLES_NULL()
510 {
511 #if defined(ANGLE_PLATFORM_ANDROID)
512 return OPENGLES_NULL();
513 #else
514 return OPENGL_NULL();
515 #endif
516 }
517
VULKAN()518 EGLPlatformParameters VULKAN()
519 {
520 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
521 }
522
VULKAN_NULL()523 EGLPlatformParameters VULKAN_NULL()
524 {
525 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
526 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
527 }
528
VULKAN_SWIFTSHADER()529 EGLPlatformParameters VULKAN_SWIFTSHADER()
530 {
531 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
532 EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE);
533 }
METAL()534 EGLPlatformParameters METAL()
535 {
536 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE);
537 }
538
539 } // namespace egl_platform
540
541 // ANGLE tests platforms
ES1_D3D9()542 PlatformParameters ES1_D3D9()
543 {
544 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::D3D9());
545 }
546
ES2_D3D9()547 PlatformParameters ES2_D3D9()
548 {
549 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D9());
550 }
551
ES1_D3D11()552 PlatformParameters ES1_D3D11()
553 {
554 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::D3D11());
555 }
556
ES2_D3D11()557 PlatformParameters ES2_D3D11()
558 {
559 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11());
560 }
561
ES2_D3D11_PRESENT_PATH_FAST()562 PlatformParameters ES2_D3D11_PRESENT_PATH_FAST()
563 {
564 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_PRESENT_PATH_FAST());
565 }
566
ES2_D3D11_FL11_0()567 PlatformParameters ES2_D3D11_FL11_0()
568 {
569 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL11_0());
570 }
571
ES2_D3D11_FL10_1()572 PlatformParameters ES2_D3D11_FL10_1()
573 {
574 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_1());
575 }
576
ES2_D3D11_FL10_0()577 PlatformParameters ES2_D3D11_FL10_0()
578 {
579 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_0());
580 }
581
ES2_D3D11_WARP()582 PlatformParameters ES2_D3D11_WARP()
583 {
584 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_WARP());
585 }
586
ES2_D3D11_FL11_0_WARP()587 PlatformParameters ES2_D3D11_FL11_0_WARP()
588 {
589 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL11_0_WARP());
590 }
591
ES2_D3D11_FL10_1_WARP()592 PlatformParameters ES2_D3D11_FL10_1_WARP()
593 {
594 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_1_WARP());
595 }
596
ES2_D3D11_FL10_0_WARP()597 PlatformParameters ES2_D3D11_FL10_0_WARP()
598 {
599 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_0_WARP());
600 }
601
ES2_D3D11_REFERENCE()602 PlatformParameters ES2_D3D11_REFERENCE()
603 {
604 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_REFERENCE());
605 }
606
ES2_D3D11_FL11_0_REFERENCE()607 PlatformParameters ES2_D3D11_FL11_0_REFERENCE()
608 {
609 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL11_0_REFERENCE());
610 }
611
ES2_D3D11_FL10_1_REFERENCE()612 PlatformParameters ES2_D3D11_FL10_1_REFERENCE()
613 {
614 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_1_REFERENCE());
615 }
616
ES2_D3D11_FL10_0_REFERENCE()617 PlatformParameters ES2_D3D11_FL10_0_REFERENCE()
618 {
619 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::D3D11_FL10_0_REFERENCE());
620 }
621
ES3_D3D11()622 PlatformParameters ES3_D3D11()
623 {
624 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11());
625 }
626
ES3_D3D11_FL11_1()627 PlatformParameters ES3_D3D11_FL11_1()
628 {
629 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL11_1());
630 }
631
ES3_D3D11_FL11_0()632 PlatformParameters ES3_D3D11_FL11_0()
633 {
634 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL11_0());
635 }
636
ES3_D3D11_FL10_1()637 PlatformParameters ES3_D3D11_FL10_1()
638 {
639 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL10_1());
640 }
641
ES31_D3D11()642 PlatformParameters ES31_D3D11()
643 {
644 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::D3D11());
645 }
646
ES31_D3D11_FL11_1()647 PlatformParameters ES31_D3D11_FL11_1()
648 {
649 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::D3D11_FL11_1());
650 }
651
ES31_D3D11_FL11_0()652 PlatformParameters ES31_D3D11_FL11_0()
653 {
654 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::D3D11_FL11_0());
655 }
656
ES3_D3D11_WARP()657 PlatformParameters ES3_D3D11_WARP()
658 {
659 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_WARP());
660 }
661
ES3_D3D11_FL11_1_WARP()662 PlatformParameters ES3_D3D11_FL11_1_WARP()
663 {
664 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL11_1_WARP());
665 }
666
ES3_D3D11_FL11_0_WARP()667 PlatformParameters ES3_D3D11_FL11_0_WARP()
668 {
669 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL11_0_WARP());
670 }
671
ES3_D3D11_FL10_1_WARP()672 PlatformParameters ES3_D3D11_FL10_1_WARP()
673 {
674 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::D3D11_FL10_1_WARP());
675 }
676
ES1_OPENGLES()677 PlatformParameters ES1_OPENGLES()
678 {
679 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::OPENGLES());
680 }
681
ES2_OPENGLES()682 PlatformParameters ES2_OPENGLES()
683 {
684 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::OPENGLES());
685 }
686
ES2_OPENGLES(EGLint major,EGLint minor)687 PlatformParameters ES2_OPENGLES(EGLint major, EGLint minor)
688 {
689 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::OPENGLES(major, minor));
690 }
691
ES3_OPENGLES()692 PlatformParameters ES3_OPENGLES()
693 {
694 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::OPENGLES());
695 }
696
ES3_OPENGLES(EGLint major,EGLint minor)697 PlatformParameters ES3_OPENGLES(EGLint major, EGLint minor)
698 {
699 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::OPENGLES(major, minor));
700 }
701
ES31_OPENGLES()702 PlatformParameters ES31_OPENGLES()
703 {
704 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::OPENGLES());
705 }
706
ES31_OPENGLES(EGLint major,EGLint minor)707 PlatformParameters ES31_OPENGLES(EGLint major, EGLint minor)
708 {
709 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::OPENGLES(major, minor));
710 }
711
ES1_OPENGL()712 PlatformParameters ES1_OPENGL()
713 {
714 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::OPENGL());
715 }
716
ES2_OPENGL()717 PlatformParameters ES2_OPENGL()
718 {
719 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::OPENGL());
720 }
721
ES2_OPENGL(EGLint major,EGLint minor)722 PlatformParameters ES2_OPENGL(EGLint major, EGLint minor)
723 {
724 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::OPENGL(major, minor));
725 }
726
ES3_OPENGL()727 PlatformParameters ES3_OPENGL()
728 {
729 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::OPENGL());
730 }
731
ES3_OPENGL(EGLint major,EGLint minor)732 PlatformParameters ES3_OPENGL(EGLint major, EGLint minor)
733 {
734 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::OPENGL(major, minor));
735 }
736
ES31_OPENGL()737 PlatformParameters ES31_OPENGL()
738 {
739 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::OPENGL());
740 }
741
ES31_OPENGL(EGLint major,EGLint minor)742 PlatformParameters ES31_OPENGL(EGLint major, EGLint minor)
743 {
744 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::OPENGL(major, minor));
745 }
746
ES1_NULL()747 PlatformParameters ES1_NULL()
748 {
749 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0,
750 EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
751 }
752
ES2_NULL()753 PlatformParameters ES2_NULL()
754 {
755 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0,
756 EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
757 }
758
ES3_NULL()759 PlatformParameters ES3_NULL()
760 {
761 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0,
762 EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
763 }
764
ES31_NULL()765 PlatformParameters ES31_NULL()
766 {
767 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0,
768 EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
769 }
770
ES1_VULKAN()771 PlatformParameters ES1_VULKAN()
772 {
773 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::VULKAN());
774 }
775
ES1_VULKAN_NULL()776 PlatformParameters ES1_VULKAN_NULL()
777 {
778 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::VULKAN_NULL());
779 }
780
ES1_VULKAN_SWIFTSHADER()781 PlatformParameters ES1_VULKAN_SWIFTSHADER()
782 {
783 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::VULKAN_SWIFTSHADER());
784 }
785
ES2_VULKAN()786 PlatformParameters ES2_VULKAN()
787 {
788 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::VULKAN());
789 }
790
ES2_VULKAN_NULL()791 PlatformParameters ES2_VULKAN_NULL()
792 {
793 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::VULKAN_NULL());
794 }
795
ES2_VULKAN_SWIFTSHADER()796 PlatformParameters ES2_VULKAN_SWIFTSHADER()
797 {
798 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::VULKAN_SWIFTSHADER());
799 }
800
ES3_VULKAN()801 PlatformParameters ES3_VULKAN()
802 {
803 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::VULKAN());
804 }
805
ES3_VULKAN_NULL()806 PlatformParameters ES3_VULKAN_NULL()
807 {
808 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::VULKAN_NULL());
809 }
810
ES3_VULKAN_SWIFTSHADER()811 PlatformParameters ES3_VULKAN_SWIFTSHADER()
812 {
813 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::VULKAN_SWIFTSHADER());
814 }
815
ES31_VULKAN()816 PlatformParameters ES31_VULKAN()
817 {
818 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::VULKAN());
819 }
820
ES31_VULKAN_NULL()821 PlatformParameters ES31_VULKAN_NULL()
822 {
823 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::VULKAN_NULL());
824 }
825
ES31_VULKAN_SWIFTSHADER()826 PlatformParameters ES31_VULKAN_SWIFTSHADER()
827 {
828 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, egl_platform::VULKAN_SWIFTSHADER());
829 }
830
ES32_VULKAN()831 PlatformParameters ES32_VULKAN()
832 {
833 return PlatformParameters(EGL_OPENGL_ES_API, 3, 2, 0, egl_platform::VULKAN());
834 }
835
ES32_VULKAN_NULL()836 PlatformParameters ES32_VULKAN_NULL()
837 {
838 return PlatformParameters(EGL_OPENGL_ES_API, 3, 2, 0, egl_platform::VULKAN_NULL());
839 }
840
ES32_VULKAN_SWIFTSHADER()841 PlatformParameters ES32_VULKAN_SWIFTSHADER()
842 {
843 return PlatformParameters(EGL_OPENGL_ES_API, 3, 2, 0, egl_platform::VULKAN_SWIFTSHADER());
844 }
845
GL32_CORE_VULKAN()846 PlatformParameters GL32_CORE_VULKAN()
847 {
848 return PlatformParameters(EGL_OPENGL_API, 3, 2, EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
849 egl_platform::VULKAN());
850 }
851
GL32_CORE_VULKAN_SWIFTSHADER()852 PlatformParameters GL32_CORE_VULKAN_SWIFTSHADER()
853 {
854 return PlatformParameters(EGL_OPENGL_API, 3, 2, EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
855 egl_platform::VULKAN_SWIFTSHADER());
856 }
857
ES1_METAL()858 PlatformParameters ES1_METAL()
859 {
860 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, egl_platform::METAL());
861 }
862
ES2_METAL()863 PlatformParameters ES2_METAL()
864 {
865 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, egl_platform::METAL());
866 }
867
ES3_METAL()868 PlatformParameters ES3_METAL()
869 {
870 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, egl_platform::METAL());
871 }
872
ES2_WGL()873 PlatformParameters ES2_WGL()
874 {
875 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, GLESDriverType::SystemWGL);
876 }
877
ES3_WGL()878 PlatformParameters ES3_WGL()
879 {
880 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, GLESDriverType::SystemWGL);
881 }
882
ES1_EGL()883 PlatformParameters ES1_EGL()
884 {
885 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, GLESDriverType::SystemEGL);
886 }
887
ES2_EGL()888 PlatformParameters ES2_EGL()
889 {
890 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, GLESDriverType::SystemEGL);
891 }
892
ES3_EGL()893 PlatformParameters ES3_EGL()
894 {
895 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, GLESDriverType::SystemEGL);
896 }
897
ES31_EGL()898 PlatformParameters ES31_EGL()
899 {
900 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, GLESDriverType::SystemEGL);
901 }
902
ES32_EGL()903 PlatformParameters ES32_EGL()
904 {
905 return PlatformParameters(EGL_OPENGL_ES_API, 3, 2, 0, GLESDriverType::SystemEGL);
906 }
907
ES1_ANGLE_Vulkan_Secondaries()908 PlatformParameters ES1_ANGLE_Vulkan_Secondaries()
909 {
910 return WithVulkanSecondaries(ES1_VULKAN());
911 }
912
ES2_ANGLE_Vulkan_Secondaries()913 PlatformParameters ES2_ANGLE_Vulkan_Secondaries()
914 {
915 return WithVulkanSecondaries(ES2_VULKAN());
916 }
917
ES3_ANGLE_Vulkan_Secondaries()918 PlatformParameters ES3_ANGLE_Vulkan_Secondaries()
919 {
920 return WithVulkanSecondaries(ES3_VULKAN());
921 }
922
ES31_ANGLE_Vulkan_Secondaries()923 PlatformParameters ES31_ANGLE_Vulkan_Secondaries()
924 {
925 return WithVulkanSecondaries(ES31_VULKAN());
926 }
927
ES32_ANGLE_Vulkan_Secondaries()928 PlatformParameters ES32_ANGLE_Vulkan_Secondaries()
929 {
930 return WithVulkanSecondaries(ES32_VULKAN());
931 }
932
ES1_Zink()933 PlatformParameters ES1_Zink()
934 {
935 return PlatformParameters(EGL_OPENGL_ES_API, 1, 0, 0, GLESDriverType::ZinkEGL);
936 }
937
ES2_Zink()938 PlatformParameters ES2_Zink()
939 {
940 return PlatformParameters(EGL_OPENGL_ES_API, 2, 0, 0, GLESDriverType::ZinkEGL);
941 }
942
ES3_Zink()943 PlatformParameters ES3_Zink()
944 {
945 return PlatformParameters(EGL_OPENGL_ES_API, 3, 0, 0, GLESDriverType::ZinkEGL);
946 }
947
ES31_Zink()948 PlatformParameters ES31_Zink()
949 {
950 return PlatformParameters(EGL_OPENGL_ES_API, 3, 1, 0, GLESDriverType::ZinkEGL);
951 }
952
ES32_Zink()953 PlatformParameters ES32_Zink()
954 {
955 return PlatformParameters(EGL_OPENGL_ES_API, 3, 2, 0, GLESDriverType::ZinkEGL);
956 }
957
958 } // namespace angle
959