summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/xlib/fakeglx.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-05 15:59:55 -0700
committerBrian <[email protected]>2007-11-05 15:59:55 -0700
commite39f1b4cbea6d41dc09430bd3d811cb7bbdea5f8 (patch)
tree82f76d36cbde01e22b58a257971ec52d414a06d1 /src/mesa/pipe/xlib/fakeglx.c
parent9a563d5e696a7c8fc09f7da5a0d33a9675b00e4c (diff)
Update xlib driver to use newer state tracker context/framebuffer functions.
XMesaContext has an st_context * which contains a mesa context.
Diffstat (limited to 'src/mesa/pipe/xlib/fakeglx.c')
-rw-r--r--src/mesa/pipe/xlib/fakeglx.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/pipe/xlib/fakeglx.c b/src/mesa/pipe/xlib/fakeglx.c
index 7a170b4d3d1..d7e7b292d1f 100644
--- a/src/mesa/pipe/xlib/fakeglx.c
+++ b/src/mesa/pipe/xlib/fakeglx.c
@@ -51,6 +51,9 @@
#include "version.h"
#include "xfonts.h"
#include "xmesaP.h"
+#include "state_tracker/st_context.h"
+#include "state_tracker/st_public.h"
+
#ifdef __VMS
#define _mesa_sprintf sprintf
@@ -1617,7 +1620,7 @@ Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
if (MakeCurrent_PrevContext == src) {
_mesa_Flush();
}
- _mesa_copy_context( &(xm_src->mesa), &(xm_dst->mesa), (GLuint) mask );
+ st_copy_context_state( xm_src->st, xm_dst->st, (GLuint) mask );
}
@@ -2383,16 +2386,16 @@ Fake_glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
switch (attribute) {
case GLX_WIDTH:
- *value = xmbuf->mesa_buffer.Width;
+ *value = xmesa_buffer_width(xmbuf);
break;
case GLX_HEIGHT:
- *value = xmbuf->mesa_buffer.Height;
+ *value = xmesa_buffer_width(xmbuf);
break;
case GLX_PRESERVED_CONTENTS:
*value = True;
break;
case GLX_LARGEST_PBUFFER:
- *value = xmbuf->mesa_buffer.Width * xmbuf->mesa_buffer.Height;
+ *value = xmesa_buffer_width(xmbuf) * xmesa_buffer_height(xmbuf);
break;
case GLX_FBCONFIG_ID:
*value = xmbuf->xm_visual->visinfo->visualid;
@@ -2762,13 +2765,13 @@ Fake_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, un
*value = True;
break;
case GLX_LARGEST_PBUFFER_SGIX:
- *value = xmbuf->mesa_buffer.Width * xmbuf->mesa_buffer.Height;
+ *value = xmesa_buffer_width(xmbuf) * xmesa_buffer_height(xmbuf);
break;
case GLX_WIDTH_SGIX:
- *value = xmbuf->mesa_buffer.Width;
+ *value = xmesa_buffer_width(xmbuf);
break;
case GLX_HEIGHT_SGIX:
- *value = xmbuf->mesa_buffer.Height;
+ *value = xmesa_buffer_height(xmbuf);
break;
case GLX_EVENT_MASK_SGIX:
*value = 0; /* XXX might be wrong */