summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_api.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-05-24 10:44:53 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-05-24 10:44:53 +0100
commitb939adfa155f2b3ca5c5226e86da85629654d79b (patch)
tree43c11a5302d4981bb82d68b503af9ea40fc2b837 /src/mesa/drivers/x11/xm_api.c
parent8e4a95a93d15a6707a29454cd47e10b08314cda2 (diff)
Use the x11 driver as a test harness for the softpipe/state_tracker code.
This has some limitations as we currently require a mapped framebuffer, so it only really works with double-buffered ximage rgba8888 windows.
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r--src/mesa/drivers/x11/xm_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index a07d0a90cf..af1a169a76 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -80,6 +80,9 @@
#include "tnl/t_pipeline.h"
#include "drivers/common/driverfuncs.h"
+#include "softpipe/state_tracker/st_public.h"
+#include "softpipe/generic/g_context.h"
+
/**
* Global X driver lock
*/
@@ -1556,6 +1559,10 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
xmesa_register_swrast_functions( mesaCtx );
_swsetup_Wakeup(mesaCtx);
+
+ st_create_context( mesaCtx,
+ generic_create() );
+
return c;
}
@@ -1758,6 +1765,8 @@ PUBLIC
GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
XMesaBuffer readBuffer )
{
+ _mesa_printf("%s %p %p %p\n", __FUNCTION__, drawBuffer, readBuffer );
+
if (c) {
if (!drawBuffer || !readBuffer)
return GL_FALSE; /* must specify buffers! */