summaryrefslogtreecommitdiff
path: root/lib/mesa/src/glx/drisw_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/glx/drisw_glx.c')
-rw-r--r--lib/mesa/src/glx/drisw_glx.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/mesa/src/glx/drisw_glx.c b/lib/mesa/src/glx/drisw_glx.c
index 749ceb08a..241ac7f6d 100644
--- a/lib/mesa/src/glx/drisw_glx.c
+++ b/lib/mesa/src/glx/drisw_glx.c
@@ -177,9 +177,9 @@ swrastPutImage(__DRIdrawable * draw, int op,
}
static void
-swrastGetImage(__DRIdrawable * read,
- int x, int y, int w, int h,
- char *data, void *loaderPrivate)
+swrastGetImage2(__DRIdrawable * read,
+ int x, int y, int w, int h, int stride,
+ char *data, void *loaderPrivate)
{
struct drisw_drawable *prp = loaderPrivate;
__GLXDRIdrawable *pread = &(prp->base);
@@ -193,20 +193,29 @@ swrastGetImage(__DRIdrawable * read,
ximage->data = data;
ximage->width = w;
ximage->height = h;
- ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32);
+ ximage->bytes_per_line = stride ? stride : bytes_per_line(w * ximage->bits_per_pixel, 32);
XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0);
ximage->data = NULL;
}
+static void
+swrastGetImage(__DRIdrawable * read,
+ int x, int y, int w, int h,
+ char *data, void *loaderPrivate)
+{
+ swrastGetImage2(read, x, y, w, h, 0, data, loaderPrivate);
+}
+
static const __DRIswrastLoaderExtension swrastLoaderExtension = {
- .base = {__DRI_SWRAST_LOADER, 2 },
+ .base = {__DRI_SWRAST_LOADER, 3 },
.getDrawableInfo = swrastGetDrawableInfo,
.putImage = swrastPutImage,
.getImage = swrastGetImage,
.putImage2 = swrastPutImage2,
+ .getImage2 = swrastGetImage2,
};
static const __DRIextension *loader_extensions[] = {
@@ -614,9 +623,11 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
- /* DRISW version >= 2 implies support for OpenGL ES 2.0.
+ /* DRISW version >= 2 implies support for OpenGL ES.
*/
__glXEnableDirectExtension(&psc->base,
+ "GLX_EXT_create_context_es_profile");
+ __glXEnableDirectExtension(&psc->base,
"GLX_EXT_create_context_es2_profile");
}