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