Commit 610f2388 by Geoff Lang Committed by Commit Bot

Return backwards compatible context versions in Vulkan, GL and D3D11.

This allows us to pass some dEQP GLES 2.0 tests that require using an ES 3.0 context and matches native driver behaviour of returning a higher-than- requested context version when it's backwards compatible. BUG=angleproject:3425 BUG=angleproject:3300 BUG=angleproject:3715 BUG=angleproject:3243 BUG=angleproject:3240 BUG=angleproject:3716 Change-Id: I03dfd56deb6191c3363808717e0eea6fdcf5f3ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709111 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 901dd545
...@@ -3704,8 +3704,8 @@ gl::Version Renderer11::getMaxSupportedESVersion() const ...@@ -3704,8 +3704,8 @@ gl::Version Renderer11::getMaxSupportedESVersion() const
gl::Version Renderer11::getMaxConformantESVersion() const gl::Version Renderer11::getMaxConformantESVersion() const
{ {
// Always force a 2.0 context unless the user explicitly requests higher // 3.1 support is in progress.
return std::min(getMaxSupportedESVersion(), gl::Version(2, 0)); return std::min(getMaxSupportedESVersion(), gl::Version(3, 0));
} }
gl::DebugAnnotator *Renderer11::getAnnotator() gl::DebugAnnotator *Renderer11::getAnnotator()
......
...@@ -73,8 +73,8 @@ egl::Error DisplayGL::makeCurrent(egl::Surface *drawSurface, ...@@ -73,8 +73,8 @@ egl::Error DisplayGL::makeCurrent(egl::Surface *drawSurface,
gl::Version DisplayGL::getMaxConformantESVersion() const gl::Version DisplayGL::getMaxConformantESVersion() const
{ {
// Always force a 2.0 context unless the user explicitly requests higher // 3.1 support is in progress.
return std::min(getMaxSupportedESVersion(), gl::Version(2, 0)); return std::min(getMaxSupportedESVersion(), gl::Version(3, 0));
} }
void DisplayGL::generateExtensions(egl::DisplayExtensions *outExtensions) const void DisplayGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
......
...@@ -1139,8 +1139,8 @@ gl::Version RendererVk::getMaxSupportedESVersion() const ...@@ -1139,8 +1139,8 @@ gl::Version RendererVk::getMaxSupportedESVersion() const
gl::Version RendererVk::getMaxConformantESVersion() const gl::Version RendererVk::getMaxConformantESVersion() const
{ {
// Always force a 2.0 context unless the user explicitly requests higher // 3.0 is needed to pass all of dEQP GLES 2.0 tests despite it not being fully conformant.
return std::min(getMaxSupportedESVersion(), gl::Version(2, 0)); return std::min(getMaxSupportedESVersion(), gl::Version(3, 0));
} }
void RendererVk::initFeatures(const ExtensionNameList &deviceExtensionNames) void RendererVk::initFeatures(const ExtensionNameList &deviceExtensionNames)
......
...@@ -215,6 +215,10 @@ ...@@ -215,6 +215,10 @@
2546 ANDROID VULKAN : dEQP-EGL.functional.resize.pixel_density.* = SKIP 2546 ANDROID VULKAN : dEQP-EGL.functional.resize.pixel_density.* = SKIP
2546 ANDROID VULKAN : dEQP-EGL.functional.wide_color.window* = SKIP 2546 ANDROID VULKAN : dEQP-EGL.functional.wide_color.window* = SKIP
// Robustness failures on multiple platforms
3711 : dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds.reset_status.reads.* = FAIL
3711 : dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds.reset_status.writes.* = FAIL
// ES 1 tests // ES 1 tests
2306 WIN : dEQP-EGL.functional.color_clears.single_context.gles1* = FAIL 2306 WIN : dEQP-EGL.functional.color_clears.single_context.gles1* = FAIL
2306 WIN : dEQP-EGL.functional.color_clears.multi_context.gles1* = FAIL 2306 WIN : dEQP-EGL.functional.color_clears.multi_context.gles1* = FAIL
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
// Half float OES either has an implementation bug or a dEQP bug. // Half float OES either has an implementation bug or a dEQP bug.
3283 : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_half_float_oes = FAIL 3283 : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_half_float_oes = FAIL
3283 : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes = FAIL
// Shader failures. // Shader failures.
3434 NEXUS5X GLES : dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_* = FAIL 3434 NEXUS5X GLES : dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_* = FAIL
...@@ -261,8 +262,14 @@ ...@@ -261,8 +262,14 @@
// Nexus 5x failures // Nexus 5x failures
3309 NEXUS5X GLES : dEQP-GLES2.functional.attribute_location.bind_aliasing.cond* = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.attribute_location.bind_aliasing.cond* = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.attribute_location.bind_aliasing.max_cond* = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.attribute_location.bind_aliasing.max_cond* = FAIL
3716 NEXUS5X GLES : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_int = FAIL
3716 NEXUS5X GLES : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_short = FAIL
3716 NEXUS5X GLES : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_stencil_unsigned_int_24_8 = FAIL
3716 NEXUS5X GLES : dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.depth_stencil_unsigned_int_24_8 = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgb = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgb = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.polygon_offset.default_result_depth_clamp = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.polygon_offset.default_result_depth_clamp = FAIL
3715 NEXUS5X GLES : dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers_vertex = FAIL
3715 NEXUS5X GLES : dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers_fragment = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.return.output_write_in_func_always_vertex = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.return.output_write_in_func_always_vertex = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.return.output_write_in_func_always_fragment = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.return.output_write_in_func_always_fragment = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.texture_functions.vertex.texturecubelod = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.shaders.texture_functions.vertex.texturecubelod = FAIL
...@@ -273,9 +280,6 @@ ...@@ -273,9 +280,6 @@
3309 NEXUS5X GLES : dEQP-GLES2.functional.uniform_api.random.3 = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.uniform_api.random.3 = FAIL
3309 NEXUS5X GLES : dEQP-GLES2.functional.uniform_api.random.54 = FAIL 3309 NEXUS5X GLES : dEQP-GLES2.functional.uniform_api.random.54 = FAIL
// General Vulkan failures
3300 VULKAN : dEQP-GLES2.functional.shaders.texture_functions.vertex.texturecubelod = FAIL
// Only seen failing on Android // Only seen failing on Android
3241 VULKAN ANDROID : dEQP-GLES2.functional.depth_stencil_clear.depth_scissored_masked = FAIL 3241 VULKAN ANDROID : dEQP-GLES2.functional.depth_stencil_clear.depth_scissored_masked = FAIL
...@@ -283,38 +287,7 @@ ...@@ -283,38 +287,7 @@
3253 VULKAN : dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center = FAIL 3253 VULKAN : dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center = FAIL
3253 VULKAN : dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner = FAIL 3253 VULKAN : dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner = FAIL
// These seem to fail on both D3D11 and Vulkan
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_nearest = FAIL
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_linear = FAIL
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_nearest = FAIL
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_linear = FAIL
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_nearest = FAIL
3243 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_linear = FAIL
// D3D11 AMD already covered by Line 148
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_nearest = FAIL
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_linear = FAIL
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_nearest = FAIL
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_linear = FAIL
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_nearest = FAIL
3243 D3D11 INTEL : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_linear = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_nearest = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_linear = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_nearest = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_linear = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_nearest = FAIL
3243 D3D11 NVIDIA : dEQP-GLES2.functional.texture.mipmap.cube.bias.linear_linear = FAIL
// Fail with very tiny pixel differences // Fail with very tiny pixel differences
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_clamp = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_mirror = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_linear_clamp = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_linear_mirror = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.clamp_clamp = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.clamp_repeat = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.clamp_mirror = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.mirror_clamp = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.mirror_repeat = FAIL
3240 VULKAN : dEQP-GLES2.functional.texture.vertex.cube.wrap.mirror_mirror = FAIL
3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_clamp = FAIL 3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_clamp = FAIL
3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_mirror = FAIL 3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_nearest_mirror = FAIL
3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_linear_clamp = FAIL 3240 D3D11 : dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_mipmap_linear_linear_clamp = FAIL
......
...@@ -127,6 +127,36 @@ TEST_P(EGLBackwardsCompatibleContextTest, BackwardsCompatibleDisbled) ...@@ -127,6 +127,36 @@ TEST_P(EGLBackwardsCompatibleContextTest, BackwardsCompatibleDisbled)
} }
} }
// Test that if it's possible to create an ES3 context, requesting an ES2 context should return an
// ES3 context as well
TEST_P(EGLBackwardsCompatibleContextTest, BackwardsCompatibleEnabledES3)
{
ANGLE_SKIP_TEST_IF(
!IsEGLDisplayExtensionEnabled(mDisplay, "EGL_ANGLE_create_context_backwards_compatible"));
EGLint es3ContextAttribs[] = {
EGL_CONTEXT_MAJOR_VERSION, 3, EGL_CONTEXT_MINOR_VERSION, 0, EGL_NONE, EGL_NONE};
EGLContext es3Context = eglCreateContext(mDisplay, mConfig, nullptr, es3ContextAttribs);
ANGLE_SKIP_TEST_IF(es3Context == EGL_NO_CONTEXT);
ASSERT_EGL_TRUE(eglMakeCurrent(mDisplay, mPbuffer, mPbuffer, es3Context));
auto es3ContextVersion = GetCurrentContextVersion();
eglDestroyContext(mDisplay, es3Context);
EGLint es2ContextAttribs[] = {
EGL_CONTEXT_MAJOR_VERSION, 2, EGL_CONTEXT_MINOR_VERSION, 0, EGL_NONE, EGL_NONE};
EGLContext es2Context = eglCreateContext(mDisplay, mConfig, nullptr, es2ContextAttribs);
EXPECT_NE(es2Context, EGL_NO_CONTEXT);
ASSERT_EGL_TRUE(eglMakeCurrent(mDisplay, mPbuffer, mPbuffer, es2Context));
auto es2ContextVersion = GetCurrentContextVersion();
eglDestroyContext(mDisplay, es2Context);
EXPECT_EQ(es3ContextVersion, es2ContextVersion);
}
// Test that if ES1.1 is supported and a 1.0 context is requested, an ES 1.1 context is returned // Test that if ES1.1 is supported and a 1.0 context is requested, an ES 1.1 context is returned
TEST_P(EGLBackwardsCompatibleContextTest, BackwardsCompatibleEnabledES1) TEST_P(EGLBackwardsCompatibleContextTest, BackwardsCompatibleEnabledES1)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment