summaryrefslogtreecommitdiff
path: root/cogl
diff options
context:
space:
mode:
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2021-05-20 18:42:28 +0800
committerDaniel van Vugt <daniel.van.vugt@canonical.com>2021-06-01 15:44:05 +0800
commit936696afcfc99100cbc4026b8d9dba794ff11602 (patch)
tree65461234783c795bc617b4917eab65feb9e4f138 /cogl
parent216bb7f96014a140a0659db6c7bbaddc6b8335db (diff)
downloadmutter-936696afcfc99100cbc4026b8d9dba794ff11602.tar.gz
cogl/winsys-glx: Request 2 stencil bits
Just like we do on EGL. Two bits are required because `cogl-clip-stack-gl.c` needs each stencil buffer element to be able to count from 0 to 2. This mistake probably went unnoticed because: * Drivers usually provide more than 1 anyway; and * Optimizations in `cogl-clip-stack-gl.c` avoid calling the code that needs to count past 1 in most cases. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1873>
Diffstat (limited to 'cogl')
-rw-r--r--cogl/cogl/winsys/cogl-winsys-glx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
index a2cb5c548..a8453dd48 100644
--- a/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -533,7 +533,7 @@ glx_attributes_from_framebuffer_config (CoglDisplay *display,
attributes[i++] = GLX_DEPTH_SIZE;
attributes[i++] = 1;
attributes[i++] = GLX_STENCIL_SIZE;
- attributes[i++] = config->need_stencil ? 1: GLX_DONT_CARE;
+ attributes[i++] = config->need_stencil ? 2 : 0;
if (config->stereo_enabled)
{
attributes[i++] = GLX_STEREO;