glx: fix pbuffer refcount init

glXMakeCurrent* may miss release pbuffer if pbuffer is created
with refcount=0. This won't happen when pbuffer had different
GLX id and X pixmap id.

cc: mesa-stable

Fixes: bc8a51a79a ("glx: no need to create extra pixmap for pbuffer")

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14926>
This commit is contained in:
Qiang Yu 2022-02-09 16:00:30 +08:00 committed by Marge Bot
parent a4b164b57b
commit bf09c08e31
1 changed files with 2 additions and 0 deletions

View File

@ -202,6 +202,8 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
pdraw->textureTarget = determineTextureTarget(attrib_list, num_attribs);
pdraw->textureFormat = determineTextureFormat(attrib_list, num_attribs);
pdraw->refcount = 1;
#endif
return GL_TRUE;