зеркало из https://github.com/AvaloniaUI/angle.git
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:
Родитель
650f2274b1
Коммит
2031e2153f
7
BUILD.gn
7
BUILD.gn
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче