mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
egl: Unhide functionality in _eglInitContext()
_eglInitResource() was used to memset entire _EGLContext by writing more than size of pointed target. This does work as long as Resource is the first element in _EGLContext, this patch fixes such dependency. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
d530745169
commit
1456ed85f0
1 changed files with 2 additions and 1 deletions
|
|
@ -366,7 +366,8 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
|
|||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
_eglInitResource(&ctx->Resource, sizeof(*ctx), dpy);
|
||||
memset(ctx, 0, sizeof(_EGLContext));
|
||||
_eglInitResource(&ctx->Resource, sizeof(_EGLResource), dpy);
|
||||
ctx->ClientAPI = api;
|
||||
ctx->Config = conf;
|
||||
ctx->WindowRenderBuffer = EGL_NONE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue