summaryrefslogtreecommitdiffstats
path: root/src/glx/drisw_priv.h
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2020-01-06 11:06:30 -0500
committerMarge Bot <[email protected]>2020-01-23 23:03:13 +0000
commit2fc11e8a05f59bbffed284c86108fedbac315081 (patch)
tree41f80d7cb90d41ef059f58d64ee182ff2a420b5a /src/glx/drisw_priv.h
parent59f29fc845ce6425959e8db9b707363b1e273445 (diff)
drisw: Cache the depth of the X drawable
This is not always ->rgbBits, because there are cases where that could be 32 but we're (legally) bound to a depth-24 pixmap. The important thing to have match here is the actual server-side notion of depth. You can look this up (at modest expense) from the xlib visual info if the fbconfig has a visual. But it might not, so if not, fetch it (at slightly greater expense) from XGetGeometry. Do this at GLX drawable creation so you don't have to do it on the SwapBuffers path. Apparently this fixes glx/glx-swap-singlebuffer, which is unintentional but quite pleasant. Fixes: mesa/mesa#2291 Fixes: 90d58286 ("drisw: Fix and simplify drawable setup") Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305>
Diffstat (limited to 'src/glx/drisw_priv.h')
-rw-r--r--src/glx/drisw_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glx/drisw_priv.h b/src/glx/drisw_priv.h
index bfcf5946c57..663decee4c3 100644
--- a/src/glx/drisw_priv.h
+++ b/src/glx/drisw_priv.h
@@ -66,6 +66,7 @@ struct drisw_drawable
struct glx_config *config;
XImage *ximage;
XShmSegmentInfo shminfo;
+ int xDepth;
};
_X_HIDDEN int