зеркало из https://github.com/AvaloniaUI/angle.git
Fix failing dEQP EGL tests.
dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_depth_stencil dEQP-EGL.functional.negative_api#choose_config dEQP-EGL.functional.negative_api#swap_interval Bug: angleproject:2546 Change-Id: Ie80e3ee3c65f330d2030b4d7da59cb964e4ea0a5 Reviewed-on: https://chromium-review.googlesource.com/c/1313233 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
a31b747cfa
Коммит
298436280d
|
@ -235,7 +235,7 @@ egl::Config GenerateDefaultConfig(const VkPhysicalDeviceProperties &physicalDevi
|
|||
config.renderableType = EGL_OPENGL_ES2_BIT;
|
||||
config.sampleBuffers = (sampleCount > 0) ? 1 : 0;
|
||||
config.samples = sampleCount;
|
||||
config.surfaceType = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
|
||||
config.surfaceType = EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
|
||||
// Vulkan surfaces use a different origin than OpenGL, always prefer to be flipped vertically if
|
||||
// possible.
|
||||
config.optimalOrientation = EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE;
|
||||
|
|
|
@ -217,11 +217,77 @@ Error ValidateConfigAttribute(const Display *display, EGLAttrib attribute)
|
|||
return NoError();
|
||||
}
|
||||
|
||||
Error ValidateConfigAttributeValue(const Display *display, EGLAttrib attribute, EGLAttrib value)
|
||||
{
|
||||
switch (attribute)
|
||||
{
|
||||
|
||||
case EGL_BIND_TO_TEXTURE_RGB:
|
||||
case EGL_BIND_TO_TEXTURE_RGBA:
|
||||
switch (value)
|
||||
{
|
||||
case EGL_DONT_CARE:
|
||||
case EGL_TRUE:
|
||||
case EGL_FALSE:
|
||||
break;
|
||||
default:
|
||||
return EglBadAttribute() << "EGL_bind_to_texture invalid attribute: " << value;
|
||||
}
|
||||
break;
|
||||
|
||||
case EGL_COLOR_BUFFER_TYPE:
|
||||
switch (value)
|
||||
{
|
||||
case EGL_RGB_BUFFER:
|
||||
case EGL_LUMINANCE_BUFFER:
|
||||
// EGL_DONT_CARE doesn't match the spec, but does match dEQP usage
|
||||
case EGL_DONT_CARE:
|
||||
break;
|
||||
default:
|
||||
return EglBadAttribute()
|
||||
<< "EGL_color_buffer_type invalid attribute: " << value;
|
||||
}
|
||||
break;
|
||||
|
||||
case EGL_NATIVE_RENDERABLE:
|
||||
switch (value)
|
||||
{
|
||||
case EGL_DONT_CARE:
|
||||
case EGL_TRUE:
|
||||
case EGL_FALSE:
|
||||
break;
|
||||
default:
|
||||
return EglBadAttribute()
|
||||
<< "EGL_native_renderable invalid attribute: " << value;
|
||||
}
|
||||
break;
|
||||
|
||||
case EGL_TRANSPARENT_TYPE:
|
||||
switch (value)
|
||||
{
|
||||
case EGL_NONE:
|
||||
case EGL_TRANSPARENT_RGB:
|
||||
// EGL_DONT_CARE doesn't match the spec, but does match dEQP usage
|
||||
case EGL_DONT_CARE:
|
||||
break;
|
||||
default:
|
||||
return EglBadAttribute() << "EGL_transparent_type invalid attribute: " << value;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NoError();
|
||||
}
|
||||
|
||||
Error ValidateConfigAttributes(const Display *display, const AttributeMap &attributes)
|
||||
{
|
||||
for (const auto &attrib : attributes)
|
||||
{
|
||||
ANGLE_TRY(ValidateConfigAttribute(display, attrib.first));
|
||||
ANGLE_TRY(ValidateConfigAttributeValue(display, attrib.first, attrib.second));
|
||||
}
|
||||
|
||||
return NoError();
|
||||
|
@ -2723,9 +2789,11 @@ Error ValidateReleaseTexImage(const Display *display,
|
|||
return NoError();
|
||||
}
|
||||
|
||||
Error ValidateSwapInterval(const Display *display, const Surface *draw_surface)
|
||||
Error ValidateSwapInterval(const Display *display,
|
||||
const Surface *draw_surface,
|
||||
const gl::Context *context)
|
||||
{
|
||||
ANGLE_TRY(ValidateDisplay(display));
|
||||
ANGLE_TRY(ValidateContext(display, context));
|
||||
|
||||
if (draw_surface == nullptr)
|
||||
{
|
||||
|
|
|
@ -166,7 +166,9 @@ Error ValidateReleaseTexImage(const Display *display,
|
|||
const EGLSurface eglSurface,
|
||||
const EGLint buffer);
|
||||
|
||||
Error ValidateSwapInterval(const Display *display, const Surface *draw_surface);
|
||||
Error ValidateSwapInterval(const Display *display,
|
||||
const Surface *draw_surface,
|
||||
const gl::Context *context);
|
||||
|
||||
Error ValidateBindAPI(const EGLenum api);
|
||||
|
||||
|
|
|
@ -684,12 +684,13 @@ EGLBoolean EGLAPIENTRY SwapInterval(EGLDisplay dpy, EGLint interval)
|
|||
ANGLE_SCOPED_GLOBAL_LOCK();
|
||||
EVENT("(EGLDisplay dpy = 0x%016" PRIxPTR ", EGLint interval = %d)", (uintptr_t)dpy, interval);
|
||||
Thread *thread = GetCurrentThread();
|
||||
gl::Context *context = thread->getContext();
|
||||
|
||||
Display *display = static_cast<Display *>(dpy);
|
||||
Surface *draw_surface = static_cast<Surface *>(thread->getCurrentDrawSurface());
|
||||
|
||||
ANGLE_EGL_TRY_RETURN(thread, ValidateSwapInterval(display, draw_surface), "eglSwapInterval",
|
||||
GetDisplayIfValid(display), EGL_FALSE);
|
||||
ANGLE_EGL_TRY_RETURN(thread, ValidateSwapInterval(display, draw_surface, context),
|
||||
"eglSwapInterval", GetDisplayIfValid(display), EGL_FALSE);
|
||||
|
||||
const egl::Config *surfaceConfig = draw_surface->getConfig();
|
||||
EGLint clampedInterval = std::min(std::max(interval, surfaceConfig->minSwapInterval),
|
||||
|
|
|
@ -258,9 +258,7 @@
|
|||
2546 ANDROID : dEQP-EGL.functional.color_clears.single_context.* = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.native_color_mapping.native_window.* = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.native_coord_mapping.native_window.* = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.negative_api.choose_config = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.negative_api.copy_buffers = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.negative_api.swap_interval = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.partial_update.odd_clear_* = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.partial_update.odd_render_* = FAIL
|
||||
2546 ANDROID : dEQP-EGL.functional.partial_update.render_* = FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче