blob: b1fb7774bdfb2331da4959e76059fe54d6859a06 [file] [log] [blame]
Jamie Madill508a5b72015-12-08 11:26:14 -05001//
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// ANGLETest:
7// Implementation of common ANGLE testing fixture.
8//
9
Geoff Lang8a079e52013-10-18 16:13:33 -040010#include "ANGLETest.h"
Jamie Madill62af5462014-08-26 13:16:37 -040011#include "EGLWindow.h"
Jamie Madill8add0eb2014-08-26 13:16:35 -040012#include "OSWindow.h"
Jamie Madill508a5b72015-12-08 11:26:14 -050013#include "system_utils.h"
Jamie Madill8add0eb2014-08-26 13:16:35 -040014
Jamie Madill0dfa8072016-01-22 15:27:21 -050015namespace angle
16{
17
Jamie Madill1fbc59f2016-02-24 15:25:51 -050018namespace
19{
20float ColorNorm(GLubyte channelValue)
21{
22 return static_cast<float>(channelValue) / 255.0f;
23}
24} // anonymous namespace
25
Jamie Madill0dfa8072016-01-22 15:27:21 -050026GLColor::GLColor() : R(0), G(0), B(0), A(0)
27{
28}
29
30GLColor::GLColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a) : R(r), G(g), B(b), A(a)
31{
32}
33
Jamie Madille2509a32016-02-01 14:09:05 -050034GLColor::GLColor(GLuint colorValue) : R(0), G(0), B(0), A(0)
35{
36 memcpy(&R, &colorValue, sizeof(GLuint));
37}
38
Jamie Madill1fbc59f2016-02-24 15:25:51 -050039Vector4 GLColor::toNormalizedVector() const
40{
41 return Vector4(ColorNorm(R), ColorNorm(G), ColorNorm(B), ColorNorm(A));
42}
43
Jamie Madill0dfa8072016-01-22 15:27:21 -050044GLColor ReadColor(GLint x, GLint y)
45{
46 GLColor actual;
47 glReadPixels((x), (y), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &actual.R);
48 EXPECT_GL_NO_ERROR();
49 return actual;
50}
51
52bool operator==(const GLColor &a, const GLColor &b)
53{
54 return a.R == b.R && a.G == b.G && a.B == b.B && a.A == b.A;
55}
56
57std::ostream &operator<<(std::ostream &ostream, const GLColor &color)
58{
59 ostream << "(" << static_cast<unsigned int>(color.R) << ", "
60 << static_cast<unsigned int>(color.G) << ", " << static_cast<unsigned int>(color.B)
61 << ", " << static_cast<unsigned int>(color.A) << ")";
62 return ostream;
63}
64
65} // namespace angle
66
Jamie Madillfa05f602015-05-07 13:47:11 -040067ANGLETest::ANGLETest()
Austin Kinrossd544cc92016-01-11 15:26:42 -080068 : mEGLWindow(nullptr), mWidth(16), mHeight(16), mIgnoreD3D11SDKLayersWarnings(false)
Geoff Lang8a079e52013-10-18 16:13:33 -040069{
Geoff Lang5ade8452015-09-02 11:00:30 -040070 mEGLWindow =
71 new EGLWindow(GetParam().majorVersion, GetParam().minorVersion, GetParam().eglParameters);
Geoff Lang0d3683c2014-10-23 11:08:16 -040072}
73
74ANGLETest::~ANGLETest()
75{
Jamie Madill77a72f62015-04-14 11:18:32 -040076 SafeDelete(mEGLWindow);
Geoff Lang8a079e52013-10-18 16:13:33 -040077}
78
Geoff Lang8a079e52013-10-18 16:13:33 -040079void ANGLETest::SetUp()
80{
Corentin Wallezb44440d2015-07-22 17:54:20 -040081 // Resize the window before creating the context so that the first make current
82 // sets the viewport and scissor box to the right size.
83 bool needSwap = false;
84 if (mOSWindow->getWidth() != mWidth || mOSWindow->getHeight() != mHeight)
Geoff Lang7f8dc492015-07-23 21:29:33 +000085 {
Corentin Wallezb44440d2015-07-22 17:54:20 -040086 if (!mOSWindow->resize(mWidth, mHeight))
87 {
88 FAIL() << "Failed to resize ANGLE test window.";
89 }
90 needSwap = true;
Geoff Lang7f8dc492015-07-23 21:29:33 +000091 }
92
Geoff Lang8a079e52013-10-18 16:13:33 -040093 if (!createEGLContext())
94 {
95 FAIL() << "egl context creation failed.";
96 }
Corentin Wallezb828b322015-07-16 17:51:30 -040097
Corentin Wallezb44440d2015-07-22 17:54:20 -040098 if (needSwap)
99 {
100 // Swap the buffers so that the default framebuffer picks up the resize
101 // which will allow follow-up test code to assume the framebuffer covers
102 // the whole window.
103 swapBuffers();
104 }
Corentin Wallez096725b2015-07-20 16:58:57 -0400105
Geoff Lang7f8dc492015-07-23 21:29:33 +0000106 // This Viewport command is not strictly necessary but we add it so that programs
107 // taking OpenGL traces can guess the size of the default framebuffer and show it
108 // in their UIs
109 glViewport(0, 0, mWidth, mHeight);
Jamie Madill508a5b72015-12-08 11:26:14 -0500110
111 const auto &info = testing::UnitTest::GetInstance()->current_test_info();
112 angle::WriteDebugMessage("Entering %s.%s\n", info->test_case_name(), info->name());
Geoff Lang8a079e52013-10-18 16:13:33 -0400113}
114
115void ANGLETest::TearDown()
116{
Austin Kinrossd544cc92016-01-11 15:26:42 -0800117 checkD3D11SDKLayersMessages();
118
Jamie Madill508a5b72015-12-08 11:26:14 -0500119 const auto &info = testing::UnitTest::GetInstance()->current_test_info();
120 angle::WriteDebugMessage("Exiting %s.%s\n", info->test_case_name(), info->name());
121
Geoff Lang8a079e52013-10-18 16:13:33 -0400122 swapBuffers();
Jamie Madill9e16d402014-09-08 17:36:33 -0400123 mOSWindow->messageLoop();
124
Geoff Lang8a079e52013-10-18 16:13:33 -0400125 if (!destroyEGLContext())
126 {
127 FAIL() << "egl context destruction failed.";
128 }
Jamie Madill8add0eb2014-08-26 13:16:35 -0400129
130 // Check for quit message
131 Event myEvent;
132 while (mOSWindow->popEvent(&myEvent))
133 {
134 if (myEvent.Type == Event::EVENT_CLOSED)
135 {
136 exit(0);
137 }
138 }
Geoff Lang8a079e52013-10-18 16:13:33 -0400139}
140
141void ANGLETest::swapBuffers()
142{
Jamie Madill77a72f62015-04-14 11:18:32 -0400143 if (mEGLWindow->isGLInitialized())
144 {
145 mEGLWindow->swap();
146 }
Geoff Lang8a079e52013-10-18 16:13:33 -0400147}
148
Olli Etuaho4a8329f2016-01-11 17:12:57 +0200149void ANGLETest::drawQuad(GLuint program,
150 const std::string &positionAttribName,
151 GLfloat positionAttribZ)
152{
153 drawQuad(program, positionAttribName, positionAttribZ, 1.0f);
154}
155
156void ANGLETest::drawQuad(GLuint program,
157 const std::string &positionAttribName,
158 GLfloat positionAttribZ,
159 GLfloat positionAttribXYScale)
Geoff Lang8a079e52013-10-18 16:13:33 -0400160{
161 GLint positionLocation = glGetAttribLocation(program, positionAttribName.c_str());
162
163 glUseProgram(program);
164
Olli Etuaho4a8329f2016-01-11 17:12:57 +0200165 const GLfloat vertices[] = {
166 -1.0f * positionAttribXYScale, 1.0f * positionAttribXYScale, positionAttribZ,
167 -1.0f * positionAttribXYScale, -1.0f * positionAttribXYScale, positionAttribZ,
168 1.0f * positionAttribXYScale, -1.0f * positionAttribXYScale, positionAttribZ,
Geoff Lang8a079e52013-10-18 16:13:33 -0400169
Olli Etuaho4a8329f2016-01-11 17:12:57 +0200170 -1.0f * positionAttribXYScale, 1.0f * positionAttribXYScale, positionAttribZ,
171 1.0f * positionAttribXYScale, -1.0f * positionAttribXYScale, positionAttribZ,
172 1.0f * positionAttribXYScale, 1.0f * positionAttribXYScale, positionAttribZ,
Geoff Lang8a079e52013-10-18 16:13:33 -0400173 };
174
175 glVertexAttribPointer(positionLocation, 3, GL_FLOAT, GL_FALSE, 0, vertices);
176 glEnableVertexAttribArray(positionLocation);
177
178 glDrawArrays(GL_TRIANGLES, 0, 6);
179
180 glDisableVertexAttribArray(positionLocation);
181 glVertexAttribPointer(positionLocation, 4, GL_FLOAT, GL_FALSE, 0, NULL);
182
183 glUseProgram(0);
184}
185
Geoff Langefc551f2013-10-31 10:20:28 -0400186GLuint ANGLETest::compileShader(GLenum type, const std::string &source)
187{
188 GLuint shader = glCreateShader(type);
189
190 const char *sourceArray[1] = { source.c_str() };
191 glShaderSource(shader, 1, sourceArray, NULL);
192 glCompileShader(shader);
193
194 GLint compileResult;
195 glGetShaderiv(shader, GL_COMPILE_STATUS, &compileResult);
196
197 if (compileResult == 0)
198 {
199 GLint infoLogLength;
200 glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLength);
201
Jamie Madilld2c52e32015-10-14 17:07:05 -0400202 if (infoLogLength == 0)
203 {
204 std::cerr << "shader compilation failed with empty log." << std::endl;
205 }
206 else
207 {
208 std::vector<GLchar> infoLog(infoLogLength);
209 glGetShaderInfoLog(shader, static_cast<GLsizei>(infoLog.size()), NULL, &infoLog[0]);
Geoff Langefc551f2013-10-31 10:20:28 -0400210
Jamie Madilld2c52e32015-10-14 17:07:05 -0400211 std::cerr << "shader compilation failed: " << &infoLog[0];
212 }
Geoff Langefc551f2013-10-31 10:20:28 -0400213
214 glDeleteShader(shader);
215 shader = 0;
216 }
217
218 return shader;
219}
220
Austin Kinrossd544cc92016-01-11 15:26:42 -0800221void ANGLETest::checkD3D11SDKLayersMessages()
222{
223#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(NDEBUG)
224 // In debug D3D11 mode, check ID3D11InfoQueue to see if any D3D11 SDK Layers messages
225 // were outputted by the test
226 if (mIgnoreD3D11SDKLayersWarnings ||
227 mEGLWindow->getPlatform().renderer != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE ||
228 mEGLWindow->getDisplay() == EGL_NO_DISPLAY)
229 {
230 return;
231 }
232
233 const char *extensionString =
234 static_cast<const char *>(eglQueryString(mEGLWindow->getDisplay(), EGL_EXTENSIONS));
235 if (!strstr(extensionString, "EGL_EXT_device_query"))
236 {
237 return;
238 }
239
240 EGLAttrib device = 0;
241 EGLAttrib angleDevice = 0;
242
243 PFNEGLQUERYDISPLAYATTRIBEXTPROC queryDisplayAttribEXT;
244 PFNEGLQUERYDEVICEATTRIBEXTPROC queryDeviceAttribEXT;
245
246 queryDisplayAttribEXT = reinterpret_cast<PFNEGLQUERYDISPLAYATTRIBEXTPROC>(
247 eglGetProcAddress("eglQueryDisplayAttribEXT"));
248 queryDeviceAttribEXT = reinterpret_cast<PFNEGLQUERYDEVICEATTRIBEXTPROC>(
249 eglGetProcAddress("eglQueryDeviceAttribEXT"));
250 ASSERT_NE(nullptr, queryDisplayAttribEXT);
251 ASSERT_NE(nullptr, queryDeviceAttribEXT);
252
253 ASSERT_EGL_TRUE(queryDisplayAttribEXT(mEGLWindow->getDisplay(), EGL_DEVICE_EXT, &angleDevice));
254 ASSERT_EGL_TRUE(queryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice),
255 EGL_D3D11_DEVICE_ANGLE, &device));
256 ID3D11Device *d3d11Device = reinterpret_cast<ID3D11Device *>(device);
257
258 ID3D11InfoQueue *infoQueue = nullptr;
259 HRESULT hr =
260 d3d11Device->QueryInterface(__uuidof(infoQueue), reinterpret_cast<void **>(&infoQueue));
261 if (SUCCEEDED(hr))
262 {
263 UINT64 numStoredD3DDebugMessages =
264 infoQueue->GetNumStoredMessagesAllowedByRetrievalFilter();
265
266 if (numStoredD3DDebugMessages > 0)
267 {
268 for (UINT64 i = 0; i < numStoredD3DDebugMessages; i++)
269 {
270 SIZE_T messageLength = 0;
271 hr = infoQueue->GetMessage(i, nullptr, &messageLength);
272
273 if (SUCCEEDED(hr))
274 {
275 D3D11_MESSAGE *pMessage =
276 reinterpret_cast<D3D11_MESSAGE *>(malloc(messageLength));
277 infoQueue->GetMessage(i, pMessage, &messageLength);
278
279 std::cout << "Message " << i << ":"
280 << " " << pMessage->pDescription << "\n";
281 free(pMessage);
282 }
283 }
284
285 FAIL() << numStoredD3DDebugMessages
286 << " D3D11 SDK Layers message(s) detected! Test Failed.\n";
287 }
288 }
289
290 SafeRelease(infoQueue);
291#endif
292}
293
Geoff Lang63046e22015-07-21 12:43:50 -0400294static bool checkExtensionExists(const char *allExtensions, const std::string &extName)
295{
296 return strstr(allExtensions, extName.c_str()) != nullptr;
297}
298
Geoff Lang8a079e52013-10-18 16:13:33 -0400299bool ANGLETest::extensionEnabled(const std::string &extName)
300{
Geoff Lang63046e22015-07-21 12:43:50 -0400301 return checkExtensionExists(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)),
302 extName);
303}
304
305bool ANGLETest::eglDisplayExtensionEnabled(EGLDisplay display, const std::string &extName)
306{
307 return checkExtensionExists(eglQueryString(display, EGL_EXTENSIONS), extName);
308}
309
310bool ANGLETest::eglClientExtensionEnabled(const std::string &extName)
311{
312 return checkExtensionExists(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS), extName);
Geoff Lang8a079e52013-10-18 16:13:33 -0400313}
314
Geoff Lang8a079e52013-10-18 16:13:33 -0400315void ANGLETest::setWindowWidth(int width)
316{
Corentin Wallezf3357ee2015-07-22 14:10:19 -0400317 mWidth = width;
Geoff Lang8a079e52013-10-18 16:13:33 -0400318}
319
320void ANGLETest::setWindowHeight(int height)
321{
Corentin Wallezf3357ee2015-07-22 14:10:19 -0400322 mHeight = height;
Geoff Lang8a079e52013-10-18 16:13:33 -0400323}
324
Geoff Langefc551f2013-10-31 10:20:28 -0400325void ANGLETest::setConfigRedBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400326{
Jamie Madill62af5462014-08-26 13:16:37 -0400327 mEGLWindow->setConfigRedBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400328}
329
Geoff Langefc551f2013-10-31 10:20:28 -0400330void ANGLETest::setConfigGreenBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400331{
Jamie Madill62af5462014-08-26 13:16:37 -0400332 mEGLWindow->setConfigGreenBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400333}
334
Geoff Langefc551f2013-10-31 10:20:28 -0400335void ANGLETest::setConfigBlueBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400336{
Jamie Madill62af5462014-08-26 13:16:37 -0400337 mEGLWindow->setConfigBlueBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400338}
339
Geoff Langefc551f2013-10-31 10:20:28 -0400340void ANGLETest::setConfigAlphaBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400341{
Jamie Madill62af5462014-08-26 13:16:37 -0400342 mEGLWindow->setConfigAlphaBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400343}
344
Geoff Langefc551f2013-10-31 10:20:28 -0400345void ANGLETest::setConfigDepthBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400346{
Jamie Madill62af5462014-08-26 13:16:37 -0400347 mEGLWindow->setConfigDepthBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400348}
349
Geoff Langefc551f2013-10-31 10:20:28 -0400350void ANGLETest::setConfigStencilBits(int bits)
Geoff Lang8a079e52013-10-18 16:13:33 -0400351{
Jamie Madill62af5462014-08-26 13:16:37 -0400352 mEGLWindow->setConfigStencilBits(bits);
Geoff Lang8a079e52013-10-18 16:13:33 -0400353}
354
355void ANGLETest::setMultisampleEnabled(bool enabled)
356{
Jamie Madill62af5462014-08-26 13:16:37 -0400357 mEGLWindow->setMultisample(enabled);
Geoff Lang8a079e52013-10-18 16:13:33 -0400358}
359
Geoff Lang70d0f492015-12-10 17:45:46 -0500360void ANGLETest::setDebugEnabled(bool enabled)
361{
362 mEGLWindow->setDebugEnabled(enabled);
363}
364
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500365void ANGLETest::setNoErrorEnabled(bool enabled)
366{
367 mEGLWindow->setNoErrorEnabled(enabled);
368}
369
Geoff Lang8a079e52013-10-18 16:13:33 -0400370int ANGLETest::getClientVersion() const
371{
Geoff Lang5ade8452015-09-02 11:00:30 -0400372 return mEGLWindow->getClientMajorVersion();
Geoff Lang8a079e52013-10-18 16:13:33 -0400373}
374
Geoff Langb9266272015-01-29 13:25:14 +0000375EGLWindow *ANGLETest::getEGLWindow() const
376{
377 return mEGLWindow;
378}
379
Geoff Lang8a079e52013-10-18 16:13:33 -0400380int ANGLETest::getWindowWidth() const
381{
Corentin Wallezf3357ee2015-07-22 14:10:19 -0400382 return mWidth;
Geoff Lang8a079e52013-10-18 16:13:33 -0400383}
384
385int ANGLETest::getWindowHeight() const
386{
Corentin Wallezf3357ee2015-07-22 14:10:19 -0400387 return mHeight;
Geoff Lang8a079e52013-10-18 16:13:33 -0400388}
389
Geoff Langefc551f2013-10-31 10:20:28 -0400390bool ANGLETest::isMultisampleEnabled() const
Geoff Lang8a079e52013-10-18 16:13:33 -0400391{
Jamie Madill62af5462014-08-26 13:16:37 -0400392 return mEGLWindow->isMultisample();
Geoff Lang8a079e52013-10-18 16:13:33 -0400393}
394
395bool ANGLETest::createEGLContext()
396{
Jamie Madill62af5462014-08-26 13:16:37 -0400397 return mEGLWindow->initializeGL(mOSWindow);
Geoff Lang8a079e52013-10-18 16:13:33 -0400398}
399
400bool ANGLETest::destroyEGLContext()
401{
Jamie Madill62af5462014-08-26 13:16:37 -0400402 mEGLWindow->destroyGL();
Geoff Lang8a079e52013-10-18 16:13:33 -0400403 return true;
404}
Geoff Langbb134672013-10-23 13:06:46 -0400405
Geoff Lang0d3683c2014-10-23 11:08:16 -0400406bool ANGLETest::InitTestWindow()
Jamie Madill8add0eb2014-08-26 13:16:35 -0400407{
408 mOSWindow = CreateOSWindow();
409 if (!mOSWindow->initialize("ANGLE_TEST", 128, 128))
410 {
411 return false;
412 }
413
Geoff Lang0d3683c2014-10-23 11:08:16 -0400414 mOSWindow->setVisible(true);
Jamie Madill8add0eb2014-08-26 13:16:35 -0400415
416 return true;
417}
418
Geoff Lang0d3683c2014-10-23 11:08:16 -0400419bool ANGLETest::DestroyTestWindow()
Jamie Madill8add0eb2014-08-26 13:16:35 -0400420{
421 if (mOSWindow)
422 {
423 mOSWindow->destroy();
424 delete mOSWindow;
425 mOSWindow = NULL;
426 }
427
428 return true;
429}
430
Geoff Lang0d3683c2014-10-23 11:08:16 -0400431void ANGLETest::SetWindowVisible(bool isVisible)
Geoff Langbb134672013-10-23 13:06:46 -0400432{
Jamie Madill4119ed32014-10-01 10:41:40 -0400433 mOSWindow->setVisible(isVisible);
Geoff Langbb134672013-10-23 13:06:46 -0400434}
Geoff Lang0d3683c2014-10-23 11:08:16 -0400435
Jamie Madillc3b9b262015-01-30 14:00:51 -0500436bool ANGLETest::isIntel() const
437{
438 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
439 return (rendererString.find("Intel") != std::string::npos);
440}
441
442bool ANGLETest::isAMD() const
443{
444 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
445 return (rendererString.find("AMD") != std::string::npos) ||
446 (rendererString.find("ATI") != std::string::npos);
447}
448
449bool ANGLETest::isNVidia() const
450{
451 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
452 return (rendererString.find("NVIDIA") != std::string::npos);
453}
454
Jamie Madilld55d2832015-10-27 13:59:19 -0400455bool ANGLETest::isD3D11() const
456{
457 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
458 return (rendererString.find("Direct3D11 vs_5_0") != std::string::npos);
459}
460
Jamie Madill9fc36822015-11-18 13:08:07 -0500461bool ANGLETest::isD3D11_FL93() const
462{
463 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
464 return (rendererString.find("Direct3D11 vs_4_0_") != std::string::npos);
465}
466
467bool ANGLETest::isD3D9() const
468{
469 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
470 return (rendererString.find("Direct3D9") != std::string::npos);
471}
472
473bool ANGLETest::isD3DSM3() const
474{
475 std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
476 return isD3D9() || isD3D11_FL93();
477}
478
Ian Ewell292f0052016-02-04 10:37:32 -0500479bool ANGLETest::isOSX() const
480{
481#ifdef __APPLE__
482 return true;
483#else
484 return false;
485#endif
486}
487
Jamie Madillc3b9b262015-01-30 14:00:51 -0500488EGLint ANGLETest::getPlatformRenderer() const
489{
Jamie Madillf6859912015-01-30 17:05:35 -0500490 assert(mEGLWindow);
491 return mEGLWindow->getPlatform().renderer;
Jamie Madillc3b9b262015-01-30 14:00:51 -0500492}
493
Austin Kinrossd544cc92016-01-11 15:26:42 -0800494void ANGLETest::ignoreD3D11SDKLayersWarnings()
495{
496 // Some tests may need to disable the D3D11 SDK Layers Warnings checks
497 mIgnoreD3D11SDKLayersWarnings = true;
498}
499
Geoff Lang0d3683c2014-10-23 11:08:16 -0400500OSWindow *ANGLETest::mOSWindow = NULL;
501
502void ANGLETestEnvironment::SetUp()
503{
504 if (!ANGLETest::InitTestWindow())
505 {
506 FAIL() << "Failed to create ANGLE test window.";
507 }
508}
509
510void ANGLETestEnvironment::TearDown()
511{
512 ANGLETest::DestroyTestWindow();
513}