Fixes for Vulkan secondaries build.

Includes the defined name of the alternate library in every
build, so that platforms without Vulkan still have access to
the library name define.

Also fixes checks for the ANGLE driver in the tests to work
with the new secondaries enum. This will let developers run
trace tests with the vulkan secondaries library.

Bug: angleproject:6811
Change-Id: If3846d68e532238f0b1c1c506638867a23fb4357
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4076513
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Jamie Madill 2022-12-02 15:30:54 -05:00 коммит произвёл Angle LUCI CQ
Родитель 650f2274b1
Коммит 2031e2153f
4 изменённых файлов: 10 добавлений и 15 удалений

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

@ -1298,21 +1298,16 @@ _angle_glesv2_vulkan_secondaries_library_name =
config("library_name_config") {
_egllib = "libEGL${angle_libs_suffix}${_cr_suffix}"
_vk2egllib = "libEGL_vulkan_secondaries${angle_libs_suffix}${_cr_suffix}"
defines = [
"ANGLE_EGL_LIBRARY_NAME=\"${_egllib}\"",
"ANGLE_GLESV2_LIBRARY_NAME=\"${_angle_glesv2_library_name}\"",
"ANGLE_MESA_EGL_LIBRARY_NAME=\"mesa/src/egl/libEGL\"",
"ANGLE_MESA_GLESV2_LIBRARY_NAME=\"mesa/src/mapi/es2api/libGLESv2\"",
]
if (angle_enable_vulkan) {
_vk2egllib = "libEGL_vulkan_secondaries${angle_libs_suffix}${_cr_suffix}"
defines += [
"ANGLE_VULKAN_SECONDARIES_EGL_LIBRARY_NAME=\"${_vk2egllib}\"",
"ANGLE_VULKAN_SECONDARIES_GLESV2_LIBRARY_NAME=\"${_angle_glesv2_vulkan_secondaries_library_name}\"",
]
}
}
# This config controls export definitions on ANGLE API calls.
config("angle_static_config") {

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

@ -2278,7 +2278,7 @@ void RegisterTraceTests()
GLESDriverType driverType = GetDriverTypeFromString(gUseGL, GLESDriverType::AngleEGL);
GLenum platformType = EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE;
GLenum deviceType = EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE;
if (driverType == GLESDriverType::AngleEGL)
if (IsANGLE(driverType))
{
platformType = GetPlatformANGLETypeFromArg(gUseANGLE, EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE);
deviceType =

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

@ -33,6 +33,12 @@ enum class GLESDriverType
ZinkEGL,
};
inline bool IsANGLE(angle::GLESDriverType driverType)
{
return driverType == angle::GLESDriverType::AngleEGL ||
driverType == angle::GLESDriverType::AngleVulkanSecondariesEGL;
}
GLESDriverType GetDriverTypeFromString(const char *driverName, GLESDriverType defaultDriverType);
} // namespace angle

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

@ -19,12 +19,6 @@
namespace
{
bool IsANGLE(angle::GLESDriverType driverType)
{
return driverType == angle::GLESDriverType::AngleEGL ||
driverType == angle::GLESDriverType::AngleVulkanSecondariesEGL;
}
constexpr EGLint kDefaultSwapInterval = 1;
} // anonymous namespace