Infra: Enable angle_deqp_gl46_tests on SwiftShader

This change disables the WGL frontend by default on
Windows when building ANGLE for desktop GL. This
is because the WGL frontend is not yet fully
implemented and it causes some of the trace tests to
fail. The WGL frontend should be enabled by default on
windows when more of its functionality gets implemented.

Test: angle_deqp_gl46_tests --use-angle=swiftshader
Bug: angleproject:7566
Bug: angleproject:7628
Change-Id: I69c695eb56d3858f715eeb86d28cc805e25c60eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858142
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Eddie Hatfield 2022-08-09 14:02:59 -06:00 коммит произвёл Angle LUCI CQ
Родитель 80f6a63afc
Коммит 3960e63b1a
36 изменённых файлов: 2701 добавлений и 87 удалений

Просмотреть файл

@ -1307,7 +1307,7 @@ template("angle_libGLESv2") {
if (angle_enable_gl_desktop_frontend) {
sources += libglesv2_gl_sources
defines += [ "ANGLE_ENABLE_GL_DESKTOP_FRONTEND" ]
if (is_win) {
if (angle_expose_wgl_entry_points) {
sources += [
"src/libGLESv2/entry_points_wgl.cpp",
"src/libGLESv2/entry_points_wgl.h",
@ -1315,13 +1315,15 @@ template("angle_libGLESv2") {
"src/libGLESv2/proc_table_wgl_autogen.cpp",
]
defines += [ "ANGLE_EXPOSE_WGL_ENTRY_POINTS" ]
} else {
} else if (angle_expose_glx_entry_points) {
sources += [
"src/libGLESv2/entry_points_glx.cpp",
"src/libGLESv2/entry_points_glx.h",
"src/libGLESv2/proc_table_glx.h",
"src/libGLESv2/proc_table_glx_autogen.cpp",
]
} else {
#TODO(http://anglebug.com/7533): Add CGL entry points for mac support
}
}
@ -1330,10 +1332,12 @@ template("angle_libGLESv2") {
}
if (is_win) {
sources += [
"src/libGLESv2/${invoker.output_name}_autogen.def",
"src/libGLESv2/libGLESv2.rc",
]
if (angle_expose_wgl_entry_points) {
sources += [ "src/libGLESv2/opengl32_with_wgl_autogen.def" ]
} else {
sources += [ "src/libGLESv2/${invoker.output_name}_autogen.def" ]
}
sources += [ "src/libGLESv2/libGLESv2.rc" ]
deps += [ ":angle_version" ]
}
}
@ -1377,7 +1381,7 @@ angle_static_library("libGLESv2_static") {
if (angle_enable_gl_desktop_frontend) {
sources += libglesv2_gl_sources
defines = [ "ANGLE_ENABLE_GL_DESKTOP_FRONTEND" ]
if (is_win) {
if (angle_expose_wgl_entry_points) {
sources += [
"src/libGLESv2/entry_points_wgl.cpp",
"src/libGLESv2/entry_points_wgl.h",
@ -1385,13 +1389,15 @@ angle_static_library("libGLESv2_static") {
"src/libGLESv2/proc_table_wgl_autogen.cpp",
]
defines += [ "ANGLE_EXPOSE_WGL_ENTRY_POINTS" ]
} else {
} else if (angle_expose_glx_entry_points) {
sources += [
"src/libGLESv2/entry_points_glx.cpp",
"src/libGLESv2/entry_points_glx.h",
"src/libGLESv2/proc_table_glx.h",
"src/libGLESv2/proc_table_glx_autogen.cpp",
]
} else {
#TODO(http://anglebug.com/7533): Add CGL entry points for mac support
}
}
if (angle_enable_cl) {
@ -1478,6 +1484,10 @@ angle_shared_library("libEGL") {
deps += [ ":angle_version" ]
}
if (angle_enable_gl_desktop_frontend) {
defines += [ "ANGLE_ENABLE_GL_DESKTOP_FRONTEND" ]
}
public_deps = [ ":includes" ]
data_deps = [ ":libGLESv2" ]

Просмотреть файл

@ -30,10 +30,13 @@ declare_args() {
}
declare_args() {
# Expose WGL entry points by default when using Desktop GL on Windows
angle_expose_wgl_entry_points = angle_enable_gl_desktop_frontend && is_win
# Expose WGL entry points, which is necessary for running windows desktop GL applications against ANGLE.
# TODO(http://anglebug.com/7628): This condition should be `angle_enable_gl_desktop_frontend && is_win`
# This is disabled by default on Windows because it was causing some test failures. Once the WGL frontend
# has more functionality implemented, we can re-enable this.
angle_expose_wgl_entry_points = false
# Expose GLX entry points by default when using Desktop GL on Linux
# Expose GLX entry points by default when using Desktop GL on Linux.
angle_expose_glx_entry_points = angle_enable_gl_desktop_frontend && is_linux
}

Просмотреть файл

@ -1903,6 +1903,36 @@
"test_id_prefix": "ninja://src/tests:angle_deqp_egl_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gl46_tests",
"--use-angle=swiftshader",
"--bot-mode",
"--xvfb"
],
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"swarming": {
"can_use_on_swarming_builders": true,
"containment_type": "AUTO",
"dimension_sets": [
{
"cpu": "x86-64",
"gpu": "none",
"os": "Ubuntu-18.04",
"pool": "chromium.tests.gpu"
}
],
"hard_timeout": 900,
"io_timeout": 900,
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "angle_deqp_gl46_tests",
"test_id_prefix": "ninja://src/tests:angle_deqp_gl46_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gles2_tests",
@ -2399,6 +2429,36 @@
"test_id_prefix": "ninja://src/tests:angle_deqp_egl_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gl46_tests",
"--use-angle=swiftshader",
"--bot-mode",
"--xvfb"
],
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"swarming": {
"can_use_on_swarming_builders": true,
"containment_type": "AUTO",
"dimension_sets": [
{
"cpu": "x86-64",
"gpu": "none",
"os": "Ubuntu-18.04",
"pool": "chromium.tests.gpu"
}
],
"hard_timeout": 900,
"io_timeout": 900,
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "angle_deqp_gl46_tests",
"test_id_prefix": "ninja://src/tests:angle_deqp_gl46_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gles2_tests",
@ -3103,6 +3163,36 @@
"test_id_prefix": "ninja://src/tests:angle_deqp_egl_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gl46_tests",
"--use-angle=swiftshader",
"--bot-mode",
"--xvfb"
],
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"swarming": {
"can_use_on_swarming_builders": true,
"containment_type": "AUTO",
"dimension_sets": [
{
"cpu": "x86-64",
"gpu": "none",
"os": "Ubuntu-18.04",
"pool": "chromium.tests.gpu"
}
],
"hard_timeout": 900,
"io_timeout": 900,
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "angle_deqp_gl46_tests",
"test_id_prefix": "ninja://src/tests:angle_deqp_gl46_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gles2_tests",
@ -5067,6 +5157,35 @@
"test_id_prefix": "ninja://src/tests:angle_deqp_egl_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gl46_tests",
"--use-angle=swiftshader",
"--bot-mode"
],
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"swarming": {
"can_use_on_swarming_builders": true,
"containment_type": "AUTO",
"dimension_sets": [
{
"cpu": "x86-64",
"gpu": "none",
"os": "Windows-10",
"pool": "chromium.tests.gpu"
}
],
"hard_timeout": 900,
"io_timeout": 900,
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "angle_deqp_gl46_tests",
"test_id_prefix": "ninja://src/tests:angle_deqp_gl46_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gles2_tests",
@ -5609,6 +5728,35 @@
"test_id_prefix": "ninja://src/tests:angle_deqp_egl_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gl46_tests",
"--use-angle=swiftshader",
"--bot-mode"
],
"merge": {
"args": [],
"script": "//testing/merge_scripts/standard_isolated_script_merge.py"
},
"swarming": {
"can_use_on_swarming_builders": true,
"containment_type": "AUTO",
"dimension_sets": [
{
"cpu": "x86-64",
"gpu": "none",
"os": "Windows-10",
"pool": "chromium.tests.gpu"
}
],
"hard_timeout": 900,
"io_timeout": 900,
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test": "angle_deqp_gl46_tests",
"test_id_prefix": "ninja://src/tests:angle_deqp_gl46_tests/",
"use_isolated_scripts_api": true
},
{
"args": [
"angle_deqp_gles2_tests",

Просмотреть файл

@ -53,23 +53,23 @@
# is not necessarily so (i.e., we might have mac, win, and linux
# bots all using the 'release_bot' config).
'configs': {
'angle_asan_bot': ['angle', 'opencl', 'traces', 'goma', 'asan', 'release'],
'angle_asan_bot': ['angle', 'opencl', 'traces', 'goma', 'asan', 'release', 'desktop'],
'angle_goma_android_arm64_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'android', 'arm64', 'debug'],
'angle_goma_android_arm64_release_bot': ['angle', 'opencl', 'traces', 'goma', 'android', 'arm64', 'release'],
'angle_goma_android_arm_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'android', 'arm', 'debug'],
'angle_goma_android_arm_release_bot': ['angle', 'opencl', 'traces', 'goma', 'android', 'arm', 'release'],
'angle_goma_android_perf_bot': ['angle', 'traces', 'goma', 'android', 'arm64', 'perf'],
'angle_goma_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'debug'],
'angle_goma_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'debug', 'desktop'],
'angle_goma_perf_bot': ['angle', 'traces', 'goma', 'perf'],
'angle_goma_release_bot': ['angle', 'opencl', 'traces', 'goma', 'release'],
'angle_goma_x86_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'x86', 'debug'],
'angle_goma_x86_release_bot': ['angle', 'opencl', 'traces', 'goma', 'x86', 'release'],
'angle_non_clang_debug_bot': ['angle', 'opencl', 'non_clang', 'debug'],
'angle_non_clang_release_bot': ['angle', 'opencl', 'non_clang', 'release'],
'angle_goma_release_bot': ['angle', 'opencl', 'traces', 'goma', 'release', 'desktop'],
'angle_goma_x86_debug_bot': ['angle', 'opencl', 'traces', 'goma', 'x86', 'debug', 'desktop'],
'angle_goma_x86_release_bot': ['angle', 'opencl', 'traces', 'goma', 'x86', 'release', 'desktop'],
'angle_non_clang_debug_bot': ['angle', 'opencl', 'non_clang', 'debug', 'desktop'],
'angle_non_clang_release_bot': ['angle', 'opencl', 'non_clang', 'release', 'desktop'],
'angle_non_clang_x86_debug_bot': ['angle', 'opencl', 'non_clang', 'x86', 'debug'],
'angle_non_clang_x86_release_bot': ['angle', 'opencl', 'non_clang', 'x86', 'release'],
'angle_tsan_bot': ['angle', 'opencl', 'traces', 'goma', 'tsan', 'release'],
'angle_ubsan_bot': ['angle', 'opencl', 'traces', 'goma', 'ubsan', 'release'],
'angle_tsan_bot': ['angle', 'opencl', 'traces', 'goma', 'tsan', 'release', 'desktop'],
'angle_ubsan_bot': ['angle', 'opencl', 'traces', 'goma', 'ubsan', 'release', 'desktop'],
'angle_winuwp_non_clang_debug_bot': ['angle', 'winuwp', 'non_clang', 'debug'],
'angle_winuwp_non_clang_release_bot': ['angle', 'winuwp', 'non_clang', 'release'],
},
@ -95,6 +95,9 @@
'debug': {
'gn_args': 'is_debug=true',
},
'desktop': {
'gn_args': 'angle_enable_gl_desktop_frontend=true',
},
'goma': {
'gn_args': 'use_goma=true',
},

Просмотреть файл

@ -31,6 +31,11 @@
"script": "//scripts/run_gtest_angle_test.py",
"type": "script",
},
"angle_deqp_gl46_tests": {
"label": "//src/tests:angle_deqp_gl46_tests",
"script": "//scripts/run_gtest_angle_test.py",
"type": "script",
},
"angle_deqp_gles2_tests": {
"label": "//src/tests:angle_deqp_gles2_tests",
"script": "//scripts/run_gtest_angle_test.py",

Просмотреть файл

@ -821,6 +821,20 @@
},
},
'swangle_deqp_gl46_tests': {
'angle_deqp_gl46_tests': {
'args': [
'angle_deqp_gl46_tests',
'--use-angle=swiftshader',
'--bot-mode',
],
'linux_args': [
'--xvfb',
],
'use_isolated_scripts_api': True,
},
},
'swangle_deqp_gles2_slow_tests': {
'angle_deqp_gles2_tests': {
'args': [
@ -1180,6 +1194,7 @@
'swangle_gtests': [
'swangle_deqp_egl_tests',
'swangle_deqp_gl46_tests',
'swangle_deqp_gles2_tests',
'swangle_deqp_gles31_rotate180_tests',
'swangle_deqp_gles31_rotate270_tests',

Просмотреть файл

@ -1,10 +1,10 @@
{
"scripts/gen_vk_gl_cts_build.py":
"8abffec79db397a338cd1e7479150070",
"24739596e62c08ed31dbd22a5b8e77be",
"src/tests/deqp_support/BUILD.gn":
"235621d23c9fc11885f6a29541679898",
"src/tests/deqp_support/deqp_data_autogen.gni":
"a0682f2bfc3f3dadfbcee16ab727ca64",
"66f7f626b3f33cd2aaaceb0592680be9",
"third_party/VK-GL-CTS/src/CMakeLists.txt":
"a67323a0062016d215a0a219272ec139",
"third_party/VK-GL-CTS/src/execserver/CMakeLists.txt":

Просмотреть файл

@ -6,7 +6,7 @@
"scripts/entry_point_packed_gl_enums.json":
"413cb2b6fb98a4465d50d59d55757cf3",
"scripts/generate_entry_points.py":
"b90b38e9891bfef0922702ff0ae101cd",
"63853a09d94fcc2fbf07467836b680ad",
"scripts/gl.xml":
"c79f59912f42e96ea958dddb5e029d47",
"scripts/gl_angle_ext.xml":

Просмотреть файл

@ -1,6 +1,6 @@
{
"infra/specs/angle.json":
"5122739559cc6f92a36a99c81a1d8cfd",
"7776dc30a62c7c3c83ddb601231161d0",
"infra/specs/generate_test_spec_json.py":
"be4569626aa91f8872664e2d9cef4ac2",
"infra/specs/mixins.pyl":
@ -8,7 +8,7 @@
"infra/specs/test_suite_exceptions.pyl":
"a68dc6291f827463cca5fb8101999325",
"infra/specs/test_suites.pyl":
"aa45ad51d12ab4bd9217778404d7ad31",
"2a7d7b099e98e57e2cf3653ee5104d82",
"infra/specs/variants.pyl":
"8cfcaa99fa07ad2a2d5d14f220fd5037",
"infra/specs/waterfalls.pyl":

Просмотреть файл

@ -22,7 +22,6 @@ def initDataDirectories(dataDirectories):
dataDirectories.append(os.path.join("external", "openglcts", "data", "gles3"))
dataDirectories.append(os.path.join("external", "openglcts", "data", "gles31"))
dataDirectories.append(os.path.join("external", "openglcts", "data", "gles32"))
dataDirectories.append(os.path.join("external", "openglcts", "data", "gl46"))
def initPathReplacements(pathReplacements):

Просмотреть файл

@ -3255,8 +3255,9 @@ def main():
for lib in ["libGLESv2" + suffix for suffix in ["", "_no_capture", "_with_capture"]]:
write_windows_def_file(everything, lib, lib, "libGLESv2", libgles_ep_exports)
write_windows_def_file(everything, "opengl32", "opengl32", "libGLESv2",
write_windows_def_file(everything, "opengl32_with_wgl", "opengl32", "libGLESv2",
libgl_ep_exports + sorted(wgl_commands))
write_windows_def_file(everything, "opengl32", "opengl32", "libGLESv2", libgl_ep_exports)
write_windows_def_file("egl.xml and egl_angle_ext.xml", "libEGL", "libEGL", "libEGL",
libegl_windows_def_exports)

Просмотреть файл

@ -151,8 +151,12 @@ Version GetClientVersion(egl::Display *display,
{
if (clientType == EGL_OPENGL_API)
{
return std::max(display->getImplementation()->getMaxSupportedDesktopVersion(),
requestedVersion);
Optional<gl::Version> maxSupportedDesktopVersion =
display->getImplementation()->getMaxSupportedDesktopVersion();
if (maxSupportedDesktopVersion.valid())
return std::max(maxSupportedDesktopVersion.value(), requestedVersion);
else
return requestedVersion;
}
else if (requestedVersion.major == 1)
{

Просмотреть файл

@ -1035,6 +1035,7 @@ Error Display::initialize()
initDisplayExtensions();
initVendorString();
initVersionString();
initClientAPIString();
// Populate the Display's EGLDeviceEXT if the Display wasn't created using one
if (mPlatform == EGL_PLATFORM_DEVICE_EXT)
@ -2177,6 +2178,19 @@ void Display::initVersionString()
mVersionString = mImplementation->getVersionString(true);
}
void Display::initClientAPIString()
{
// If the max supported desktop version is not None, we support a desktop GL frontend.
if (mImplementation->getMaxSupportedDesktopVersion().valid())
{
mClientAPIString = "OpenGL_ES OpenGL";
}
else
{
mClientAPIString = "OpenGL_ES";
}
}
void Display::initializeFrontendFeatures()
{
// Enable on all Impls
@ -2218,6 +2232,11 @@ const std::string &Display::getVersionString() const
return mVersionString;
}
const std::string &Display::getClientAPIString() const
{
return mClientAPIString;
}
std::string Display::getBackendRendererDescription() const
{
return mImplementation->getRendererDescription();

Просмотреть файл

@ -264,6 +264,7 @@ class Display final : public LabeledObject,
const std::string &getExtensionString() const;
const std::string &getVendorString() const;
const std::string &getVersionString() const;
const std::string &getClientAPIString() const;
std::string getBackendRendererDescription() const;
std::string getBackendVendorString() const;
@ -344,6 +345,7 @@ class Display final : public LabeledObject,
void initDisplayExtensions();
void initVendorString();
void initVersionString();
void initClientAPIString();
void initializeFrontendFeatures();
angle::ScratchBuffer requestScratchBufferImpl(std::vector<angle::ScratchBuffer> *bufferVector);
@ -390,6 +392,7 @@ class Display final : public LabeledObject,
std::string mVendorString;
std::string mVersionString;
std::string mClientAPIString;
Device *mDevice;
Surface *mSurface;

Просмотреть файл

@ -15,9 +15,11 @@
namespace gl
{
const char kUnknownGLenumString[] = "EnumUnknown";
namespace
{
void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int value)
template <typename EnumType>
void OutputGLenumStringImpl(std::ostream &out, EnumType enumGroup, unsigned int value)
{
const char *enumStr = GLenumToString(enumGroup, value);
if (enumStr != kUnknownGLenumString)
@ -26,7 +28,7 @@ void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int valu
return;
}
if (enumGroup == GLESEnum::Boolean)
if (enumGroup == EnumType::Boolean)
{
// If an unknown enum was submitted as GLboolean, just write out the value.
if (enumStr == kUnknownGLenumString)
@ -41,10 +43,10 @@ void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int valu
return;
}
if (enumGroup != GLESEnum::AllEnums)
if (enumGroup != EnumType::AllEnums)
{
// Retry with the "Default" group
enumStr = GLenumToString(GLESEnum::AllEnums, value);
enumStr = GLenumToString(EnumType::AllEnums, value);
if (enumStr != kUnknownGLenumString)
{
out << enumStr;
@ -55,17 +57,8 @@ void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int valu
out << std::hex << "0x" << std::setfill('0') << std::setw(4) << value << std::dec;
}
void OutputGLbitfieldString(std::ostream &out, GLESEnum enumGroup, unsigned int value)
{
out << GLbitfieldToString(enumGroup, value);
}
const char *GLbooleanToString(unsigned int value)
{
return GLenumToString(GLESEnum::Boolean, value);
}
std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value)
template <typename EnumType>
std::string GLbitfieldToStringImpl(EnumType enumGroup, unsigned int value)
{
std::stringstream st;
@ -90,6 +83,39 @@ std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value)
return st.str();
}
} // namespace
const char kUnknownGLenumString[] = "EnumUnknown";
void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int value)
{
return OutputGLenumStringImpl(out, enumGroup, value);
}
void OutputGLenumString(std::ostream &out, BigGLEnum enumGroup, unsigned int value)
{
return OutputGLenumStringImpl(out, enumGroup, value);
}
void OutputGLbitfieldString(std::ostream &out, GLESEnum enumGroup, unsigned int value)
{
out << GLbitfieldToString(enumGroup, value);
}
const char *GLbooleanToString(unsigned int value)
{
return GLenumToString(GLESEnum::Boolean, value);
}
std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value)
{
return GLbitfieldToStringImpl(enumGroup, value);
}
std::string GLbitfieldToString(BigGLEnum enumGroup, unsigned int value)
{
return GLbitfieldToStringImpl(enumGroup, value);
}
const char *GLinternalFormatToString(unsigned int format)
{

Просмотреть файл

@ -20,7 +20,9 @@ const char *GLbooleanToString(unsigned int value);
const char *GLenumToString(GLESEnum enumGroup, unsigned int value);
const char *GLenumToString(BigGLEnum enumGroup, unsigned int value);
std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value);
std::string GLbitfieldToString(BigGLEnum enumGroup, unsigned int value);
void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int value);
void OutputGLenumString(std::ostream &out, BigGLEnum enumGroup, unsigned int value);
void OutputGLbitfieldString(std::ostream &out, GLESEnum enumGroup, unsigned int value);
const char *GLinternalFormatToString(unsigned int format);

Просмотреть файл

@ -9,6 +9,7 @@
#ifndef LIBANGLE_RENDERER_DISPLAYIMPL_H_
#define LIBANGLE_RENDERER_DISPLAYIMPL_H_
#include "common/Optional.h"
#include "common/angleutils.h"
#include "libANGLE/Caps.h"
#include "libANGLE/Config.h"
@ -104,11 +105,8 @@ class DisplayImpl : public EGLImplFactory, public angle::Subject
virtual egl::Error waitNative(const gl::Context *context, EGLint engine) = 0;
virtual gl::Version getMaxSupportedESVersion() const = 0;
virtual gl::Version getMaxConformantESVersion() const = 0;
gl::Version getMaxSupportedDesktopVersion() const
{
// TODO(eddiehatfield): We should make this virtual and implement for all backends.
return {4, 6};
}
// If desktop GL is not supported in any capacity for a given backend, this returns None.
virtual Optional<gl::Version> getMaxSupportedDesktopVersion() const = 0;
const egl::Caps &getCaps() const;
virtual void setBlobCacheFuncs(EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get) {}

Просмотреть файл

@ -429,6 +429,11 @@ gl::Version DisplayD3D::getMaxConformantESVersion() const
return mRenderer->getMaxConformantESVersion();
}
Optional<gl::Version> DisplayD3D::getMaxSupportedDesktopVersion() const
{
return Optional<gl::Version>::Invalid();
}
void DisplayD3D::handleResult(HRESULT hr,
const char *message,
const char *file,

Просмотреть файл

@ -92,6 +92,7 @@ class DisplayD3D : public DisplayImpl, public d3d::Context
egl::Error waitNative(const gl::Context *context, EGLint engine) override;
gl::Version getMaxSupportedESVersion() const override;
gl::Version getMaxConformantESVersion() const override;
Optional<gl::Version> getMaxSupportedDesktopVersion() const override;
void handleResult(HRESULT hr,
const char *message,

Просмотреть файл

@ -157,6 +157,11 @@ gl::Version DisplayGL::getMaxConformantESVersion() const
return std::min(getMaxSupportedESVersion(), gl::Version(3, 0));
}
Optional<gl::Version> DisplayGL::getMaxSupportedDesktopVersion() const
{
return Optional<gl::Version>::Invalid();
}
void DisplayGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
{
// Advertise robust resource initialization on all OpenGL backends for testing even though it is

Просмотреть файл

@ -55,6 +55,7 @@ class DisplayGL : public DisplayImpl
gl::Context *context) override;
gl::Version getMaxConformantESVersion() const override;
Optional<gl::Version> getMaxSupportedDesktopVersion() const override;
virtual RendererGL *getRenderer() const = 0;

Просмотреть файл

@ -91,6 +91,7 @@ class DisplayMtl : public DisplayImpl
const egl::AttributeMap &attribs) override;
gl::Version getMaxSupportedESVersion() const override;
gl::Version getMaxConformantESVersion() const override;
Optional<gl::Version> getMaxSupportedDesktopVersion() const override;
EGLSyncImpl *createSync(const egl::AttributeMap &attribs) override;

Просмотреть файл

@ -427,6 +427,11 @@ gl::Version DisplayMtl::getMaxConformantESVersion() const
return std::min(getMaxSupportedESVersion(), gl::Version(3, 0));
}
Optional<gl::Version> DisplayMtl::getMaxSupportedDesktopVersion() const
{
return Optional<gl::Version>::Invalid();
}
EGLSyncImpl *DisplayMtl::createSync(const egl::AttributeMap &attribs)
{
return new EGLSyncMtl(attribs);

Просмотреть файл

@ -142,6 +142,11 @@ gl::Version DisplayNULL::getMaxSupportedESVersion() const
return gl::Version(3, 2);
}
Optional<gl::Version> DisplayNULL::getMaxSupportedDesktopVersion() const
{
return Optional<gl::Version>::Invalid();
}
gl::Version DisplayNULL::getMaxConformantESVersion() const
{
return getMaxSupportedESVersion();

Просмотреть файл

@ -50,6 +50,7 @@ class DisplayNULL : public DisplayImpl
egl::Error waitNative(const gl::Context *context, EGLint engine) override;
gl::Version getMaxSupportedESVersion() const override;
gl::Version getMaxConformantESVersion() const override;
Optional<gl::Version> getMaxSupportedDesktopVersion() const override;
SurfaceImpl *createWindowSurface(const egl::SurfaceState &state,
EGLNativeWindowType window,

Просмотреть файл

@ -211,6 +211,11 @@ gl::Version DisplayVk::getMaxConformantESVersion() const
return mRenderer->getMaxConformantESVersion();
}
Optional<gl::Version> DisplayVk::getMaxSupportedDesktopVersion() const
{
return gl::Version{4, 6};
}
egl::Error DisplayVk::validateImageClientBuffer(const gl::Context *context,
EGLenum target,
EGLClientBuffer clientBuffer,

Просмотреть файл

@ -177,6 +177,7 @@ class DisplayVk : public DisplayImpl, public vk::Context
gl::Version getMaxSupportedESVersion() const override;
gl::Version getMaxConformantESVersion() const override;
Optional<gl::Version> getMaxSupportedDesktopVersion() const override;
egl::Error validateImageClientBuffer(const gl::Context *context,
EGLenum target,

Просмотреть файл

@ -1214,14 +1214,14 @@ egl::Config GenerateDefaultConfig(DisplayVk *display,
const VkPhysicalDeviceProperties &physicalDeviceProperties =
renderer->getPhysicalDeviceProperties();
gl::Version maxSupportedESVersion = renderer->getMaxSupportedESVersion();
gl::Version maxSupportedDesktopVersion = display->getMaxSupportedDesktopVersion();
gl::Version maxSupportedESVersion = renderer->getMaxSupportedESVersion();
Optional<gl::Version> maxSupportedDesktopVersion = display->getMaxSupportedDesktopVersion();
// ES3 features are required to emulate ES1
EGLint es1Support = (maxSupportedESVersion.major >= 3 ? EGL_OPENGL_ES_BIT : 0);
EGLint es2Support = (maxSupportedESVersion.major >= 2 ? EGL_OPENGL_ES2_BIT : 0);
EGLint es3Support = (maxSupportedESVersion.major >= 3 ? EGL_OPENGL_ES3_BIT : 0);
EGLint desktopSupport = (maxSupportedDesktopVersion.major != 0 ? EGL_OPENGL_BIT : 0);
EGLint desktopSupport = (maxSupportedDesktopVersion.valid() ? EGL_OPENGL_BIT : 0);
egl::Config config;

Просмотреть файл

@ -2451,7 +2451,15 @@ bool ValidateCreateContext(const ValidationContext *val,
break;
case EGL_OPENGL_API:
// TODO: validate desktop OpenGL versions and profile mask
// The requested configuration must use EGL_OPENGL_BIT if EGL_OPENGL_BIT is the
// currently bound API.
if ((configuration != EGL_NO_CONFIG_KHR) &&
!(configuration->renderableType & EGL_OPENGL_BIT))
{
val->setError(EGL_BAD_CONFIG);
return false;
}
// TODO(http://anglebug.com/7533): validate desktop OpenGL versions and profile mask
break;
default:

Просмотреть файл

@ -544,7 +544,7 @@ const char *QueryString(Thread *thread, Display *display, EGLint name)
switch (name)
{
case EGL_CLIENT_APIS:
result = "OpenGL_ES";
result = display->getClientAPIString().c_str();
break;
case EGL_EXTENSIONS:
if (display == EGL_NO_DISPLAY)

Просмотреть файл

@ -2250,29 +2250,3 @@ EXPORTS
glMultiDrawElementsIndirectCount
glPolygonOffsetClamp
glSpecializeShader
; WGL 1.0
wglChoosePixelFormat
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
wglDescribeLayerPlane
wglDescribePixelFormat
wglGetCurrentContext
wglGetCurrentDC
wglGetEnhMetaFilePixelFormat
wglGetLayerPaletteEntries
wglGetPixelFormat
wglGetProcAddress
wglMakeCurrent
wglRealizeLayerPalette
wglSetLayerPaletteEntries
wglSetPixelFormat
wglShareLists
wglSwapBuffers
wglSwapLayerBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
wglUseFontOutlinesW

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1445,7 +1445,9 @@ if (build_angle_deqp_tests && !is_fuchsia) {
_android_mustpass = "$deqp_path/android/cts/main"
_aosp_mustpass =
"$deqp_path/external/openglcts/data/mustpass/gles/aosp_mustpass/main"
_khronos_mustpass =
_khronos_gl_mustpass =
"$deqp_path/external/openglcts/data/mustpass/gl/khronos_mustpass/main"
_khronos_gles_mustpass =
"$deqp_path/external/openglcts/data/mustpass/gles/khronos_mustpass/main"
angle_deqp_source_set("angle_deqp_gles2_common") {
@ -1563,18 +1565,23 @@ if (build_angle_deqp_tests && !is_fuchsia) {
if (api == "gles2") {
# Make sure we include something so that angle_deqp_libtester_main.cpp can find something.
data = [ "$root_gen_dir/vk_gl_cts_data/data/gles2/shaders/misc.test" ]
mustpass_dir = _khronos_gles_mustpass
} else if (api == "gles3") {
data = angle_deqp_external_openglcts_data_gles3
mustpass_dir = _khronos_gles_mustpass
} else if (api == "gles31") {
data = angle_deqp_external_openglcts_data_gles31
mustpass_dir = _khronos_gles_mustpass
} else if (api == "gles32") {
data = angle_deqp_external_openglcts_data_gles32
mustpass_dir = _khronos_gles_mustpass
} else if (api == "gl46") {
data = angle_deqp_external_openglcts_data_gl46
# Use this as a placeholder, the gl46 test suite does not need data
data = [ "$root_gen_dir/vk_gl_cts_data/data/gles2/shaders/misc.test" ]
mustpass_dir = _khronos_gl_mustpass
} else {
assert(false)
}
mustpass_dir = _khronos_mustpass
}
}
@ -1605,7 +1612,7 @@ if (build_angle_deqp_tests && !is_fuchsia) {
# The core Desktop GL CTS is in the same category as these KHR tests.
angle_deqp_khr_gtest("gl46") {
defines = [ "ANGLE_DEQP_GL_TESTS" ]
mustpass_name = "gl46-khr-master.txt"
mustpass_name = "gl46-master.txt"
api = "gl46"
}

Просмотреть файл

@ -497,8 +497,6 @@ angle_deqp_external_openglcts_data_gles32 = [
"$root_gen_dir/vk_gl_cts_data/data/gl_cts/data/gles32/compressed_texture/etc_sRGBA8_240x240_ref.bin",
]
angle_deqp_external_openglcts_data_gl46 = []
angle_deqp_data_copy_targets = [
"deqp_support:vk_gl_cts_data_data_gles2_data",
"deqp_support:vk_gl_cts_data_data_gles2_data_etc1",

Просмотреть файл

@ -148,6 +148,11 @@
5170 VULKAN LINUX : dEQP-EGL.functional.swap_buffers_with_damage.resize_after_swap.* = SKIP
5170 VULKAN LINUX : dEQP-EGL.functional.swap_buffers_with_damage.resize_before_swap.* = SKIP
// Tests that fail when the GL desktop frontend is enabled
// TODO(http://anglebug.com/7566): Get these tests to pass.
7533 : dEQP-EGL.functional.create_context_ext.gl_30.* = SKIP
7533 : dEQP-EGL.functional.create_context_ext.robust_gl_30.* = SKIP
//// Metal
6485 MAC METAL : dEQP-EGL.functional.multithread.pbuffer_single_window = SKIP

Просмотреть файл

@ -0,0 +1,78 @@
// Copyright 2022 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.
// See README.md for format.
7566 SWIFTSHADER : KHR-GL46.aggressive_optimizations.* = SKIP
7566 SWIFTSHADER : KHR-GL46.blend_equation_advanced.* = SKIP
7566 SWIFTSHADER : KHR-GL46.buffer_storage.* = SKIP
7566 SWIFTSHADER : KHR-GL46.clip_control.* = SKIP
7566 SWIFTSHADER : KHR-GL46.clip_distance.* = SKIP
7566 SWIFTSHADER : KHR-GL46.CommonBugs.* = SKIP
7566 SWIFTSHADER : KHR-GL46.compute_shader.* = SKIP
7566 SWIFTSHADER : KHR-GL46.conditional_render_inverted.* = SKIP
7566 SWIFTSHADER : KHR-GL46.constant_expressions.* = SKIP
7566 SWIFTSHADER : KHR-GL46.copy_image.* = SKIP
7566 SWIFTSHADER : KHR-GL46.cull_distance.* = SKIP
7566 SWIFTSHADER : KHR-GL46.direct_state_access.* = SKIP
7566 SWIFTSHADER : KHR-GL46.draw_indirect_43.* = SKIP
7566 SWIFTSHADER : KHR-GL46.draw_indirect.* = SKIP
7566 SWIFTSHADER : KHR-GL46.explicit_uniform_location.* = SKIP
7566 SWIFTSHADER : KHR-GL46.exposed_extensions.validate_extensions = SKIP
7566 SWIFTSHADER : KHR-GL46.geometry_shader.* = SKIP
7566 SWIFTSHADER : KHR-GL46.get_texture_sub_image.* = SKIP
7566 SWIFTSHADER : KHR-GL46.glsl_noperspective.functionaltest = SKIP
7566 SWIFTSHADER : KHR-GL46.gl_spirv.* = SKIP
7566 SWIFTSHADER : KHR-GL46.gpu_shader5.* = SKIP
7566 SWIFTSHADER : KHR-GL46.gpu_shader_fp64.fp64.state_query = SKIP
7566 SWIFTSHADER : KHR-GL46.incomplete_texture_access.sampler = SKIP
7566 SWIFTSHADER : KHR-GL46.indirect_parameters_tests.* = SKIP
7566 SWIFTSHADER : KHR-GL46.internalformat.* = SKIP
7566 SWIFTSHADER : KHR-GL46.layout_binding.* = SKIP
7566 SWIFTSHADER : KHR-GL46.layout_location.* = SKIP
7566 SWIFTSHADER : KHR-GL46.limits.* = SKIP
7566 SWIFTSHADER : KHR-GL46.map_buffer_alignment.query = SKIP
7566 SWIFTSHADER : KHR-GL46.multi_bind.* = SKIP
7566 SWIFTSHADER : KHR-GL46.nearest_edge.* = SKIP
7566 SWIFTSHADER : KHR-GL46.packed_depth_stencil.* = SKIP
7566 SWIFTSHADER : KHR-GL46.packed_pixels.* = SKIP
7566 SWIFTSHADER : KHR-GL46.pipeline_statistics_query_tests_ARB.* = SKIP
7566 SWIFTSHADER : KHR-GL46.pixelstoragemodes.* = SKIP
7566 SWIFTSHADER : KHR-GL46.polygon_offset_clamp.* = SKIP
7566 SWIFTSHADER : KHR-GL46.program_interface_query.* = SKIP
7566 SWIFTSHADER : KHR-GL46.sample_variables.mask.* = SKIP
7566 SWIFTSHADER : KHR-GL46.separable_programs_tf.* = SKIP
7566 SWIFTSHADER : KHR-GL46.sepshaderobjs.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_atomic_counter_ops_tests.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_atomic_counters.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_draw_parameters_tests.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_group_vote.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_image_load_store.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_image_size.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_multisample_interpolation.render.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shaders30.declarations.declarations.redeclare_gl_Frag* = SKIP
7566 SWIFTSHADER : KHR-GL46.shaders30.glsl_constructors.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shaders42.declarations.declarations.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shaders44.preprocessor.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shaders.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shader_storage_buffer_object.* = SKIP
7566 SWIFTSHADER : KHR-GL46.shading_language_420pack.* = SKIP
7566 SWIFTSHADER : KHR-GL46.spirv_extensions.* = SKIP
7566 SWIFTSHADER : KHR-GL46.stencil_texturing.* = SKIP
7566 SWIFTSHADER : KHR-GL46.sync.* = SKIP
7566 SWIFTSHADER : KHR-GL46.tessellation_shader.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_barrier.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_border_clamp.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_buffer.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_cube_map_array.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_filter_anisotropic.drawing = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_gather.* = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_size_promotion.functional = SKIP
7566 SWIFTSHADER : KHR-GL46.texture_swizzle.* = SKIP
7566 SWIFTSHADER : KHR-GL46.transform_feedback_overflow_query_ARB.* = SKIP
7566 SWIFTSHADER : KHR-GL46.transform_feedback.* = SKIP
7566 SWIFTSHADER : KHR-GL46.vertex_attrib_binding.* = SKIP
7566 SWIFTSHADER : KHR-GL46.viewport_array.* = SKIP
7566 SWIFTSHADER UBSAN : KHR-GL46.shader_bitfield_operation.bitfieldInsert.int_3 = SKIP