egl: fix EGL_EXT_protected_content/surface mixup
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 15 Dec 2020 18:19:22 +0000 (19:19 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 17 Dec 2020 09:05:42 +0000 (10:05 +0100)
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 <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8122>

src/egl/drivers/dri2/egl_dri2.c
src/egl/main/eglapi.c
src/egl/main/egldisplay.h
src/egl/main/eglimage.c
src/egl/main/eglsurface.c

index d2febce..d6a1c41 100644 (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);
 }
index 78d84f1..df0a001 100644 (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);
index c377d02..4d2afbc 100644 (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;
index 1c0ebe8..64bf7f2 100644 (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;
index 9faa800..aee5217 100644 (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;