Commit 3cd438d1 by Jamie Madill

Add dEQP tests.

We integrate dEQP as a console application and a shared library which runs all of the test logic. Using a shared library lets us compile dEQP with all the specific compiler options it needs, without conflicting with the compile settings in ANGLE proper. Currently we only support Windows D3D11, ES 2 and 3. We can add other targets in the future. We also have a few bugs preventing us from running the test suite in full. We run into infinite loop problems in some shader tests, and have crashes or UNIMPLEMENTED in others. BUG=angleproject:901 Change-Id: Ib6fe66041a6fe547eb2cba497c52de7fd080d667 Reviewed-on: https://chromium-review.googlesource.com/238084Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f9c7a67b
...@@ -35,3 +35,4 @@ Makefile ...@@ -35,3 +35,4 @@ Makefile
*~ *~
.gclient .gclient
angle_internal angle_internal
TestResults.qpa
...@@ -9,6 +9,15 @@ deps = { ...@@ -9,6 +9,15 @@ deps = {
"src/tests/third_party/googlemock": "src/tests/third_party/googlemock":
"http://googlemock.googlecode.com/svn/trunk@410", "http://googlemock.googlecode.com/svn/trunk@410",
"src/tests/third_party/deqp":
"https://android.googlesource.com/platform/external/deqp@c7661bcd3bcec04b1abf6c3b290c4150db565604",
"src/tests/third_party/libpng":
"https://android.googlesource.com/platform/external/libpng@094e181e79a3d6c23fd005679025058b7df1ad6c",
"src/tests/third_party/zlib":
"https://chromium.googlesource.com/chromium/src/third_party/zlib@afd8c4593c010c045902f6c0501718f1823064a3",
} }
hooks = [ hooks = [
......
//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// deqp_libtester_main.cpp: Entry point for tester DLL.
// Located in tcuMain.cc in dEQP's soruces.
int main(int argc, const char* argv[]);
// Exported to the tester app.
__declspec(dllexport) int deqp_libtester_main(int argc, const char *argv[])
{
return main(argc, argv);
}
//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angle_deqp_tests_main.cpp: Entry point for ANGLE's dEQP tests.
#include <direct.h>
#include <stdio.h>
__declspec(dllimport) int deqp_libtester_main(int argc, const char* argv[]);
int main(int argc, const char* argv[])
{
const char * data_dir = ANGLE_DEQP_DIR "/data";
if (_chdir(data_dir) != 0)
{
printf("Error setting working directory\n");
}
deqp_libtester_main(argc, argv);
}
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
#define TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
#include "tcuDefs.hpp"
#include "egluNativeDisplay.hpp"
#include "eglwDefs.hpp"
#include "tcuWin32API.h"
namespace tcu
{
class ANGLEWin32NativeDisplayFactory : public eglu::NativeDisplayFactory
{
public:
ANGLEWin32NativeDisplayFactory(HINSTANCE instance);
~ANGLEWin32NativeDisplayFactory() override;
eglu::NativeDisplay *createDisplay(const eglw::EGLAttrib* attribList) const override;
private:
const HINSTANCE mInstance;
};
} // tcu
#endif // TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include "tcuANGLEWin32Platform.h"
#include "tcuANGLEWin32NativeDisplayFactory.h"
#include "egluGLContextFactory.hpp"
namespace tcu
{
ANGLEWin32Platform::ANGLEWin32Platform()
: mInstance(GetModuleHandle(nullptr))
{
// Set process priority to lower.
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
m_nativeDisplayFactoryRegistry.registerFactory(new ANGLEWin32NativeDisplayFactory(mInstance));
m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
}
ANGLEWin32Platform::~ANGLEWin32Platform()
{
}
bool ANGLEWin32Platform::processEvents()
{
MSG msg;
while (PeekMessage(&msg, reinterpret_cast<HWND>(-1), 0, 0, PM_REMOVE))
{
DispatchMessage(&msg);
if (msg.message == WM_QUIT)
return false;
}
return true;
}
} // tcu
// Create platform
tcu::Platform *createPlatform()
{
return new tcu::ANGLEWin32Platform();
}
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef TCU_ANGLE_WIN32_PLATFORM_H_
#define TCU_ANGLE_WIN32_PLATFORM_H_
#include "tcuDefs.hpp"
#include "tcuPlatform.hpp"
#include "gluPlatform.hpp"
#include "tcuWin32API.h"
#ifndef _EGLUPLATFORM_HPP
# include "egluPlatform.hpp"
#endif
namespace tcu
{
class ANGLEWin32Platform : public tcu::Platform,
private glu::Platform,
private eglu::Platform
{
public:
ANGLEWin32Platform();
~ANGLEWin32Platform();
bool processEvents() override;
const glu::Platform &getGLPlatform() const override { return static_cast<const glu::Platform&>(*this); }
const eglu::Platform &getEGLPlatform() const override { return static_cast<const eglu::Platform&>(*this); }
private:
HINSTANCE mInstance;
};
} // tcu
#endif // TCU_ANGLE_WIN32_PLATFORM_H_
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes':
[
'deqp.gypi',
],
'variables': 'variables':
{ {
'angle_build_conformance_tests%': '0', 'angle_build_conformance_tests%': '0',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment