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:
parent
a4b164b57b
commit
bf09c08e31
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue