зеркало из https://github.com/AvaloniaUI/angle.git
GGP: Check and enable VK_GGP_frame_token
Bug: angleproject:4668 Change-Id: I9ecbdf37e206cb6eb93699091bbff70ad898040f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219032 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
2383f3449e
Коммит
209cf8fa40
|
@ -108,6 +108,12 @@ struct FeaturesVk : FeatureSetBase
|
||||||
"VkDevice supports the VK_ANDROID_external_memory_android_hardware_buffer extension",
|
"VkDevice supports the VK_ANDROID_external_memory_android_hardware_buffer extension",
|
||||||
&members};
|
&members};
|
||||||
|
|
||||||
|
// Whether the VkDevice supports the VK_GGP_frame_token extension, on which
|
||||||
|
// the EGL_ANGLE_swap_with_frame_token extension can be layered.
|
||||||
|
Feature supportsGGPFrameToken = {"supports_ggp_frame_token", FeatureCategory::VulkanFeatures,
|
||||||
|
"VkDevice supports the VK_GGP_frame_token extension",
|
||||||
|
&members};
|
||||||
|
|
||||||
// Whether the VkDevice supports the VK_KHR_external_memory_fd extension, on which the
|
// Whether the VkDevice supports the VK_KHR_external_memory_fd extension, on which the
|
||||||
// GL_EXT_memory_object_fd extension can be layered.
|
// GL_EXT_memory_object_fd extension can be layered.
|
||||||
Feature supportsExternalMemoryFd = {
|
Feature supportsExternalMemoryFd = {
|
||||||
|
|
|
@ -228,7 +228,7 @@ void DisplayVk::generateExtensions(egl::DisplayExtensions *outExtensions) const
|
||||||
|
|
||||||
#if defined(ANGLE_PLATFORM_GGP)
|
#if defined(ANGLE_PLATFORM_GGP)
|
||||||
outExtensions->ggpStreamDescriptor = true;
|
outExtensions->ggpStreamDescriptor = true;
|
||||||
outExtensions->swapWithFrameToken = true;
|
outExtensions->swapWithFrameToken = getRenderer()->getFeatures().supportsGGPFrameToken.enabled;
|
||||||
#endif // defined(ANGLE_PLATFORM_GGP)
|
#endif // defined(ANGLE_PLATFORM_GGP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1095,6 +1095,17 @@ angle::Result RendererVk::initializeDevice(DisplayVk *displayVk, uint32_t queueF
|
||||||
ASSERT(!getFeatures().supportsAndroidHardwareBuffer.enabled);
|
ASSERT(!getFeatures().supportsAndroidHardwareBuffer.enabled);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ANGLE_PLATFORM_GGP)
|
||||||
|
if (getFeatures().supportsGGPFrameToken.enabled)
|
||||||
|
{
|
||||||
|
enabledDeviceExtensions.push_back(VK_GGP_FRAME_TOKEN_EXTENSION_NAME);
|
||||||
|
}
|
||||||
|
ANGLE_VK_CHECK(displayVk, getFeatures().supportsGGPFrameToken.enabled,
|
||||||
|
VK_ERROR_EXTENSION_NOT_PRESENT);
|
||||||
|
#else
|
||||||
|
ASSERT(!getFeatures().supportsGGPFrameToken.enabled);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (getFeatures().supportsAndroidHardwareBuffer.enabled ||
|
if (getFeatures().supportsAndroidHardwareBuffer.enabled ||
|
||||||
getFeatures().supportsExternalMemoryFd.enabled ||
|
getFeatures().supportsExternalMemoryFd.enabled ||
|
||||||
getFeatures().supportsExternalMemoryFuchsia.enabled)
|
getFeatures().supportsExternalMemoryFuchsia.enabled)
|
||||||
|
@ -1597,6 +1608,12 @@ void RendererVk::initFeatures(DisplayVk *displayVk, const ExtensionNameList &dev
|
||||||
ExtensionFound(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, deviceExtensionNames));
|
ExtensionFound(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, deviceExtensionNames));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ANGLE_PLATFORM_GGP)
|
||||||
|
ANGLE_FEATURE_CONDITION(
|
||||||
|
&mFeatures, supportsGGPFrameToken,
|
||||||
|
ExtensionFound(VK_GGP_FRAME_TOKEN_EXTENSION_NAME, deviceExtensionNames));
|
||||||
|
#endif
|
||||||
|
|
||||||
ANGLE_FEATURE_CONDITION(
|
ANGLE_FEATURE_CONDITION(
|
||||||
&mFeatures, supportsExternalMemoryFd,
|
&mFeatures, supportsExternalMemoryFd,
|
||||||
ExtensionFound(VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, deviceExtensionNames));
|
ExtensionFound(VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, deviceExtensionNames));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче