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
isVulkan() const52 bool PlatformParameters::isVulkan() const
53 {
54 return eglParameters.renderer == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE;
55 }
56
isANGLE() const57 bool PlatformParameters::isANGLE() const
58 {
59 return driver == GLESDriverType::AngleEGL;
60 }
61
getAllocateNonZeroMemoryFeature() const62 EGLint PlatformParameters::getAllocateNonZeroMemoryFeature() const
63 {
64 return eglParameters.allocateNonZeroMemoryFeature;
65 }
66
initDefaultParameters()67 void PlatformParameters::initDefaultParameters()
68 {
69 // Default debug layers to enabled in tests.
70 eglParameters.debugLayersEnabled = EGL_TRUE;
71 }
72
operator <(const PlatformParameters & a,const PlatformParameters & b)73 bool operator<(const PlatformParameters &a, const PlatformParameters &b)
74 {
75 return a.tie() < b.tie();
76 }
77
operator ==(const PlatformParameters & a,const PlatformParameters & b)78 bool operator==(const PlatformParameters &a, const PlatformParameters &b)
79 {
80 return a.tie() == b.tie();
81 }
82
operator !=(const PlatformParameters & a,const PlatformParameters & b)83 bool operator!=(const PlatformParameters &a, const PlatformParameters &b)
84 {
85 return a.tie() != b.tie();
86 }
87
GetRendererName(EGLint renderer)88 const char *GetRendererName(EGLint renderer)
89 {
90 switch (renderer)
91 {
92 case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
93 return "Default";
94 case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
95 return "D3D9";
96 case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
97 return "D3D11";
98 case EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE:
99 return "Metal";
100 case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE:
101 return "Null";
102 case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
103 return "OpenGL";
104 case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
105 return "OpenGLES";
106 case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
107 return "Vulkan";
108 default:
109 return "Undefined";
110 }
111 }
112
operator <<(std::ostream & stream,const PlatformParameters & pp)113 std::ostream &operator<<(std::ostream &stream, const PlatformParameters &pp)
114 {
115 stream << "ES" << pp.majorVersion << "_";
116 if (pp.minorVersion != 0)
117 {
118 stream << pp.minorVersion << "_";
119 }
120
121 switch (pp.driver)
122 {
123 case GLESDriverType::AngleEGL:
124 stream << GetRendererName(pp.eglParameters.renderer);
125 break;
126 case GLESDriverType::SystemWGL:
127 stream << "WGL";
128 break;
129 case GLESDriverType::SystemEGL:
130 stream << "EGL";
131 break;
132 default:
133 stream << "Error";
134 break;
135 }
136
137 if (pp.eglParameters.majorVersion != EGL_DONT_CARE)
138 {
139 stream << "_" << pp.eglParameters.majorVersion;
140 }
141
142 if (pp.eglParameters.minorVersion != EGL_DONT_CARE)
143 {
144 stream << "_" << pp.eglParameters.minorVersion;
145 }
146
147 switch (pp.eglParameters.deviceType)
148 {
149 case EGL_DONT_CARE:
150 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE:
151 // default
152 break;
153
154 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
155 stream << "_Null";
156 break;
157
158 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE:
159 stream << "_Reference";
160 break;
161
162 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE:
163 stream << "_Warp";
164 break;
165
166 case EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE:
167 stream << "_SwiftShader";
168 break;
169
170 default:
171 stream << "_Error";
172 break;
173 }
174
175 switch (pp.eglParameters.presentPath)
176 {
177 case EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE:
178 stream << "_PresentPathCopy";
179 break;
180
181 case EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE:
182 stream << "_PresentPathFast";
183 break;
184
185 case EGL_DONT_CARE:
186 // default
187 break;
188
189 default:
190 stream << "_Error";
191 break;
192 }
193
194 if (pp.noFixture)
195 {
196 stream << "_NoFixture";
197 }
198
199 if (pp.eglParameters.transformFeedbackFeature == EGL_FALSE)
200 {
201 stream << "_NoTransformFeedback";
202 }
203 else if (pp.eglParameters.transformFeedbackFeature == EGL_TRUE)
204 {
205 stream << "_TransformFeedback";
206 }
207
208 if (pp.eglParameters.allocateNonZeroMemoryFeature == EGL_FALSE)
209 {
210 stream << "_NoAllocateNonZeroMemory";
211 }
212 else if (pp.eglParameters.allocateNonZeroMemoryFeature == EGL_TRUE)
213 {
214 stream << "_AllocateNonZeroMemory";
215 }
216
217 if (pp.eglParameters.emulateCopyTexImage2DFromRenderbuffers == EGL_TRUE)
218 {
219 stream << "_EmulateCopyTexImage2DFromRenderbuffers";
220 }
221
222 if (pp.eglParameters.shaderStencilOutputFeature == EGL_FALSE)
223 {
224 stream << "_NoStencilOutput";
225 }
226
227 if (pp.eglParameters.genMultipleMipsPerPassFeature == EGL_FALSE)
228 {
229 stream << "_NoGenMultipleMipsPerPass";
230 }
231
232 switch (pp.eglParameters.emulatedPrerotation)
233 {
234 case 90:
235 stream << "_PreRotate90";
236 break;
237 case 180:
238 stream << "_PreRotate180";
239 break;
240 case 270:
241 stream << "_PreRotate270";
242 break;
243 default:
244 break;
245 }
246
247 if (pp.eglParameters.asyncCommandQueueFeatureVulkan == EGL_TRUE)
248 {
249 stream << "_AsyncQueue";
250 }
251
252 if (pp.eglParameters.hasExplicitMemBarrierFeatureMtl == EGL_FALSE)
253 {
254 stream << "_NoMetalExplicitMemoryBarrier";
255 }
256
257 if (pp.eglParameters.hasCheapRenderPassFeatureMtl == EGL_FALSE)
258 {
259 stream << "_NoMetalCheapRenderPass";
260 }
261
262 if (pp.eglParameters.forceBufferGPUStorageFeatureMtl == EGL_TRUE)
263 {
264 stream << "_ForceMetalBufferGPUStorage";
265 }
266
267 if (pp.eglParameters.supportsVulkanViewportFlip == EGL_TRUE)
268 {
269 stream << "_VulkanViewportFlip";
270 }
271 else if (pp.eglParameters.supportsVulkanViewportFlip == EGL_FALSE)
272 {
273 stream << "_NoVulkanViewportFlip";
274 }
275
276 if (pp.eglParameters.supportsVulkanMultiDrawIndirect == EGL_TRUE)
277 {
278 stream << "_VulkanMultiDrawIndirect";
279 }
280 else if (pp.eglParameters.supportsVulkanMultiDrawIndirect == EGL_FALSE)
281 {
282 stream << "_VulkanNoMultiDrawIndirect";
283 }
284
285 if (pp.eglParameters.emulatedVAOs == EGL_TRUE)
286 {
287 stream << "_EmulatedVAOs";
288 }
289
290 if (pp.eglParameters.generateSPIRVThroughGlslang == EGL_TRUE)
291 {
292 stream << "_Glslang";
293 }
294
295 if (pp.eglParameters.directMetalGeneration == EGL_TRUE)
296 {
297 stream << "_DirectMetalGen";
298 }
299
300 if (pp.eglParameters.forceInitShaderVariables == EGL_TRUE)
301 {
302 stream << "_InitShaderVars";
303 }
304
305 if (pp.eglParameters.forceVulkanFallbackFormat == EGL_TRUE)
306 {
307 stream << "_FallbackFormat";
308 }
309
310 if (pp.eglParameters.displayPowerPreference == EGL_LOW_POWER_ANGLE)
311 {
312 stream << "_LowPowerGPU";
313 }
314
315 if (pp.eglParameters.displayPowerPreference == EGL_HIGH_POWER_ANGLE)
316 {
317 stream << "_HighPowerGPU";
318 }
319
320 return stream;
321 }
322
323 // EGL platforms
324 namespace egl_platform
325 {
326
DEFAULT()327 EGLPlatformParameters DEFAULT()
328 {
329 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE);
330 }
331
DEFAULT_NULL()332 EGLPlatformParameters DEFAULT_NULL()
333 {
334 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE, EGL_DONT_CARE,
335 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
336 }
337
D3D9()338 EGLPlatformParameters D3D9()
339 {
340 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
341 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
342 }
343
D3D9_NULL()344 EGLPlatformParameters D3D9_NULL()
345 {
346 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
347 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
348 }
349
D3D9_REFERENCE()350 EGLPlatformParameters D3D9_REFERENCE()
351 {
352 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
353 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
354 }
355
D3D11()356 EGLPlatformParameters D3D11()
357 {
358 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
359 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
360 }
361
D3D11_PRESENT_PATH_FAST()362 EGLPlatformParameters D3D11_PRESENT_PATH_FAST()
363 {
364 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
365 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE,
366 EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE);
367 }
368
D3D11_FL11_1()369 EGLPlatformParameters D3D11_FL11_1()
370 {
371 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
372 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
373 }
374
D3D11_FL11_0()375 EGLPlatformParameters D3D11_FL11_0()
376 {
377 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
378 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
379 }
380
D3D11_FL10_1()381 EGLPlatformParameters D3D11_FL10_1()
382 {
383 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
384 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
385 }
386
D3D11_FL10_0()387 EGLPlatformParameters D3D11_FL10_0()
388 {
389 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
390 EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
391 }
392
D3D11_NULL()393 EGLPlatformParameters D3D11_NULL()
394 {
395 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
396 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
397 }
398
D3D11_WARP()399 EGLPlatformParameters D3D11_WARP()
400 {
401 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
402 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
403 }
404
D3D11_FL11_1_WARP()405 EGLPlatformParameters D3D11_FL11_1_WARP()
406 {
407 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
408 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
409 }
410
D3D11_FL11_0_WARP()411 EGLPlatformParameters D3D11_FL11_0_WARP()
412 {
413 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
414 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
415 }
416
D3D11_FL10_1_WARP()417 EGLPlatformParameters D3D11_FL10_1_WARP()
418 {
419 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
420 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
421 }
422
D3D11_FL10_0_WARP()423 EGLPlatformParameters D3D11_FL10_0_WARP()
424 {
425 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
426 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE);
427 }
428
D3D11_REFERENCE()429 EGLPlatformParameters D3D11_REFERENCE()
430 {
431 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
432 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
433 }
434
D3D11_FL11_1_REFERENCE()435 EGLPlatformParameters D3D11_FL11_1_REFERENCE()
436 {
437 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1,
438 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
439 }
440
D3D11_FL11_0_REFERENCE()441 EGLPlatformParameters D3D11_FL11_0_REFERENCE()
442 {
443 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0,
444 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
445 }
446
D3D11_FL10_1_REFERENCE()447 EGLPlatformParameters D3D11_FL10_1_REFERENCE()
448 {
449 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1,
450 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
451 }
452
D3D11_FL10_0_REFERENCE()453 EGLPlatformParameters D3D11_FL10_0_REFERENCE()
454 {
455 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0,
456 EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE);
457 }
458
OPENGL()459 EGLPlatformParameters OPENGL()
460 {
461 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
462 }
463
OPENGL(EGLint major,EGLint minor)464 EGLPlatformParameters OPENGL(EGLint major, EGLint minor)
465 {
466 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, major, minor, EGL_DONT_CARE);
467 }
468
OPENGL_NULL()469 EGLPlatformParameters OPENGL_NULL()
470 {
471 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
472 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
473 }
474
OPENGLES()475 EGLPlatformParameters OPENGLES()
476 {
477 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
478 }
479
OPENGLES(EGLint major,EGLint minor)480 EGLPlatformParameters OPENGLES(EGLint major, EGLint minor)
481 {
482 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, major, minor,
483 EGL_DONT_CARE);
484 }
485
OPENGLES_NULL()486 EGLPlatformParameters OPENGLES_NULL()
487 {
488 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, EGL_DONT_CARE,
489 EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
490 }
491
OPENGL_OR_GLES()492 EGLPlatformParameters OPENGL_OR_GLES()
493 {
494 #if defined(ANGLE_PLATFORM_ANDROID)
495 return OPENGLES();
496 #else
497 return OPENGL();
498 #endif
499 }
500
OPENGL_OR_GLES(EGLint major,EGLint minor)501 EGLPlatformParameters OPENGL_OR_GLES(EGLint major, EGLint minor)
502 {
503 #if defined(ANGLE_PLATFORM_ANDROID)
504 return OPENGLES(major, minor);
505 #else
506 return OPENGL(major, minor);
507 #endif
508 }
509
OPENGL_OR_GLES_NULL()510 EGLPlatformParameters OPENGL_OR_GLES_NULL()
511 {
512 #if defined(ANGLE_PLATFORM_ANDROID)
513 return OPENGLES_NULL();
514 #else
515 return OPENGL_NULL();
516 #endif
517 }
518
VULKAN()519 EGLPlatformParameters VULKAN()
520 {
521 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
522 }
523
VULKAN_NULL()524 EGLPlatformParameters VULKAN_NULL()
525 {
526 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
527 EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE);
528 }
529
VULKAN_SWIFTSHADER()530 EGLPlatformParameters VULKAN_SWIFTSHADER()
531 {
532 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE,
533 EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE);
534 }
METAL()535 EGLPlatformParameters METAL()
536 {
537 return EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE);
538 }
539
540 } // namespace egl_platform
541
542 // ANGLE tests platforms
ES1_D3D9()543 PlatformParameters ES1_D3D9()
544 {
545 return PlatformParameters(1, 0, egl_platform::D3D9());
546 }
547
ES2_D3D9()548 PlatformParameters ES2_D3D9()
549 {
550 return PlatformParameters(2, 0, egl_platform::D3D9());
551 }
552
ES1_D3D11()553 PlatformParameters ES1_D3D11()
554 {
555 return PlatformParameters(1, 0, egl_platform::D3D11());
556 }
557
ES2_D3D11()558 PlatformParameters ES2_D3D11()
559 {
560 return PlatformParameters(2, 0, egl_platform::D3D11());
561 }
562
ES2_D3D11_PRESENT_PATH_FAST()563 PlatformParameters ES2_D3D11_PRESENT_PATH_FAST()
564 {
565 return PlatformParameters(2, 0, egl_platform::D3D11_PRESENT_PATH_FAST());
566 }
567
ES2_D3D11_FL11_0()568 PlatformParameters ES2_D3D11_FL11_0()
569 {
570 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0());
571 }
572
ES2_D3D11_FL10_1()573 PlatformParameters ES2_D3D11_FL10_1()
574 {
575 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1());
576 }
577
ES2_D3D11_FL10_0()578 PlatformParameters ES2_D3D11_FL10_0()
579 {
580 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0());
581 }
582
ES2_D3D11_WARP()583 PlatformParameters ES2_D3D11_WARP()
584 {
585 return PlatformParameters(2, 0, egl_platform::D3D11_WARP());
586 }
587
ES2_D3D11_FL11_0_WARP()588 PlatformParameters ES2_D3D11_FL11_0_WARP()
589 {
590 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0_WARP());
591 }
592
ES2_D3D11_FL10_1_WARP()593 PlatformParameters ES2_D3D11_FL10_1_WARP()
594 {
595 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1_WARP());
596 }
597
ES2_D3D11_FL10_0_WARP()598 PlatformParameters ES2_D3D11_FL10_0_WARP()
599 {
600 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0_WARP());
601 }
602
ES2_D3D11_REFERENCE()603 PlatformParameters ES2_D3D11_REFERENCE()
604 {
605 return PlatformParameters(2, 0, egl_platform::D3D11_REFERENCE());
606 }
607
ES2_D3D11_FL11_0_REFERENCE()608 PlatformParameters ES2_D3D11_FL11_0_REFERENCE()
609 {
610 return PlatformParameters(2, 0, egl_platform::D3D11_FL11_0_REFERENCE());
611 }
612
ES2_D3D11_FL10_1_REFERENCE()613 PlatformParameters ES2_D3D11_FL10_1_REFERENCE()
614 {
615 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_1_REFERENCE());
616 }
617
ES2_D3D11_FL10_0_REFERENCE()618 PlatformParameters ES2_D3D11_FL10_0_REFERENCE()
619 {
620 return PlatformParameters(2, 0, egl_platform::D3D11_FL10_0_REFERENCE());
621 }
622
ES3_D3D11()623 PlatformParameters ES3_D3D11()
624 {
625 return PlatformParameters(3, 0, egl_platform::D3D11());
626 }
627
ES3_D3D11_FL11_1()628 PlatformParameters ES3_D3D11_FL11_1()
629 {
630 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_1());
631 }
632
ES3_D3D11_FL11_0()633 PlatformParameters ES3_D3D11_FL11_0()
634 {
635 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_0());
636 }
637
ES3_D3D11_FL10_1()638 PlatformParameters ES3_D3D11_FL10_1()
639 {
640 return PlatformParameters(3, 0, egl_platform::D3D11_FL10_1());
641 }
642
ES31_D3D11()643 PlatformParameters ES31_D3D11()
644 {
645 return PlatformParameters(3, 1, egl_platform::D3D11());
646 }
647
ES31_D3D11_FL11_1()648 PlatformParameters ES31_D3D11_FL11_1()
649 {
650 return PlatformParameters(3, 1, egl_platform::D3D11_FL11_1());
651 }
652
ES31_D3D11_FL11_0()653 PlatformParameters ES31_D3D11_FL11_0()
654 {
655 return PlatformParameters(3, 1, egl_platform::D3D11_FL11_0());
656 }
657
ES3_D3D11_WARP()658 PlatformParameters ES3_D3D11_WARP()
659 {
660 return PlatformParameters(3, 0, egl_platform::D3D11_WARP());
661 }
662
ES3_D3D11_FL11_1_WARP()663 PlatformParameters ES3_D3D11_FL11_1_WARP()
664 {
665 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_1_WARP());
666 }
667
ES3_D3D11_FL11_0_WARP()668 PlatformParameters ES3_D3D11_FL11_0_WARP()
669 {
670 return PlatformParameters(3, 0, egl_platform::D3D11_FL11_0_WARP());
671 }
672
ES3_D3D11_FL10_1_WARP()673 PlatformParameters ES3_D3D11_FL10_1_WARP()
674 {
675 return PlatformParameters(3, 0, egl_platform::D3D11_FL10_1_WARP());
676 }
677
ES1_OPENGLES()678 PlatformParameters ES1_OPENGLES()
679 {
680 return PlatformParameters(1, 0, egl_platform::OPENGLES());
681 }
682
ES2_OPENGLES()683 PlatformParameters ES2_OPENGLES()
684 {
685 return PlatformParameters(2, 0, egl_platform::OPENGLES());
686 }
687
ES2_OPENGLES(EGLint major,EGLint minor)688 PlatformParameters ES2_OPENGLES(EGLint major, EGLint minor)
689 {
690 return PlatformParameters(2, 0, egl_platform::OPENGLES(major, minor));
691 }
692
ES3_OPENGLES()693 PlatformParameters ES3_OPENGLES()
694 {
695 return PlatformParameters(3, 0, egl_platform::OPENGLES());
696 }
697
ES3_OPENGLES(EGLint major,EGLint minor)698 PlatformParameters ES3_OPENGLES(EGLint major, EGLint minor)
699 {
700 return PlatformParameters(3, 0, egl_platform::OPENGLES(major, minor));
701 }
702
ES31_OPENGLES()703 PlatformParameters ES31_OPENGLES()
704 {
705 return PlatformParameters(3, 1, egl_platform::OPENGLES());
706 }
707
ES31_OPENGLES(EGLint major,EGLint minor)708 PlatformParameters ES31_OPENGLES(EGLint major, EGLint minor)
709 {
710 return PlatformParameters(3, 1, egl_platform::OPENGLES(major, minor));
711 }
712
ES1_OPENGL()713 PlatformParameters ES1_OPENGL()
714 {
715 return PlatformParameters(1, 0, egl_platform::OPENGL());
716 }
717
ES2_OPENGL()718 PlatformParameters ES2_OPENGL()
719 {
720 return PlatformParameters(2, 0, egl_platform::OPENGL());
721 }
722
ES2_OPENGL(EGLint major,EGLint minor)723 PlatformParameters ES2_OPENGL(EGLint major, EGLint minor)
724 {
725 return PlatformParameters(2, 0, egl_platform::OPENGL(major, minor));
726 }
727
ES3_OPENGL()728 PlatformParameters ES3_OPENGL()
729 {
730 return PlatformParameters(3, 0, egl_platform::OPENGL());
731 }
732
ES3_OPENGL(EGLint major,EGLint minor)733 PlatformParameters ES3_OPENGL(EGLint major, EGLint minor)
734 {
735 return PlatformParameters(3, 0, egl_platform::OPENGL(major, minor));
736 }
737
ES31_OPENGL()738 PlatformParameters ES31_OPENGL()
739 {
740 return PlatformParameters(3, 1, egl_platform::OPENGL());
741 }
742
ES31_OPENGL(EGLint major,EGLint minor)743 PlatformParameters ES31_OPENGL(EGLint major, EGLint minor)
744 {
745 return PlatformParameters(3, 1, egl_platform::OPENGL(major, minor));
746 }
747
ES1_NULL()748 PlatformParameters ES1_NULL()
749 {
750 return PlatformParameters(1, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
751 }
752
ES2_NULL()753 PlatformParameters ES2_NULL()
754 {
755 return PlatformParameters(2, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
756 }
757
ES3_NULL()758 PlatformParameters ES3_NULL()
759 {
760 return PlatformParameters(3, 0, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
761 }
762
ES31_NULL()763 PlatformParameters ES31_NULL()
764 {
765 return PlatformParameters(3, 1, EGLPlatformParameters(EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE));
766 }
767
ES1_VULKAN()768 PlatformParameters ES1_VULKAN()
769 {
770 return PlatformParameters(1, 0, egl_platform::VULKAN());
771 }
772
ES1_VULKAN_NULL()773 PlatformParameters ES1_VULKAN_NULL()
774 {
775 return PlatformParameters(1, 0, egl_platform::VULKAN_NULL());
776 }
777
ES1_VULKAN_SWIFTSHADER()778 PlatformParameters ES1_VULKAN_SWIFTSHADER()
779 {
780 return PlatformParameters(1, 0, egl_platform::VULKAN_SWIFTSHADER());
781 }
782
ES2_VULKAN()783 PlatformParameters ES2_VULKAN()
784 {
785 return PlatformParameters(2, 0, egl_platform::VULKAN());
786 }
787
ES2_VULKAN_NULL()788 PlatformParameters ES2_VULKAN_NULL()
789 {
790 return PlatformParameters(2, 0, egl_platform::VULKAN_NULL());
791 }
792
ES2_VULKAN_SWIFTSHADER()793 PlatformParameters ES2_VULKAN_SWIFTSHADER()
794 {
795 return PlatformParameters(2, 0, egl_platform::VULKAN_SWIFTSHADER());
796 }
797
ES3_VULKAN()798 PlatformParameters ES3_VULKAN()
799 {
800 return PlatformParameters(3, 0, egl_platform::VULKAN());
801 }
802
ES3_VULKAN_NULL()803 PlatformParameters ES3_VULKAN_NULL()
804 {
805 return PlatformParameters(3, 0, egl_platform::VULKAN_NULL());
806 }
807
ES3_VULKAN_SWIFTSHADER()808 PlatformParameters ES3_VULKAN_SWIFTSHADER()
809 {
810 return PlatformParameters(3, 0, egl_platform::VULKAN_SWIFTSHADER());
811 }
812
ES31_VULKAN()813 PlatformParameters ES31_VULKAN()
814 {
815 return PlatformParameters(3, 1, egl_platform::VULKAN());
816 }
817
ES31_VULKAN_NULL()818 PlatformParameters ES31_VULKAN_NULL()
819 {
820 return PlatformParameters(3, 1, egl_platform::VULKAN_NULL());
821 }
822
ES31_VULKAN_SWIFTSHADER()823 PlatformParameters ES31_VULKAN_SWIFTSHADER()
824 {
825 return PlatformParameters(3, 1, egl_platform::VULKAN_SWIFTSHADER());
826 }
827
ES32_VULKAN()828 PlatformParameters ES32_VULKAN()
829 {
830 return PlatformParameters(3, 2, egl_platform::VULKAN());
831 }
832
ES32_VULKAN_NULL()833 PlatformParameters ES32_VULKAN_NULL()
834 {
835 return PlatformParameters(3, 2, egl_platform::VULKAN_NULL());
836 }
837
ES32_VULKAN_SWIFTSHADER()838 PlatformParameters ES32_VULKAN_SWIFTSHADER()
839 {
840 return PlatformParameters(3, 2, egl_platform::VULKAN_SWIFTSHADER());
841 }
842
ES1_METAL()843 PlatformParameters ES1_METAL()
844 {
845 return PlatformParameters(1, 0, egl_platform::METAL());
846 }
847
ES2_METAL()848 PlatformParameters ES2_METAL()
849 {
850 return PlatformParameters(2, 0, egl_platform::METAL());
851 }
852
ES3_METAL()853 PlatformParameters ES3_METAL()
854 {
855 return PlatformParameters(3, 0, egl_platform::METAL());
856 }
857
ES2_WGL()858 PlatformParameters ES2_WGL()
859 {
860 return PlatformParameters(2, 0, GLESDriverType::SystemWGL);
861 }
862
ES3_WGL()863 PlatformParameters ES3_WGL()
864 {
865 return PlatformParameters(3, 0, GLESDriverType::SystemWGL);
866 }
867
ES2_EGL()868 PlatformParameters ES2_EGL()
869 {
870 return PlatformParameters(2, 0, GLESDriverType::SystemEGL);
871 }
872
ES3_EGL()873 PlatformParameters ES3_EGL()
874 {
875 return PlatformParameters(3, 0, GLESDriverType::SystemEGL);
876 }
877 } // namespace angle
878