Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/src/tests/test_utils/angle_test_instantiate.cpp
1693 views
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
// angle_test_instantiate.cpp: Adds support for filtering parameterized
8
// tests by platform, so we skip unsupported configs.
9
10
#include "test_utils/angle_test_instantiate.h"
11
12
#include <algorithm>
13
#include <array>
14
#include <iostream>
15
#include <map>
16
17
#include "angle_gl.h"
18
#include "common/debug.h"
19
#include "common/platform.h"
20
#include "common/system_utils.h"
21
#include "common/third_party/base/anglebase/no_destructor.h"
22
#include "gpu_info_util/SystemInfo.h"
23
#include "test_utils/angle_test_configs.h"
24
#include "util/EGLWindow.h"
25
#include "util/OSWindow.h"
26
#include "util/test_utils.h"
27
28
#if defined(ANGLE_PLATFORM_WINDOWS)
29
# include <VersionHelpers.h>
30
# include "util/windows/WGLWindow.h"
31
#endif // defined(ANGLE_PLATFORM_WINDOWS)
32
33
#if defined(ANGLE_PLATFORM_APPLE)
34
# include "test_utils/angle_test_instantiate_apple.h"
35
#endif
36
37
namespace angle
38
{
39
namespace
40
{
41
bool IsAngleEGLConfigSupported(const PlatformParameters &param, OSWindow *osWindow)
42
{
43
std::unique_ptr<angle::Library> eglLibrary;
44
45
#if defined(ANGLE_USE_UTIL_LOADER)
46
eglLibrary.reset(
47
angle::OpenSharedLibrary(ANGLE_EGL_LIBRARY_NAME, angle::SearchType::ModuleDir));
48
#endif
49
50
EGLWindow *eglWindow = EGLWindow::New(param.majorVersion, param.minorVersion);
51
ConfigParameters configParams;
52
bool result =
53
eglWindow->initializeGL(osWindow, eglLibrary.get(), angle::GLESDriverType::AngleEGL,
54
param.eglParameters, configParams);
55
eglWindow->destroyGL();
56
EGLWindow::Delete(&eglWindow);
57
return result;
58
}
59
60
bool IsSystemWGLConfigSupported(const PlatformParameters &param, OSWindow *osWindow)
61
{
62
#if defined(ANGLE_PLATFORM_WINDOWS) && defined(ANGLE_USE_UTIL_LOADER)
63
std::unique_ptr<angle::Library> openglLibrary(
64
angle::OpenSharedLibrary("opengl32", angle::SearchType::SystemDir));
65
66
WGLWindow *wglWindow = WGLWindow::New(param.majorVersion, param.minorVersion);
67
ConfigParameters configParams;
68
bool result =
69
wglWindow->initializeGL(osWindow, openglLibrary.get(), angle::GLESDriverType::SystemWGL,
70
param.eglParameters, configParams);
71
wglWindow->destroyGL();
72
WGLWindow::Delete(&wglWindow);
73
return result;
74
#else
75
return false;
76
#endif // defined(ANGLE_PLATFORM_WINDOWS) && defined(ANGLE_USE_UTIL_LOADER)
77
}
78
79
bool IsSystemEGLConfigSupported(const PlatformParameters &param, OSWindow *osWindow)
80
{
81
#if defined(ANGLE_USE_UTIL_LOADER)
82
std::unique_ptr<angle::Library> eglLibrary;
83
84
eglLibrary.reset(OpenSharedLibraryWithExtension(GetNativeEGLLibraryNameWithExtension(),
85
SearchType::SystemDir));
86
87
EGLWindow *eglWindow = EGLWindow::New(param.majorVersion, param.minorVersion);
88
ConfigParameters configParams;
89
bool result =
90
eglWindow->initializeGL(osWindow, eglLibrary.get(), angle::GLESDriverType::SystemEGL,
91
param.eglParameters, configParams);
92
eglWindow->destroyGL();
93
EGLWindow::Delete(&eglWindow);
94
return result;
95
#else
96
return false;
97
#endif
98
}
99
100
bool IsAndroidDevice(const std::string &deviceName)
101
{
102
if (!IsAndroid())
103
{
104
return false;
105
}
106
SystemInfo *systemInfo = GetTestSystemInfo();
107
if (systemInfo->machineModelName == deviceName)
108
{
109
return true;
110
}
111
return false;
112
}
113
114
bool IsAndroid9OrNewer()
115
{
116
if (!IsAndroid())
117
{
118
return false;
119
}
120
SystemInfo *systemInfo = GetTestSystemInfo();
121
if (systemInfo->androidSdkLevel >= 28)
122
{
123
return true;
124
}
125
return false;
126
}
127
128
GPUDeviceInfo *GetActiveGPUDeviceInfo()
129
{
130
SystemInfo *systemInfo = GetTestSystemInfo();
131
// Unfortunately sometimes GPU info collection can fail.
132
if (systemInfo->gpus.empty())
133
{
134
return nullptr;
135
}
136
return &systemInfo->gpus[systemInfo->activeGPUIndex];
137
}
138
139
bool HasSystemVendorID(VendorID vendorID)
140
{
141
GPUDeviceInfo *gpuInfo = GetActiveGPUDeviceInfo();
142
143
return gpuInfo && gpuInfo->vendorId == vendorID;
144
}
145
146
bool HasSystemDeviceID(VendorID vendorID, DeviceID deviceID)
147
{
148
GPUDeviceInfo *gpuInfo = GetActiveGPUDeviceInfo();
149
150
return gpuInfo && gpuInfo->vendorId == vendorID && gpuInfo->deviceId == deviceID;
151
}
152
153
using ParamAvailabilityCache = std::map<PlatformParameters, bool>;
154
155
ParamAvailabilityCache &GetAvailabilityCache()
156
{
157
static angle::base::NoDestructor<std::unique_ptr<ParamAvailabilityCache>>
158
sParamAvailabilityCache(new ParamAvailabilityCache());
159
return **sParamAvailabilityCache;
160
}
161
162
constexpr size_t kMaxConfigNameLen = 100;
163
std::array<char, kMaxConfigNameLen> gSelectedConfig;
164
} // namespace
165
166
bool gEnableANGLEPerTestCaptureLabel = false;
167
168
bool IsConfigSelected()
169
{
170
return gSelectedConfig[0] != 0;
171
}
172
173
#if !defined(ANGLE_PLATFORM_APPLE)
174
// For Apple platform, see angle_test_instantiate_apple.mm
175
bool IsMetalTextureSwizzleAvailable()
176
{
177
return false;
178
}
179
180
bool IsMetalCompressedTexture3DAvailable()
181
{
182
return false;
183
}
184
#endif
185
186
SystemInfo *GetTestSystemInfo()
187
{
188
static SystemInfo *sSystemInfo = nullptr;
189
if (sSystemInfo == nullptr)
190
{
191
sSystemInfo = new SystemInfo;
192
if (!GetSystemInfo(sSystemInfo))
193
{
194
std::cerr << "Warning: incomplete system info collection.\n";
195
}
196
197
// On dual-GPU Macs we want the active GPU to always appear to be the
198
// high-performance GPU for tests.
199
// We can call the generic GPU info collector which selects the
200
// non-Intel GPU as the active one on dual-GPU machines.
201
if (IsOSX())
202
{
203
GetDualGPUInfo(sSystemInfo);
204
}
205
206
// Print complete system info when available.
207
// Seems to trip up Android test expectation parsing.
208
// Also don't print info when a config is selected to prevent test spam.
209
if (!IsAndroid() && !IsConfigSelected())
210
{
211
PrintSystemInfo(*sSystemInfo);
212
}
213
}
214
return sSystemInfo;
215
}
216
217
bool IsAndroid()
218
{
219
#if defined(ANGLE_PLATFORM_ANDROID)
220
return true;
221
#else
222
return false;
223
#endif
224
}
225
226
bool IsLinux()
227
{
228
#if defined(ANGLE_PLATFORM_LINUX)
229
return true;
230
#else
231
return false;
232
#endif
233
}
234
235
bool IsOSX()
236
{
237
#if defined(ANGLE_PLATFORM_MACOS)
238
return true;
239
#else
240
return false;
241
#endif
242
}
243
244
bool IsIOS()
245
{
246
#if defined(ANGLE_PLATFORM_IOS)
247
return true;
248
#else
249
return false;
250
#endif
251
}
252
253
bool IsARM64()
254
{
255
// _M_ARM64 is Windows-specific, while __aarch64__ is for other platforms.
256
#if defined(_M_ARM64) || defined(__aarch64__)
257
return true;
258
#else
259
return false;
260
#endif
261
}
262
263
bool IsOzone()
264
{
265
#if defined(USE_OZONE) && (defined(USE_X11) || defined(ANGLE_USE_VULKAN_DISPLAY))
266
// We do not have a proper support for Ozone/Linux yet. Still, we need to figure out how to
267
// properly initialize tests and differentiate between X11 and Wayland. Probably, passing a
268
// command line argument could be sufficient. At the moment, run tests only for X11 backend
269
// as we don't have Wayland support in Angle. Yes, this is a bit weird to return false, but
270
// it makes it possible to continue angle tests with X11 regardless of the Chromium config
271
// for linux, which is use_x11 && use_ozone. Also, IsOzone is a bit vague now. It was only
272
// expected that angle could run with ozone/drm backend for ChromeOS. And returning true
273
// for desktop Linux when USE_OZONE && USE_X11 are both defined results in incorrect tests'
274
// expectations. We should also rework them and make IsOzone less vague.
275
//
276
// TODO(crbug.com/angleproject/4977): make it possible to switch between X11 and Wayland on
277
// Ozone/Linux builds. Probably, it's possible to identify the WAYLAND backend by checking
278
// the WAYLAND_DISPLAY or XDG_SESSION_TYPE env vars. And also make the IsOzone method less
279
// vague (read the comment above).
280
return false;
281
#elif defined(USE_OZONE)
282
return true;
283
#else
284
return false;
285
#endif
286
}
287
288
bool IsWindows()
289
{
290
#if defined(ANGLE_PLATFORM_WINDOWS)
291
return true;
292
#else
293
return false;
294
#endif
295
}
296
297
bool IsWindows7()
298
{
299
#if defined(ANGLE_PLATFORM_WINDOWS)
300
return ::IsWindows7OrGreater() && !::IsWindows8OrGreater();
301
#else
302
return false;
303
#endif
304
}
305
306
bool IsFuchsia()
307
{
308
#if defined(ANGLE_PLATFORM_FUCHSIA)
309
return true;
310
#else
311
return false;
312
#endif
313
}
314
315
bool IsNexus5X()
316
{
317
return IsAndroidDevice("Nexus 5X");
318
}
319
320
bool IsNexus9()
321
{
322
return IsAndroidDevice("Nexus 9");
323
}
324
325
bool IsPixelXL()
326
{
327
return IsAndroidDevice("Pixel XL");
328
}
329
330
bool IsPixel2()
331
{
332
return IsAndroidDevice("Pixel 2");
333
}
334
335
bool IsPixel2XL()
336
{
337
return IsAndroidDevice("Pixel 2 XL");
338
}
339
340
bool IsPixel4()
341
{
342
return IsAndroidDevice("Pixel 4");
343
}
344
345
bool IsNVIDIAShield()
346
{
347
return IsAndroidDevice("SHIELD Android TV");
348
}
349
350
bool IsIntel()
351
{
352
return HasSystemVendorID(kVendorID_Intel);
353
}
354
355
bool IsIntelUHD630Mobile()
356
{
357
return HasSystemDeviceID(kVendorID_Intel, kDeviceID_UHD630Mobile);
358
}
359
360
bool IsAMD()
361
{
362
return HasSystemVendorID(kVendorID_AMD);
363
}
364
365
bool IsARM()
366
{
367
return HasSystemVendorID(kVendorID_ARM);
368
}
369
370
bool IsSwiftshaderDevice()
371
{
372
return HasSystemDeviceID(kVendorID_GOOGLE, kDeviceID_Swiftshader);
373
}
374
375
bool IsNVIDIA()
376
{
377
#if defined(ANGLE_PLATFORM_ANDROID)
378
// NVIDIA Shield cannot detect vendor ID (http://anglebug.com/3541)
379
if (IsNVIDIAShield())
380
{
381
return true;
382
}
383
#endif
384
return HasSystemVendorID(kVendorID_NVIDIA);
385
}
386
387
bool IsQualcomm()
388
{
389
return IsNexus5X() || IsNexus9() || IsPixelXL() || IsPixel2() || IsPixel2XL();
390
}
391
392
bool IsConfigAllowlisted(const SystemInfo &systemInfo, const PlatformParameters &param)
393
{
394
VendorID vendorID =
395
systemInfo.gpus.empty() ? 0 : systemInfo.gpus[systemInfo.activeGPUIndex].vendorId;
396
397
// We support the default and null back-ends on every platform.
398
if (param.driver == GLESDriverType::AngleEGL)
399
{
400
if (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE)
401
return true;
402
if (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE)
403
return true;
404
}
405
406
// TODO: http://crbug.com/swiftshader/145
407
// Swiftshader does not currently have all the robustness features
408
// we need for ANGLE. In particular, it is unable to detect and recover
409
// from infinitely looping shaders. That bug is the tracker for fixing
410
// that and when resolved we can remove the following code.
411
// This test will disable tests marked with the config WithRobustness
412
// when run with the swiftshader Vulkan driver and on Android.
413
if ((param.isSwiftshader() || IsSwiftshaderDevice()) &&
414
param.eglParameters.robustness == EGL_TRUE)
415
{
416
return false;
417
}
418
419
if (IsWindows())
420
{
421
switch (param.driver)
422
{
423
case GLESDriverType::AngleEGL:
424
switch (param.getRenderer())
425
{
426
case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
427
case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
428
return true;
429
case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
430
// Note we disable AMD OpenGL testing on Windows due to using a very old and
431
// outdated card with many driver bugs. See http://anglebug.com/5123
432
return !IsAMD();
433
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
434
if (IsARM64())
435
{
436
return param.getDeviceType() ==
437
EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
438
}
439
return true;
440
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
441
// ES 3.1+ back-end is not supported properly.
442
if (param.eglParameters.majorVersion == 3 &&
443
param.eglParameters.minorVersion > 0)
444
{
445
return false;
446
}
447
448
// Win ES emulation is currently only supported on NVIDIA.
449
return IsNVIDIA(vendorID);
450
default:
451
return false;
452
}
453
case GLESDriverType::SystemWGL:
454
// AMD does not support the ES compatibility extensions.
455
return !IsAMD(vendorID);
456
default:
457
return false;
458
}
459
}
460
461
#if defined(ANGLE_PLATFORM_APPLE)
462
if (IsOSX() || IsIOS())
463
{
464
// We do not support non-ANGLE bindings on OSX.
465
if (param.driver != GLESDriverType::AngleEGL)
466
{
467
return false;
468
}
469
470
switch (param.getRenderer())
471
{
472
case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
473
// ES 3.1+ back-end is not supported properly.
474
if (param.majorVersion == 3 && param.minorVersion > 0)
475
{
476
return false;
477
}
478
return true;
479
case EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE:
480
if (!IsMetalRendererAvailable())
481
{
482
return false;
483
}
484
return true;
485
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
486
// OSX does not support native vulkan
487
return param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE;
488
default:
489
return false;
490
}
491
}
492
#endif // #if defined(ANGLE_PLATFORM_APPLE)
493
494
if (IsFuchsia())
495
{
496
// We do not support non-ANGLE bindings on Fuchsia.
497
if (param.driver != GLESDriverType::AngleEGL)
498
{
499
return false;
500
}
501
502
// ES 3 configs do not work properly on Fuchsia ARM.
503
// TODO(anglebug.com/4352): Investigate missing features.
504
if (param.majorVersion > 2 && IsARM())
505
return false;
506
507
// Loading swiftshader is not brought up on Fuchsia.
508
// TODO(anglebug.com/4353): Support loading swiftshader vulkan ICD.
509
if (param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE)
510
return false;
511
512
// Currently we only support the Vulkan back-end on Fuchsia.
513
return (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
514
}
515
516
if (IsOzone())
517
{
518
// We do not support non-ANGLE bindings on Ozone.
519
if (param.driver != GLESDriverType::AngleEGL)
520
return false;
521
522
// ES 3 configs do not work properly on Ozone.
523
if (param.majorVersion > 2)
524
return false;
525
526
// Currently we only support the GLES back-end on Ozone.
527
return (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
528
}
529
530
if (IsLinux() || IsAndroid())
531
{
532
// We do not support WGL bindings on Linux/Android. We do support system EGL.
533
switch (param.driver)
534
{
535
case GLESDriverType::SystemEGL:
536
return param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE;
537
case GLESDriverType::SystemWGL:
538
return false;
539
default:
540
break;
541
}
542
}
543
544
if (IsLinux())
545
{
546
ASSERT(param.driver == GLESDriverType::AngleEGL);
547
548
// Currently we support the OpenGL and Vulkan back-ends on Linux.
549
switch (param.getRenderer())
550
{
551
case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
552
return true;
553
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
554
// http://issuetracker.google.com/173004081
555
return !IsIntel() || param.eglParameters.asyncCommandQueueFeatureVulkan != EGL_TRUE;
556
default:
557
return false;
558
}
559
}
560
561
if (IsAndroid())
562
{
563
ASSERT(param.driver == GLESDriverType::AngleEGL);
564
565
// Nexus Android devices don't support backing 3.2 contexts
566
if (param.eglParameters.majorVersion == 3 && param.eglParameters.minorVersion == 2)
567
{
568
if (IsNexus5X())
569
{
570
return false;
571
}
572
}
573
574
// Currently we support the GLES and Vulkan back-ends on Android.
575
switch (param.getRenderer())
576
{
577
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
578
return true;
579
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
580
// Swiftshader's vulkan frontend doesn't build on Android.
581
if (param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE)
582
{
583
return false;
584
}
585
if (!IsAndroid9OrNewer())
586
{
587
return false;
588
}
589
if (param.eglParameters.supportsVulkanViewportFlip == EGL_FALSE)
590
{
591
return false;
592
}
593
return true;
594
default:
595
return false;
596
}
597
}
598
599
// Unknown platform.
600
return false;
601
}
602
603
bool IsConfigSupported(const PlatformParameters &param)
604
{
605
OSWindow *osWindow = OSWindow::New();
606
bool result = false;
607
if (osWindow->initialize("CONFIG_TESTER", 1, 1))
608
{
609
switch (param.driver)
610
{
611
case GLESDriverType::AngleEGL:
612
result = IsAngleEGLConfigSupported(param, osWindow);
613
break;
614
case GLESDriverType::SystemEGL:
615
result = IsSystemEGLConfigSupported(param, osWindow);
616
break;
617
case GLESDriverType::SystemWGL:
618
result = IsSystemWGLConfigSupported(param, osWindow);
619
break;
620
}
621
622
osWindow->destroy();
623
}
624
625
OSWindow::Delete(&osWindow);
626
return result;
627
}
628
629
bool IsPlatformAvailable(const PlatformParameters &param)
630
{
631
// Disable "null" device when not on ANGLE or in D3D9.
632
if (param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
633
{
634
if (param.driver != GLESDriverType::AngleEGL)
635
return false;
636
if (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE)
637
return false;
638
}
639
640
switch (param.getRenderer())
641
{
642
case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
643
break;
644
645
case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
646
#if !defined(ANGLE_ENABLE_D3D9)
647
return false;
648
#else
649
break;
650
#endif
651
652
case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
653
#if !defined(ANGLE_ENABLE_D3D11)
654
return false;
655
#else
656
break;
657
#endif
658
659
case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
660
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
661
#if !defined(ANGLE_ENABLE_OPENGL)
662
return false;
663
#else
664
break;
665
#endif
666
667
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
668
#if !defined(ANGLE_ENABLE_VULKAN)
669
return false;
670
#else
671
break;
672
#endif
673
674
case EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE:
675
#if !defined(ANGLE_ENABLE_METAL)
676
return false;
677
#else
678
break;
679
#endif
680
681
case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE:
682
#if !defined(ANGLE_ENABLE_NULL)
683
return false;
684
#else
685
break;
686
#endif
687
688
default:
689
std::cout << "Unknown test platform: " << param << std::endl;
690
return false;
691
}
692
693
bool result = false;
694
695
auto iter = GetAvailabilityCache().find(param);
696
if (iter != GetAvailabilityCache().end())
697
{
698
result = iter->second;
699
}
700
else
701
{
702
if (IsConfigSelected())
703
{
704
std::stringstream strstr;
705
strstr << param;
706
if (strstr.str() == std::string(gSelectedConfig.data()))
707
{
708
result = true;
709
}
710
}
711
else
712
{
713
const SystemInfo *systemInfo = GetTestSystemInfo();
714
715
if (systemInfo)
716
{
717
result = IsConfigAllowlisted(*systemInfo, param);
718
}
719
else
720
{
721
result = IsConfigSupported(param);
722
}
723
}
724
725
GetAvailabilityCache()[param] = result;
726
727
// Enable this unconditionally to print available platforms.
728
if (IsConfigSelected())
729
{
730
if (result)
731
{
732
std::cout << "Test Config: " << param << "\n";
733
}
734
}
735
else if (!result)
736
{
737
std::cout << "Skipping tests using configuration " << param
738
<< " because it is not available.\n";
739
}
740
}
741
return result;
742
}
743
744
std::vector<std::string> GetAvailableTestPlatformNames()
745
{
746
std::vector<std::string> platformNames;
747
748
for (const auto &iter : GetAvailabilityCache())
749
{
750
if (iter.second)
751
{
752
std::stringstream strstr;
753
strstr << iter.first;
754
platformNames.push_back(strstr.str());
755
}
756
}
757
758
// Keep the list sorted.
759
std::sort(platformNames.begin(), platformNames.end());
760
761
return platformNames;
762
}
763
764
void SetSelectedConfig(const char *selectedConfig)
765
{
766
gSelectedConfig.fill(0);
767
strncpy(gSelectedConfig.data(), selectedConfig, kMaxConfigNameLen - 1);
768
}
769
} // namespace angle
770
771