diff options
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 45 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 4 |
2 files changed, 26 insertions, 23 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index ea3585258d8..3b004a3ee25 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1,8 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 7.1 + * Version: 7.5 * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1392,6 +1393,25 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list ) } +/** + * Init basic fields of a new fake_glx_context. + */ +static void +init_glx_context(struct fake_glx_context *glxCtx, Display *dpy) +{ + /* Always return True. See if anyone's confused... */ + GLboolean direct = GL_TRUE; + + glxCtx->xmesaContext->direct = direct; + glxCtx->glxContext.isDirect = direct; + glxCtx->glxContext.currentDpy = dpy; + glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ + + assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); +} + + + static GLXContext Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, GLXContext share_list, Bool direct ) @@ -1430,12 +1450,7 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, return NULL; } - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); + init_glx_context(glxCtx, dpy); return (GLXContext) glxCtx; } @@ -2441,12 +2456,7 @@ Fake_glXCreateNewContext( Display *dpy, GLXFBConfig config, return NULL; } - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); + init_glx_context(glxCtx, dpy); return (GLXContext) glxCtx; } @@ -2664,12 +2674,7 @@ Fake_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int re return NULL; } - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); + init_glx_context(glxCtx, dpy); return (GLXContext) glxCtx; } diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 18aa8bcc096..2a8c3a4fd36 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -492,7 +492,7 @@ xmesa_free_buffer(XMesaBuffer buffer) b->frontxrb->drawable = 0; /* Unreference. If count = zero we'll really delete the buffer */ - _mesa_unreference_framebuffer(&fb); + _mesa_reference_framebuffer(&fb, NULL); return; } @@ -1325,7 +1325,6 @@ xmesa_convert_from_x_visual_type( int visualType ) #define need_GL_EXT_framebuffer_blit #define need_GL_EXT_gpu_program_parameters #define need_GL_EXT_paletted_texture -#define need_GL_IBM_multimode_draw_arrays #define need_GL_MESA_resize_buffers #define need_GL_NV_vertex_program #define need_GL_NV_fragment_program @@ -1355,7 +1354,6 @@ const struct dri_extension card_extensions[] = { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions }, { "GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions }, { "GL_EXT_paletted_texture", GL_EXT_paletted_texture_functions }, - { "GL_IBM_multimode_draw_arrays", GL_IBM_multimode_draw_arrays_functions }, { "GL_MESA_resize_buffers", GL_MESA_resize_buffers_functions }, { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, { "GL_NV_fragment_program", GL_NV_fragment_program_functions }, |