Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/src/tests/egl_tests/EGLDeviceTest.cpp
1693 views
1
//
2
// Copyright 2015 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
#ifndef ANGLE_ENABLE_D3D9
8
# define ANGLE_ENABLE_D3D9
9
#endif
10
11
#ifndef ANGLE_ENABLE_D3D11
12
# define ANGLE_ENABLE_D3D11
13
#endif
14
15
#include <d3d11.h>
16
17
#include "test_utils/ANGLETest.h"
18
#include "util/EGLWindow.h"
19
#include "util/OSWindow.h"
20
#include "util/com_utils.h"
21
#include "util/gles_loader_autogen.h"
22
23
using namespace angle;
24
25
class EGLDeviceCreationTest : public ANGLETest
26
{
27
protected:
28
EGLDeviceCreationTest()
29
: mD3D11Module(nullptr),
30
mD3D11CreateDevice(nullptr),
31
mDevice(nullptr),
32
mDeviceContext(nullptr),
33
mDeviceCreationD3D11ExtAvailable(false),
34
mOSWindow(nullptr),
35
mDisplay(EGL_NO_DISPLAY),
36
mSurface(EGL_NO_SURFACE),
37
mContext(EGL_NO_CONTEXT),
38
mConfig(0)
39
{}
40
41
void testSetUp() override
42
{
43
ASSERT_TRUE(isD3D11Renderer());
44
45
mD3D11Module = LoadLibrary(TEXT("d3d11.dll"));
46
if (mD3D11Module == nullptr)
47
{
48
std::cout << "Unable to LoadLibrary D3D11" << std::endl;
49
return;
50
}
51
52
mD3D11CreateDevice = reinterpret_cast<PFN_D3D11_CREATE_DEVICE>(
53
GetProcAddress(mD3D11Module, "D3D11CreateDevice"));
54
if (mD3D11CreateDevice == nullptr)
55
{
56
std::cout << "Could not retrieve D3D11CreateDevice from d3d11.dll" << std::endl;
57
return;
58
}
59
60
const char *extensionString =
61
static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS));
62
if (strstr(extensionString, "EGL_ANGLE_device_creation"))
63
{
64
if (strstr(extensionString, "EGL_ANGLE_device_creation_d3d11"))
65
{
66
mDeviceCreationD3D11ExtAvailable = true;
67
}
68
}
69
}
70
71
void testTearDown() override
72
{
73
SafeRelease(mDevice);
74
SafeRelease(mDeviceContext);
75
76
OSWindow::Delete(&mOSWindow);
77
78
if (mSurface != EGL_NO_SURFACE)
79
{
80
eglDestroySurface(mDisplay, mSurface);
81
mSurface = EGL_NO_SURFACE;
82
}
83
84
if (mContext != EGL_NO_CONTEXT)
85
{
86
eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
87
eglDestroyContext(mDisplay, mContext);
88
mContext = EGL_NO_CONTEXT;
89
}
90
91
if (mDisplay != EGL_NO_DISPLAY)
92
{
93
eglTerminate(mDisplay);
94
mDisplay = EGL_NO_DISPLAY;
95
}
96
}
97
98
void CreateD3D11Device()
99
{
100
ASSERT_EQ(nullptr, mDevice); // The device shouldn't be created twice
101
102
HRESULT hr =
103
mD3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, 0, 0, nullptr, 0,
104
D3D11_SDK_VERSION, &mDevice, &mFeatureLevel, &mDeviceContext);
105
106
ASSERT_TRUE(SUCCEEDED(hr));
107
ASSERT_GE(mFeatureLevel, D3D_FEATURE_LEVEL_9_3);
108
}
109
110
void CreateD3D11FL9_3Device()
111
{
112
ASSERT_EQ(nullptr, mDevice);
113
114
D3D_FEATURE_LEVEL fl93 = D3D_FEATURE_LEVEL_9_3;
115
116
HRESULT hr =
117
mD3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, 0, 0, &fl93, 1, D3D11_SDK_VERSION,
118
&mDevice, &mFeatureLevel, &mDeviceContext);
119
120
ASSERT_TRUE(SUCCEEDED(hr));
121
}
122
123
void CreateWindowSurface()
124
{
125
EGLint majorVersion, minorVersion;
126
ASSERT_EGL_TRUE(eglInitialize(mDisplay, &majorVersion, &minorVersion));
127
128
eglBindAPI(EGL_OPENGL_ES_API);
129
ASSERT_EGL_SUCCESS();
130
131
// Choose a config
132
const EGLint configAttributes[] = {EGL_NONE};
133
EGLint configCount = 0;
134
ASSERT_EGL_TRUE(eglChooseConfig(mDisplay, configAttributes, &mConfig, 1, &configCount));
135
136
// Create an OS Window
137
mOSWindow = OSWindow::New();
138
mOSWindow->initialize("EGLSurfaceTest", 64, 64);
139
140
// Create window surface
141
mSurface = eglCreateWindowSurface(mDisplay, mConfig, mOSWindow->getNativeWindow(), nullptr);
142
ASSERT_EGL_SUCCESS();
143
144
// Create EGL context
145
EGLint contextAttibutes[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE};
146
mContext = eglCreateContext(mDisplay, mConfig, nullptr, contextAttibutes);
147
ASSERT_EGL_SUCCESS();
148
149
// Make the surface current
150
eglMakeCurrent(mDisplay, mSurface, mSurface, mContext);
151
ASSERT_EGL_SUCCESS();
152
}
153
154
// This triggers a D3D device lost on current Windows systems
155
// This behavior could potentially change in the future
156
void trigger9_3DeviceLost()
157
{
158
ID3D11Buffer *gsBuffer = nullptr;
159
D3D11_BUFFER_DESC bufferDesc = {0};
160
bufferDesc.ByteWidth = 64;
161
bufferDesc.Usage = D3D11_USAGE_DEFAULT;
162
bufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
163
164
HRESULT result = mDevice->CreateBuffer(&bufferDesc, nullptr, &gsBuffer);
165
ASSERT_TRUE(SUCCEEDED(result));
166
167
mDeviceContext->GSSetConstantBuffers(0, 1, &gsBuffer);
168
SafeRelease(gsBuffer);
169
gsBuffer = nullptr;
170
171
result = mDevice->GetDeviceRemovedReason();
172
ASSERT_TRUE(FAILED(result));
173
}
174
175
HMODULE mD3D11Module;
176
PFN_D3D11_CREATE_DEVICE mD3D11CreateDevice;
177
178
ID3D11Device *mDevice;
179
ID3D11DeviceContext *mDeviceContext;
180
D3D_FEATURE_LEVEL mFeatureLevel;
181
182
bool mDeviceCreationD3D11ExtAvailable;
183
184
OSWindow *mOSWindow;
185
186
EGLDisplay mDisplay;
187
EGLSurface mSurface;
188
EGLContext mContext;
189
EGLConfig mConfig;
190
};
191
192
// Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve
193
// D3D11 device
194
TEST_P(EGLDeviceCreationTest, BasicD3D11Device)
195
{
196
ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
197
198
CreateD3D11Device();
199
200
EGLDeviceEXT eglDevice =
201
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
202
ASSERT_NE(EGL_NO_DEVICE_EXT, eglDevice);
203
ASSERT_EGL_SUCCESS();
204
205
EGLAttrib deviceAttrib;
206
eglQueryDeviceAttribEXT(eglDevice, EGL_D3D11_DEVICE_ANGLE, &deviceAttrib);
207
ASSERT_EGL_SUCCESS();
208
209
ID3D11Device *queriedDevice = reinterpret_cast<ID3D11Device *>(deviceAttrib);
210
ASSERT_EQ(mFeatureLevel, queriedDevice->GetFeatureLevel());
211
212
eglReleaseDeviceANGLE(eglDevice);
213
}
214
215
// Test that creating a EGLDeviceEXT from D3D11 device works, and it can be queried to retrieve
216
// D3D11 device
217
TEST_P(EGLDeviceCreationTest, BasicD3D11DeviceViaFuncPointer)
218
{
219
ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
220
221
CreateD3D11Device();
222
223
EGLDeviceEXT eglDevice =
224
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
225
ASSERT_NE(EGL_NO_DEVICE_EXT, eglDevice);
226
ASSERT_EGL_SUCCESS();
227
228
EGLAttrib deviceAttrib;
229
eglQueryDeviceAttribEXT(eglDevice, EGL_D3D11_DEVICE_ANGLE, &deviceAttrib);
230
ASSERT_EGL_SUCCESS();
231
232
ID3D11Device *queriedDevice = reinterpret_cast<ID3D11Device *>(deviceAttrib);
233
ASSERT_EQ(mFeatureLevel, queriedDevice->GetFeatureLevel());
234
235
eglReleaseDeviceANGLE(eglDevice);
236
}
237
238
// Test that creating a EGLDeviceEXT from D3D11 device works, and can be used for rendering
239
TEST_P(EGLDeviceCreationTest, RenderingUsingD3D11Device)
240
{
241
CreateD3D11Device();
242
243
EGLDeviceEXT eglDevice =
244
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
245
ASSERT_EGL_SUCCESS();
246
247
// Create an EGLDisplay using the EGLDevice
248
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevice, nullptr);
249
ASSERT_NE(EGL_NO_DISPLAY, mDisplay);
250
251
// Create a surface using the display
252
CreateWindowSurface();
253
254
// Perform some very basic rendering
255
glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
256
glClear(GL_COLOR_BUFFER_BIT);
257
EXPECT_PIXEL_EQ(32, 32, 255, 0, 255, 255);
258
259
// Note that we must call TearDown() before we release the EGL device, since the display
260
// depends on the device
261
ASSERT_EGL_TRUE(eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
262
testTearDown();
263
264
eglReleaseDeviceANGLE(eglDevice);
265
}
266
267
// Test that ANGLE doesn't try to recreate a D3D11 device if the inputted one is lost
268
TEST_P(EGLDeviceCreationTest, D3D11DeviceRecovery)
269
{
270
// Force Feature Level 9_3 so we can easily trigger a device lost later
271
CreateD3D11FL9_3Device();
272
273
EGLDeviceEXT eglDevice =
274
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
275
ASSERT_EGL_SUCCESS();
276
277
// Create an EGLDisplay using the EGLDevice
278
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevice, nullptr);
279
ASSERT_TRUE(mDisplay != EGL_NO_DISPLAY);
280
281
// Create a surface using the display
282
CreateWindowSurface();
283
284
// Perform some very basic rendering
285
glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
286
glClear(GL_COLOR_BUFFER_BIT);
287
EXPECT_PIXEL_EQ(32, 32, 255, 0, 255, 255);
288
ASSERT_GL_NO_ERROR();
289
290
// ANGLE's SwapChain11::initPassThroughResources doesn't handle device lost before
291
// eglSwapBuffers, so we must call eglSwapBuffers before we lose the device.
292
ASSERT_EGL_TRUE(eglSwapBuffers(mDisplay, mSurface));
293
294
// Trigger a lost device
295
trigger9_3DeviceLost();
296
297
// Destroy the old EGL Window Surface
298
if (mSurface != EGL_NO_SURFACE)
299
{
300
eglDestroySurface(mDisplay, mSurface);
301
mSurface = EGL_NO_SURFACE;
302
}
303
304
// Try to create a new window surface. In certain configurations this will recreate the D3D11
305
// device. We want to test that it doesn't recreate the D3D11 device when EGLDeviceEXT is
306
// used. The window surface creation should fail if a new D3D11 device isn't created.
307
mSurface = eglCreateWindowSurface(mDisplay, mConfig, mOSWindow->getNativeWindow(), nullptr);
308
ASSERT_EQ(EGL_NO_SURFACE, mSurface);
309
ASSERT_EGL_ERROR(EGL_BAD_ALLOC);
310
311
// Get the D3D11 device out of the EGLDisplay again. It should be the same one as above.
312
EGLAttrib device = 0;
313
EGLAttrib newEglDevice = 0;
314
ASSERT_EGL_TRUE(eglQueryDisplayAttribEXT(mDisplay, EGL_DEVICE_EXT, &newEglDevice));
315
ASSERT_EGL_TRUE(eglQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(newEglDevice),
316
EGL_D3D11_DEVICE_ANGLE, &device));
317
ID3D11Device *newDevice = reinterpret_cast<ID3D11Device *>(device);
318
319
ASSERT_EQ(reinterpret_cast<EGLDeviceEXT>(newEglDevice), eglDevice);
320
ASSERT_EQ(newDevice, mDevice);
321
322
// Note that we must call TearDown() before we release the EGL device, since the display
323
// depends on the device
324
testTearDown();
325
326
eglReleaseDeviceANGLE(eglDevice);
327
}
328
329
// Test that calling eglGetPlatformDisplayEXT with the same device returns the same display
330
TEST_P(EGLDeviceCreationTest, GetPlatformDisplayTwice)
331
{
332
CreateD3D11Device();
333
334
EGLDeviceEXT eglDevice =
335
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
336
ASSERT_EGL_SUCCESS();
337
338
// Create an EGLDisplay using the EGLDevice
339
EGLDisplay display1 = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevice, nullptr);
340
ASSERT_NE(EGL_NO_DISPLAY, display1);
341
342
EGLDisplay display2 = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevice, nullptr);
343
ASSERT_NE(EGL_NO_DISPLAY, display2);
344
345
ASSERT_EQ(display1, display2);
346
347
eglTerminate(display1);
348
eglReleaseDeviceANGLE(eglDevice);
349
}
350
351
// Test that creating a EGLDeviceEXT from an invalid D3D11 device fails
352
TEST_P(EGLDeviceCreationTest, InvalidD3D11Device)
353
{
354
ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
355
356
CreateD3D11Device();
357
358
// Use mDeviceContext instead of mDevice
359
EGLDeviceEXT eglDevice = eglCreateDeviceANGLE(
360
EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDeviceContext), nullptr);
361
EXPECT_EQ(EGL_NO_DEVICE_EXT, eglDevice);
362
EXPECT_EGL_ERROR(EGL_BAD_ATTRIBUTE);
363
}
364
365
// Test that EGLDeviceEXT holds a ref to the D3D11 device
366
TEST_P(EGLDeviceCreationTest, D3D11DeviceReferenceCounting)
367
{
368
ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
369
370
CreateD3D11Device();
371
372
EGLDeviceEXT eglDevice =
373
eglCreateDeviceANGLE(EGL_D3D11_DEVICE_ANGLE, reinterpret_cast<void *>(mDevice), nullptr);
374
ASSERT_NE(EGL_NO_DEVICE_EXT, eglDevice);
375
ASSERT_EGL_SUCCESS();
376
377
// Now release our D3D11 device/context
378
SafeRelease(mDevice);
379
SafeRelease(mDeviceContext);
380
381
EGLAttrib deviceAttrib;
382
eglQueryDeviceAttribEXT(eglDevice, EGL_D3D11_DEVICE_ANGLE, &deviceAttrib);
383
ASSERT_EGL_SUCCESS();
384
385
ID3D11Device *queriedDevice = reinterpret_cast<ID3D11Device *>(deviceAttrib);
386
ASSERT_EQ(mFeatureLevel, queriedDevice->GetFeatureLevel());
387
388
eglReleaseDeviceANGLE(eglDevice);
389
}
390
391
// Test that creating a EGLDeviceEXT from a D3D9 device fails
392
TEST_P(EGLDeviceCreationTest, AnyD3D9Device)
393
{
394
ANGLE_SKIP_TEST_IF(!mDeviceCreationD3D11ExtAvailable);
395
396
std::string fakeD3DDevice = "This is a string, not a D3D device";
397
398
EGLDeviceEXT eglDevice = eglCreateDeviceANGLE(
399
EGL_D3D9_DEVICE_ANGLE, reinterpret_cast<void *>(&fakeD3DDevice), nullptr);
400
EXPECT_EQ(EGL_NO_DEVICE_EXT, eglDevice);
401
EXPECT_EGL_ERROR(EGL_BAD_ATTRIBUTE);
402
}
403
404
class EGLDeviceQueryTest : public ANGLETest
405
{
406
protected:
407
EGLDeviceQueryTest() {}
408
409
void testSetUp() override
410
{
411
const char *extensionString =
412
static_cast<const char *>(eglQueryString(getEGLWindow()->getDisplay(), EGL_EXTENSIONS));
413
414
if (!eglQueryDeviceStringEXT)
415
{
416
FAIL() << "ANGLE extension EGL_EXT_device_query export eglQueryDeviceStringEXT was not "
417
"found";
418
}
419
420
if (!eglQueryDisplayAttribEXT)
421
{
422
FAIL() << "ANGLE extension EGL_EXT_device_query export eglQueryDisplayAttribEXT was "
423
"not found";
424
}
425
426
if (!eglQueryDeviceAttribEXT)
427
{
428
FAIL() << "ANGLE extension EGL_EXT_device_query export eglQueryDeviceAttribEXT was not "
429
"found";
430
}
431
432
EGLAttrib angleDevice = 0;
433
EXPECT_EGL_TRUE(
434
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
435
extensionString = static_cast<const char *>(
436
eglQueryDeviceStringEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice), EGL_EXTENSIONS));
437
if (strstr(extensionString, "EGL_ANGLE_device_d3d") == nullptr)
438
{
439
FAIL() << "ANGLE extension EGL_ANGLE_device_d3d was not found";
440
}
441
}
442
};
443
444
// This test attempts to obtain a D3D11 device and a D3D9 device using the eglQueryDeviceAttribEXT
445
// function.
446
// If the test is configured to use D3D11 then it should succeed to obtain a D3D11 device.
447
// If the test is confitured to use D3D9, then it should succeed to obtain a D3D9 device.
448
TEST_P(EGLDeviceQueryTest, QueryDevice)
449
{
450
EGLAttrib device = 0;
451
EGLAttrib angleDevice = 0;
452
if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
453
{
454
EXPECT_EGL_TRUE(
455
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
456
EXPECT_EGL_TRUE(eglQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice),
457
EGL_D3D11_DEVICE_ANGLE, &device));
458
ID3D11Device *d3d11Device = reinterpret_cast<ID3D11Device *>(device);
459
IDXGIDevice *dxgiDevice = DynamicCastComObject<IDXGIDevice>(d3d11Device);
460
EXPECT_TRUE(dxgiDevice != nullptr);
461
SafeRelease(dxgiDevice);
462
}
463
464
if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE)
465
{
466
EXPECT_EGL_TRUE(
467
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
468
EXPECT_EGL_TRUE(eglQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice),
469
EGL_D3D9_DEVICE_ANGLE, &device));
470
IDirect3DDevice9 *d3d9Device = reinterpret_cast<IDirect3DDevice9 *>(device);
471
IDirect3D9 *d3d9 = nullptr;
472
EXPECT_EQ(S_OK, d3d9Device->GetDirect3D(&d3d9));
473
EXPECT_TRUE(d3d9 != nullptr);
474
SafeRelease(d3d9);
475
}
476
}
477
478
// This test attempts to obtain a D3D11 device from a D3D9 configured system and a D3D9 device from
479
// a D3D11 configured system using the eglQueryDeviceAttribEXT function.
480
// If the test is configured to use D3D11 then it should fail to obtain a D3D11 device.
481
// If the test is confitured to use D3D9, then it should fail to obtain a D3D9 device.
482
TEST_P(EGLDeviceQueryTest, QueryDeviceBadAttribute)
483
{
484
EGLAttrib device = 0;
485
EGLAttrib angleDevice = 0;
486
if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
487
{
488
EXPECT_EGL_TRUE(
489
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
490
EXPECT_EGL_FALSE(eglQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice),
491
EGL_D3D9_DEVICE_ANGLE, &device));
492
}
493
494
if (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE)
495
{
496
EXPECT_EGL_TRUE(
497
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
498
EXPECT_EGL_FALSE(eglQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice),
499
EGL_D3D11_DEVICE_ANGLE, &device));
500
}
501
}
502
503
// Ensure that:
504
// - calling getPlatformDisplayEXT using ANGLE_Platform with some parameters
505
// - extracting the EGLDeviceEXT from the EGLDisplay
506
// - calling getPlatformDisplayEXT with this EGLDeviceEXT
507
// results in the same EGLDisplay being returned from getPlatformDisplayEXT both times
508
TEST_P(EGLDeviceQueryTest, GetPlatformDisplayDeviceReuse)
509
{
510
EGLAttrib eglDevice = 0;
511
EXPECT_EGL_TRUE(
512
eglQueryDisplayAttribEXT(getEGLWindow()->getDisplay(), EGL_DEVICE_EXT, &eglDevice));
513
514
EGLDisplay display2 = eglGetPlatformDisplayEXT(
515
EGL_PLATFORM_DEVICE_EXT, reinterpret_cast<EGLDeviceEXT>(eglDevice), nullptr);
516
EXPECT_EQ(getEGLWindow()->getDisplay(), display2);
517
}
518
519
// Use this to select which configurations (e.g. which renderer, which GLES major version) these
520
// tests should be run against.
521
ANGLE_INSTANTIATE_TEST(EGLDeviceCreationTest, WithNoFixture(ES2_D3D11()));
522
ANGLE_INSTANTIATE_TEST(EGLDeviceQueryTest, ES2_D3D9(), ES2_D3D11());
523
524