Skip to content
Snippets Groups Projects
Commit 1f6798a7 authored by Frank Binns's avatar Frank Binns Committed by Emil Velikov
Browse files

egl: Add eglQuerySurface surface type check for EGL_LARGEST_PBUFFER attrib


Calling eglQuerySurface on a window or pixmap with the EGL_LARGEST_PBUFFER
attribute resulted in the contents of the 'value' parameter being modified.
This is the wrong behaviour according to the EGL spec, which states:

    "Querying EGL_LARGEST_PBUFFER for a pbuffer surface returns the
     same attribute value specified when the surface was created with
     eglCreatePbufferSurface. For a window or pixmap surface, the
     contents of value are not modified."

Avoid this from happening by checking that the surface type is EGL_PBUFFER_BIT
before modifying the contents of the parameter.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: default avatarFrank Binns <frank.binns@imgtec.com>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
(cherry picked from commit b2c5986e)
parent 84ef345d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment