aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/drisw_priv.h
Commit message (Collapse)AuthorAgeFilesLines
* drisw: Cache the depth of the X drawableAdam Jackson2020-01-231-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* drisw: Fix and simplify drawable setupAdam Jackson2019-09-271-2/+1
| | | | | | | | | | | | | | | | | | We don't want to require a visual for the drawable, because there exist fbconfigs that don't correspond to any visual (say a 565 pixmap|pbuffer config on a depth-24 display). Fortunately, we don't need one either. Passing the visual to XCreateImage serves only to fill in the XImage's {red,green,blue}_mask fields, which libX11 itself never uses, they exist only for the client's convenience, and we don't care. And we already have the drawable depth in glx_config::rgbBits. So replace the XVisualInfo field in the drawable private with a pointer to the glx_config. Having done that driswCreateGCs becomes trivial, so inline it into its caller. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1194 Reviewed-by: Eric Anholt <[email protected]>
* drisw: Simplify GC setupAdam Jackson2019-09-271-1/+0
| | | | | | | | | | There's no reason to have two GCs here. The only difference between them is that swapgc would generate graphics exposures, except we only ever use this GC for PutImage, and PutImage doesn't generate graphics exposures. We also don't need to explicitly ChangeGC to GXCopy, because that's the default. Reviewed-by: Eric Anholt <[email protected]>
* glx: Add missing include guardsMichał Janiszewski2018-10-301-0/+5
| | | | | | Signed-off-by: Michał Janiszewski <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* drisw/glx: use XShm if possibleMarc-André Lureau2018-05-301-0/+3
| | | | | | | | | | | | | | Implements putImageShm from DRIswrastLoaderExtension. If XShm extension is not available, or fails, it will fallback on regular XPutImage(). Tested on Linux only with 16bpp and 32bpp visual. (airlied: tested on 24bpp as well) Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* glx/drisw: add support for DRI2rendererQueryExtensionEmil Velikov2014-08-151-0/+8
| | | | | | | | | | The extension is used by GLX_MESA_query_renderer, which can be provided for by hardware and software drivers. v2: Use designated initializers. v3: Move drisw_query_renderer_*() to dri2_query_renderer.c Signed-off-by: Emil Velikov <[email protected]>
* glx/drisw: Move private structure declarations to a header fileEmil Velikov2014-08-151-0/+64
v2: Reff the correct file wrt copyright, spotted by Chia-I Signed-off-by: Emil Velikov <[email protected]>