egl: fix EGL_EXT_protected_content/surface mixup

EGL_EXT_protected_surface introduces EGL_PROTECTED_CONTENT_EXT,
while EGL_EXT_protected_content is about protected context.

When I implemented EGL_EXT_protected_surface I mixed up the 2
names, so this commit fixes it.

Fixes: bd182777c8 ("egl: implement EGL_EXT_protected_surface support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8122>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-12-15 19:19:22 +01:00
parent 6526e6d11b
commit 663e06faa6
5 changed files with 6 additions and 6 deletions

View File

@ -1016,7 +1016,7 @@ dri2_setup_screen(_EGLDisplay *disp)
if (dri2_dpy->buffer_damage && dri2_dpy->buffer_damage->set_damage_region)
disp->Extensions.KHR_partial_update = EGL_TRUE;
disp->Extensions.EXT_protected_content =
disp->Extensions.EXT_protected_surface =
dri2_renderer_query_integer(dri2_dpy,
__DRI2_RENDERER_HAS_PROTECTED_CONTENT);
}

View File

@ -501,7 +501,7 @@ _eglCreateExtensionsString(_EGLDisplay *disp)
_EGL_CHECK_EXTENSION(EXT_create_context_robustness);
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import);
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import_modifiers);
_EGL_CHECK_EXTENSION(EXT_protected_content);
_EGL_CHECK_EXTENSION(EXT_protected_surface);
_EGL_CHECK_EXTENSION(EXT_surface_CTA861_3_metadata);
_EGL_CHECK_EXTENSION(EXT_surface_SMPTE2086_metadata);
_EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);

View File

@ -107,7 +107,7 @@ struct _egl_extensions
EGLBoolean EXT_image_dma_buf_import;
EGLBoolean EXT_image_dma_buf_import_modifiers;
EGLBoolean EXT_pixel_format_float;
EGLBoolean EXT_protected_content;
EGLBoolean EXT_protected_surface;
EGLBoolean EXT_surface_CTA861_3_metadata;
EGLBoolean EXT_surface_SMPTE2086_metadata;
EGLBoolean EXT_swap_buffers_with_damage;

View File

@ -59,7 +59,7 @@ _eglParseKHRImageAttribs(_EGLImageAttribs *attrs, _EGLDisplay *disp,
attrs->GLTextureZOffset = val;
break;
case EGL_PROTECTED_CONTENT_EXT:
if (!disp->Extensions.EXT_protected_content)
if (!disp->Extensions.EXT_protected_surface)
return EGL_BAD_PARAMETER;
attrs->ProtectedContent = val;

View File

@ -304,7 +304,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
surf->MipmapTexture = !!val;
break;
case EGL_PROTECTED_CONTENT_EXT:
if (!disp->Extensions.EXT_protected_content) {
if (!disp->Extensions.EXT_protected_surface) {
err = EGL_BAD_ATTRIBUTE;
break;
}
@ -591,7 +591,7 @@ _eglQuerySurface(_EGLDisplay *disp, _EGLSurface *surface,
*value = surface->HdrMetadata.max_fall;
break;
case EGL_PROTECTED_CONTENT_EXT:
if (!disp->Extensions.EXT_protected_content)
if (!disp->Extensions.EXT_protected_surface)
return _eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
*value = surface->ProtectedContent;
break;