summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras/Mesa')
-rw-r--r--xc/extras/Mesa/include/GL/xmesa.h34
-rw-r--r--xc/extras/Mesa/src/FX/fxdrv.h2
-rw-r--r--xc/extras/Mesa/src/X/xmesa1.c3
-rw-r--r--xc/extras/Mesa/src/alphabuf.c4
-rw-r--r--xc/extras/Mesa/src/buffers.c7
-rw-r--r--xc/extras/Mesa/src/context.c8
-rw-r--r--xc/extras/Mesa/src/context.h1
-rw-r--r--xc/extras/Mesa/src/readpix.c2
-rw-r--r--xc/extras/Mesa/src/span.c2
-rw-r--r--xc/extras/Mesa/src/state.c3
-rw-r--r--xc/extras/Mesa/src/types.h1
11 files changed, 18 insertions, 49 deletions
diff --git a/xc/extras/Mesa/include/GL/xmesa.h b/xc/extras/Mesa/include/GL/xmesa.h
index 3f187dbb2..3baec0eb0 100644
--- a/xc/extras/Mesa/include/GL/xmesa.h
+++ b/xc/extras/Mesa/include/GL/xmesa.h
@@ -78,9 +78,6 @@ extern "C" {
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "xmesa_x.h"
-#ifdef GLX_DIRECT_RENDERING
-#include "dri_mesa.h"
-#endif
#endif
#include "GL/gl.h"
@@ -116,18 +113,6 @@ typedef struct xmesa_visual *XMesaVisual;
typedef struct xmesa_buffer *XMesaBuffer;
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
-/*
- * Initialize the XMesa driver.
- */
-extern GLboolean XMesaInitDriver( __DRIscreenPrivate *driScrnPriv );
-
-/*
- * Reset the XMesa driver when the X server resets.
- */
-extern void XMesaResetDriver( __DRIscreenPrivate *driScrnPriv );
-#endif
-
/*
@@ -186,11 +171,7 @@ extern void XMesaDestroyVisual( XMesaVisual v );
* Return: an XMesaContext or NULL if error.
*/
extern XMesaContext XMesaCreateContext( XMesaVisual v,
- XMesaContext share_list
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- , __DRIcontextPrivate *driContextPriv
-#endif
- );
+ XMesaContext share_list );
/*
@@ -202,12 +183,7 @@ extern void XMesaDestroyContext( XMesaContext c );
/*
* Create an XMesaBuffer from an X window.
*/
-extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v,
- XMesaWindow w
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- , __DRIdrawablePrivate *driDrawPriv
-#endif
- );
+extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w );
/*
@@ -215,11 +191,7 @@ extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v,
*/
extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v,
XMesaPixmap p,
- XMesaColormap cmap
-#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
- , __DRIdrawablePrivate *driDrawPriv
-#endif
- );
+ XMesaColormap cmap );
/*
diff --git a/xc/extras/Mesa/src/FX/fxdrv.h b/xc/extras/Mesa/src/FX/fxdrv.h
index 924b4a164..79976042a 100644
--- a/xc/extras/Mesa/src/FX/fxdrv.h
+++ b/xc/extras/Mesa/src/FX/fxdrv.h
@@ -428,8 +428,10 @@ struct tfxMesaContext {
GuTexPalette glbPalette;
GLcontext *glCtx; /* the core Mesa context */
+#if !defined(XFree86Server) && !defined(GLX_DIRECT_RENDERING)
GLvisual *glVis; /* describes the color buffer */
GLframebuffer *glBuffer; /* the ancillary buffers */
+#endif
GLint board; /* the board used for this context */
GLint width, height; /* size of color buffer */
diff --git a/xc/extras/Mesa/src/X/xmesa1.c b/xc/extras/Mesa/src/X/xmesa1.c
index 618475d1c..b132f3bb3 100644
--- a/xc/extras/Mesa/src/X/xmesa1.c
+++ b/xc/extras/Mesa/src/X/xmesa1.c
@@ -1551,8 +1551,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
}
}
- v->gl_visual = _mesa_create_visual( rgb_flag, alpha_flag,
- db_flag, stereo_flag,
+ v->gl_visual = _mesa_create_visual( rgb_flag, db_flag, stereo_flag,
red_bits, green_bits,
blue_bits, alpha_bits,
v->index_bits,
diff --git a/xc/extras/Mesa/src/alphabuf.c b/xc/extras/Mesa/src/alphabuf.c
index ab65a71dc..7bba72b47 100644
--- a/xc/extras/Mesa/src/alphabuf.c
+++ b/xc/extras/Mesa/src/alphabuf.c
@@ -60,7 +60,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf )
{
GLint bytes = buf->Width * buf->Height * sizeof(GLubyte);
- ASSERT(ctx->Visual->SoftwareAlpha);
+ ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffer);
if (buf->FrontLeftAlpha) {
FREE( buf->FrontLeftAlpha );
@@ -141,7 +141,7 @@ _mesa_clear_alpha_buffers( GLcontext *ctx )
const GLubyte aclear = (GLint) (ctx->Color.ClearColor[3] * 255.0F);
GLuint bufferBit;
- ASSERT(ctx->Visual->SoftwareAlpha);
+ ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffer);
ASSERT(ctx->Color.ColorMask[ACOMP]);
/* loop over four possible alpha buffers */
diff --git a/xc/extras/Mesa/src/buffers.c b/xc/extras/Mesa/src/buffers.c
index a99110ab6..086dc9345 100644
--- a/xc/extras/Mesa/src/buffers.c
+++ b/xc/extras/Mesa/src/buffers.c
@@ -297,7 +297,8 @@ _mesa_Clear( GLbitfield mask )
}
/* clear software-based alpha buffer(s) */
- if ( (mask & GL_COLOR_BUFFER_BIT) && ctx->Visual->SoftwareAlpha
+ if ( (mask & GL_COLOR_BUFFER_BIT)
+ && ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[RCOMP]) {
_mesa_clear_alpha_buffers( ctx );
}
@@ -427,7 +428,7 @@ _mesa_DrawBuffer( GLenum mode )
/*
* Set current alpha buffer pointer
*/
- if (ctx->Visual->SoftwareAlpha) {
+ if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
if (ctx->Color.DriverDrawBuffer == GL_FRONT_LEFT)
ctx->DrawBuffer->Alpha = ctx->DrawBuffer->FrontLeftAlpha;
else if (ctx->Color.DriverDrawBuffer == GL_BACK_LEFT)
@@ -557,7 +558,7 @@ _mesa_ResizeBuffersMESA( void )
if (ctx->DrawBuffer->UseSoftwareAccumBuffer) {
_mesa_alloc_accum_buffer( ctx );
}
- if (ctx->Visual->SoftwareAlpha) {
+ if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
_mesa_alloc_alpha_buffers( ctx );
}
}
diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c
index f72b0caa0..67ca90e3c 100644
--- a/xc/extras/Mesa/src/context.c
+++ b/xc/extras/Mesa/src/context.c
@@ -252,7 +252,6 @@ static void print_timings( GLcontext *ctx )
/*
* Allocate a new GLvisual object.
* Input: rgbFlag - GL_TRUE=RGB(A) mode, GL_FALSE=Color Index mode
- * alphaFlag - alloc software alpha buffers?
* dbFlag - double buffering?
* stereoFlag - stereo buffer?
* depthBits - requested bits per depth buffer value
@@ -269,7 +268,6 @@ static void print_timings( GLcontext *ctx )
*/
GLvisual *
_mesa_create_visual( GLboolean rgbFlag,
- GLboolean alphaFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -323,7 +321,7 @@ _mesa_create_visual( GLboolean rgbFlag,
vis->RedBits = redBits;
vis->GreenBits = greenBits;
vis->BlueBits = blueBits;
- vis->AlphaBits = alphaFlag ? (8 * sizeof(GLubyte)) : alphaBits;
+ vis->AlphaBits = alphaBits;
vis->IndexBits = indexBits;
vis->DepthBits = depthBits;
@@ -333,8 +331,6 @@ _mesa_create_visual( GLboolean rgbFlag,
vis->AccumAlphaBits = (accumAlphaBits > 0) ? (8 * sizeof(GLaccum)) : 0;
vis->StencilBits = (stencilBits > 0) ? (8 * sizeof(GLstencil)) : 0;
- vis->SoftwareAlpha = alphaFlag;
-
if (depthBits == 0) {
/* Special case. Even if we don't have a depth buffer we need
* good values for DepthMax for Z vertex transformation purposes.
@@ -365,7 +361,7 @@ GLvisual *gl_create_visual( GLboolean rgbFlag,
GLint blueBits,
GLint alphaBits )
{
- return _mesa_create_visual(rgbFlag, alphaFlag, dbFlag, stereoFlag,
+ return _mesa_create_visual(rgbFlag, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
indexBits, depthBits, stencilBits,
accumBits, accumBits, accumBits, accumBits, 0);
diff --git a/xc/extras/Mesa/src/context.h b/xc/extras/Mesa/src/context.h
index da5ad0d72..b280fdae9 100644
--- a/xc/extras/Mesa/src/context.h
+++ b/xc/extras/Mesa/src/context.h
@@ -58,7 +58,6 @@
*/
extern GLvisual *
_mesa_create_visual( GLboolean rgbFlag,
- GLboolean alphaFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
diff --git a/xc/extras/Mesa/src/readpix.c b/xc/extras/Mesa/src/readpix.c
index cc1823897..df5ca64ff 100644
--- a/xc/extras/Mesa/src/readpix.c
+++ b/xc/extras/Mesa/src/readpix.c
@@ -567,7 +567,7 @@ read_fast_rgba_pixels( GLcontext *ctx,
for (row=0; row<readHeight; row++) {
(*ctx->Driver.ReadRGBASpan)(ctx, readWidth, srcX, srcY,
(GLubyte (*)[4]) dest);
- if (ctx->Visual->SoftwareAlpha) {
+ if (ctx->ReadBuffer->UseSoftwareAlphaBuffers) {
_mesa_read_alpha_span(ctx, readWidth, srcX, srcY,
(GLubyte (*)[4]) dest);
}
diff --git a/xc/extras/Mesa/src/span.c b/xc/extras/Mesa/src/span.c
index a5d1a7c9b..653d0dc12 100644
--- a/xc/extras/Mesa/src/span.c
+++ b/xc/extras/Mesa/src/span.c
@@ -1001,7 +1001,7 @@ void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer,
}
(*ctx->Driver.ReadRGBASpan)( ctx, length, x + skip, y, rgba + skip );
- if (ctx->Visual->SoftwareAlpha) {
+ if (buffer->UseSoftwareAlphaBuffers) {
_mesa_read_alpha_span( ctx, length, x + skip, y, rgba + skip );
}
}
diff --git a/xc/extras/Mesa/src/state.c b/xc/extras/Mesa/src/state.c
index b2ec15607..bb8452842 100644
--- a/xc/extras/Mesa/src/state.c
+++ b/xc/extras/Mesa/src/state.c
@@ -791,7 +791,8 @@ static void update_rasterflags( GLcontext *ctx )
if (ctx->Stencil.Enabled) ctx->RasterMask |= STENCIL_BIT;
if (ctx->Color.SWmasking) ctx->RasterMask |= MASKING_BIT;
- if (ctx->Visual->SoftwareAlpha && ctx->Color.ColorMask[ACOMP]
+ if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
+ && ctx->Color.ColorMask[ACOMP]
&& ctx->Color.DrawBuffer != GL_NONE)
ctx->RasterMask |= ALPHABUF_BIT;
diff --git a/xc/extras/Mesa/src/types.h b/xc/extras/Mesa/src/types.h
index 78a40ace1..00c4275e7 100644
--- a/xc/extras/Mesa/src/types.h
+++ b/xc/extras/Mesa/src/types.h
@@ -1236,7 +1236,6 @@ struct gl_visual {
GLboolean RGBAflag; /* Is frame buffer in RGBA mode, not CI? */
GLboolean DBflag; /* Is color buffer double buffered? */
GLboolean StereoFlag; /* stereo buffer? */
- GLboolean SoftwareAlpha; /* Implement software alpha buffer? */
GLint RedBits; /* Bits per color component */
GLint GreenBits;