mesa: Branch 'master' - 2 commits
George Sapountzis
gsap7 at kemper.freedesktop.org
Fri Apr 13 15:15:21 UTC 2007
include/GL/xmesa.h | 15 +++++++++++++++
include/GL/xmesa_xf86.h | 3 +--
src/mesa/drivers/x11/xm_api.c | 19 +++++++++++++++----
src/mesa/drivers/x11/xm_image.c | 17 -----------------
src/mesa/drivers/x11/xm_image.h | 7 -------
src/mesa/drivers/x11/xmesaP.h | 10 ----------
6 files changed, 31 insertions(+), 40 deletions(-)
New commits:
diff-tree 9f8373d5cada37ed71e5908a7158d56d9a4c34d5 (from 50aaabc248c9823106ff772873cbf2631d4dadcd)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date: Fri Apr 13 18:13:08 2007 +0300
xmesa: drop unused XMesaPutImageHelper.
It could only be called from XMesaCopySubBuffer but this function is not used
by XFree86.
It seems that XMesaPutImageHelper would handle sub-images but never got
finished. Proper sub-image helpers should be written if need be.
diff --git a/include/GL/xmesa_xf86.h b/include/GL/xmesa_xf86.h
index c84ffe8..7d5a7c5 100644
--- a/include/GL/xmesa_xf86.h
+++ b/include/GL/xmesa_xf86.h
@@ -124,8 +124,7 @@ do { \
do { \
/* Assumes: Images are always in ZPixmap format */ \
(void) __d; \
- if (__sx || __sy) /* The non-trivial case */ \
- XMesaPutImageHelper(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h); \
+ ASSERT(!__sx && !__sy) /* The SubImage case */ \
ValidateGC(__b, __gc); \
(*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
__x, __y, __w, __h, 0, ZPixmap, \
diff --git a/src/mesa/drivers/x11/xm_image.c b/src/mesa/drivers/x11/xm_image.c
index b91d567..087b4e4 100644
--- a/src/mesa/drivers/x11/xm_image.c
+++ b/src/mesa/drivers/x11/xm_image.c
@@ -130,21 +130,4 @@ void XMesaPutPixel(XMesaImage *image, in
}
#endif
-void XMesaPutImageHelper(ScreenPtr display,
- DrawablePtr d, GCPtr gc,
- XMesaImage *image,
- int src_x, int src_y,
- int dest_x, int dest_y,
- unsigned int width, unsigned int height)
-{
- /* NOT_DONE: Verify that the following works for all depths */
- char *src = (image->data +
- src_y * image->bytes_per_line +
- ((src_x * image->bits_per_pixel) >> 3));
-
- ValidateGC(d, gc);
- (*gc->ops->PutImage)(d, gc, d->depth, dest_x, dest_y, width, height,
- 0, ZPixmap, src);
-}
-
#endif /* XFree86Server */
diff --git a/src/mesa/drivers/x11/xm_image.h b/src/mesa/drivers/x11/xm_image.h
index c91ab39..240ccee 100644
--- a/src/mesa/drivers/x11/xm_image.h
+++ b/src/mesa/drivers/x11/xm_image.h
@@ -81,11 +81,4 @@ extern void XMesaPutPixel(XMesaImage *im
unsigned long pixel);
#endif
-extern void XMesaPutImageHelper(ScreenPtr display,
- DrawablePtr d, GCPtr gc,
- XMesaImage *image,
- int src_x, int src_y,
- int dest_x, int dest_y,
- unsigned int width, unsigned int height);
-
#endif /* _XM_IMAGE_H_ */
diff-tree 50aaabc248c9823106ff772873cbf2631d4dadcd (from 30b6f11de1f2f3b9198388451b8a1f73f012c964)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date: Fri Apr 13 18:12:37 2007 +0300
xmesa: export xmesa functions used by xfree86.
This uses xmesa.h as the GLcore interface and avoids adding an explicit GLcore
inteface which would not be a proper interface anyway.
It puts the declarations of the three functions specific for XMesa/XFree86 in
xmesa.h, we can push them down to xmesa_xf86.h if hiding behind XFree86Server
ifdef's is not enough.
diff --git a/include/GL/xmesa.h b/include/GL/xmesa.h
index ab813b2..f185a15 100644
--- a/include/GL/xmesa.h
+++ b/include/GL/xmesa.h
@@ -180,6 +180,21 @@ extern XMesaContext XMesaCreateContext(
extern void XMesaDestroyContext( XMesaContext c );
+#ifdef XFree86Server
+/*
+ * These are the extra routines required for integration with XFree86.
+ * None of these routines should be user visible. -KEM
+ */
+extern GLboolean XMesaForceCurrent( XMesaContext c );
+
+extern GLboolean XMesaLoseCurrent( XMesaContext c );
+
+extern GLboolean XMesaCopyContext( XMesaContext src,
+ XMesaContext dst,
+ GLuint mask );
+#endif /* XFree86Server */
+
+
/*
* Create an XMesaBuffer from an X window.
*/
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 24028a4..6439d13 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1308,6 +1308,7 @@ xmesa_convert_from_x_visual_type( int vi
* visualCaveat - ala the GLX extension, usually GLX_NONE
* Return; a new XMesaVisual or 0 if error.
*/
+PUBLIC
XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
XMesaVisualInfo visinfo,
GLboolean rgb_flag,
@@ -1450,6 +1451,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisp
}
+PUBLIC
void XMesaDestroyVisual( XMesaVisual v )
{
#ifndef XFree86Server
@@ -1467,6 +1469,7 @@ void XMesaDestroyVisual( XMesaVisual v )
* lists or NULL if no sharing is wanted.
* \return an XMesaContext or NULL if error.
*/
+PUBLIC
XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
{
static GLboolean firstTime = GL_TRUE;
@@ -1550,6 +1553,7 @@ XMesaContext XMesaCreateContext( XMesaVi
+PUBLIC
void XMesaDestroyContext( XMesaContext c )
{
GLcontext *mesaCtx = &c->mesa;
@@ -1721,7 +1725,7 @@ XMesaCreateWindowBuffer2(XMesaVisual v,
}
-XMesaBuffer
+PUBLIC XMesaBuffer
XMesaCreateWindowBuffer(XMesaVisual v, XMesaWindow w)
{
return XMesaCreateWindowBuffer2( v, w, NULL );
@@ -1737,7 +1741,7 @@ XMesaCreateWindowBuffer(XMesaVisual v, X
* \c GLX_DIRECT_COLOR visual for the pixmap
* \returns new XMesaBuffer or NULL if error
*/
-XMesaBuffer
+PUBLIC XMesaBuffer
XMesaCreatePixmapBuffer(XMesaVisual v, XMesaPixmap p, XMesaColormap cmap)
{
int client = 0;
@@ -1802,7 +1806,7 @@ XMesaCreatePBuffer(XMesaVisual v, XMesaC
/*
* Deallocate an XMesaBuffer structure and all related info.
*/
-void
+PUBLIC void
XMesaDestroyBuffer(XMesaBuffer b)
{
xmesa_free_buffer(b);
@@ -1845,6 +1849,7 @@ GLboolean XMesaMakeCurrent( XMesaContext
/*
* Bind buffer b to context c and make c the current rendering context.
*/
+PUBLIC
GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
XMesaBuffer readBuffer )
{
@@ -1958,6 +1963,8 @@ XMesaBuffer XMesaGetCurrentReadBuffer( v
}
+#ifdef XFree86Server
+PUBLIC
GLboolean XMesaForceCurrent(XMesaContext c)
{
if (c) {
@@ -1976,6 +1983,7 @@ GLboolean XMesaForceCurrent(XMesaContext
}
+PUBLIC
GLboolean XMesaLoseCurrent(XMesaContext c)
{
(void) c;
@@ -1984,11 +1992,13 @@ GLboolean XMesaLoseCurrent(XMesaContext
}
+PUBLIC
GLboolean XMesaCopyContext( XMesaContext xm_src, XMesaContext xm_dst, GLuint mask )
{
_mesa_copy_context(&xm_src->mesa, &xm_dst->mesa, mask);
return GL_TRUE;
}
+#endif /* XFree86Server */
/*
@@ -2135,6 +2145,7 @@ static void FXgetImage( XMesaBuffer b )
* Copy the back buffer to the front buffer. If there's no back buffer
* this is a no-op.
*/
+PUBLIC
void XMesaSwapBuffers( XMesaBuffer b )
{
GET_CURRENT_CONTEXT(ctx);
@@ -2475,7 +2486,7 @@ unsigned long XMesaDitherColor( XMesaCon
* This is typically called when the window size changes and we need
* to reallocate the buffer's back/depth/stencil/accum buffers.
*/
-void
+PUBLIC void
XMesaResizeBuffers( XMesaBuffer b )
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index bd5dce1..98d03cc 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -573,16 +573,6 @@ extern XMesaBuffer XMesaCreateWindowBuff
XMesaWindow w,
XMesaContext c );
-/*
- * These are the extra routines required for integration with XFree86.
- * None of these routines should be user visible. -KEM
- */
-extern GLboolean XMesaForceCurrent(XMesaContext c);
-extern GLboolean XMesaLoseCurrent(XMesaContext c);
-extern GLboolean XMesaCopyContext( XMesaContext src,
- XMesaContext dst,
- GLuint mask );
-
#define ENABLE_EXT_texure_compression_s3tc 0 /* SW texture compression */
More information about the mesa-commit
mailing list