From 663e06faa62c3e1a0e9b4e9a584ef6fb832c2cf8 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 15 Dec 2020 19:19:22 +0100 Subject: [PATCH] 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: bd182777c8f ("egl: implement EGL_EXT_protected_surface support") Reviewed-by: Lionel Landwerlin Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 2 +- src/egl/main/eglapi.c | 2 +- src/egl/main/egldisplay.h | 2 +- src/egl/main/eglimage.c | 2 +- src/egl/main/eglsurface.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index d2febce7639..d6a1c416923 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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); } diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 78d84f1c9b9..df0a0011dbf 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -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); diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index c377d02461f..4d2afbc712e 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -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; diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c index 1c0ebe895e7..64bf7f2bfe9 100644 --- a/src/egl/main/eglimage.c +++ b/src/egl/main/eglimage.c @@ -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; diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index 9faa800d001..aee52178995 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -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;