Commit 698ffd02 by Jonah Ryan-Davis Committed by Commit Bot

eglGetConfigAttrib validation missing extension check

The extension EGL_ANGLE_iosurface_client_buffer adds a new attribute to the config: EGL_BIND_TO_TEXTURE_TARGET_ANGLE. However, validation was not checking the extension was present when this attribute was requested. Bug: chromium:1015454 Change-Id: I24c6e20f3b602e8a71a46f0f1e99c1472d5bbb1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2078892 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 4d2040a6
...@@ -178,7 +178,6 @@ Error ValidateConfigAttribute(const Display *display, EGLAttrib attribute) ...@@ -178,7 +178,6 @@ Error ValidateConfigAttribute(const Display *display, EGLAttrib attribute)
case EGL_SAMPLES: case EGL_SAMPLES:
case EGL_SAMPLE_BUFFERS: case EGL_SAMPLE_BUFFERS:
case EGL_SURFACE_TYPE: case EGL_SURFACE_TYPE:
case EGL_BIND_TO_TEXTURE_TARGET_ANGLE:
case EGL_TRANSPARENT_TYPE: case EGL_TRANSPARENT_TYPE:
case EGL_TRANSPARENT_BLUE_VALUE: case EGL_TRANSPARENT_BLUE_VALUE:
case EGL_TRANSPARENT_GREEN_VALUE: case EGL_TRANSPARENT_GREEN_VALUE:
...@@ -226,6 +225,13 @@ Error ValidateConfigAttribute(const Display *display, EGLAttrib attribute) ...@@ -226,6 +225,13 @@ Error ValidateConfigAttribute(const Display *display, EGLAttrib attribute)
} }
break; break;
case EGL_BIND_TO_TEXTURE_TARGET_ANGLE:
if (!display->getExtensions().iosurfaceClientBuffer)
{
return EglBadAttribute() << "EGL_ANGLE_iosurface_client_buffer is not enabled.";
}
break;
default: default:
return EglBadAttribute() << "Unknown attribute."; return EglBadAttribute() << "Unknown attribute.";
} }
......
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