Vulkan: Don't allow creation of ES3 contexts.
Refactor RendererVk::getMaxSupportedESVersion to limit max supported versions
similar to RendererGL.
This allows dEQP-EGL.functional.robustness.reset_context.shaders.infinite_loop.*
tests to pass but they are currently skipped due to TDR issues on some
platforms.
When we start to test on top of ES3 contexts, we will either have to supress
some dEQP EGL tests or expose it some other mechanism.
BUG=angleproject:3058
Change-Id: I8d28fe75edd8346b46d197e0217afbee1c19b7e3
Reviewed-on: https://chromium-review.googlesource.com/c/1409869
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 4a10454..8916ad1 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -1055,15 +1055,17 @@
gl::Version RendererVk::getMaxSupportedESVersion() const
{
- // Declare GLES2 support if necessary features for GLES3 are missing
- bool necessaryFeaturesForES3 = mPhysicalDeviceFeatures.inheritedQueries;
+ // Current highest supported version
+ // TODO: Update this to support ES 3.0. http://crbug.com/angleproject/2950
+ gl::Version maxVersion = gl::Version(2, 0);
- if (!necessaryFeaturesForES3)
+ // Vulkan inherited queries are required to support any GL query type
+ if (!mPhysicalDeviceFeatures.inheritedQueries)
{
- return gl::Version(2, 0);
+ maxVersion = std::max(maxVersion, gl::Version(2, 0));
}
- return gl::Version(3, 0);
+ return maxVersion;
}
void RendererVk::initFeatures(const std::vector<VkExtensionProperties> &deviceExtensionProps)