summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga/mgapixel.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-10-17 19:03:42 -0700
committerKeith Whitwell <[email protected]>2010-10-17 19:09:42 -0700
commit0072acd447dc6be652e63752e50215c3105322c8 (patch)
tree847d1763b54772d336a04e606f8248291c3092b7 /src/mesa/drivers/dri/mga/mgapixel.c
parent543fb77ddece7e1806e8eaa0d65bb2a945ef9a75 (diff)
parentca2b2ac131933b4171b519813df1aaa3a81621cd (diff)
Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts: src/gallium/drivers/llvmpipe/lp_setup_coef.c src/gallium/drivers/llvmpipe/lp_setup_coef.h src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_setup_tri.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.h
Diffstat (limited to 'src/mesa/drivers/dri/mga/mgapixel.c')
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.c40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c
index 664f7c77c2b..b8e365c714c 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.c
+++ b/src/mesa/drivers/dri/mga/mgapixel.c
@@ -55,16 +55,15 @@
(((unsigned long)p) - (unsigned long)mmesa->mgaScreen->buffers.map)
-#if defined(MESA_packed_depth_stencil)
static GLboolean
-check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
+check_depth_stencil_24_8( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz,
GLint pitch )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
- return ( type == GL_UNSIGNED_INT_24_8_MESA &&
+ return ( type == GL_UNSIGNED_INT_24_8 &&
ctx->Visual->DepthBits == 24 &&
ctx->Visual->StencilBits == 8 &&
mmesa->mgaScreen->cpp == 4 &&
@@ -78,11 +77,10 @@ check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
pitch % 32 == 0 &&
pitch < 4096 );
}
-#endif
static GLboolean
-check_depth( const GLcontext *ctx, GLenum type,
+check_depth( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -102,7 +100,7 @@ check_depth( const GLcontext *ctx, GLenum type,
static GLboolean
-check_color( const GLcontext *ctx, GLenum type, GLenum format,
+check_color( const struct gl_context *ctx, GLenum type, GLenum format,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -127,7 +125,7 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
}
static GLboolean
-check_color_per_fragment_ops( const GLcontext *ctx )
+check_color_per_fragment_ops( const struct gl_context *ctx )
{
return (!( ctx->Color.AlphaEnabled ||
ctx->Depth.Test ||
@@ -147,7 +145,7 @@ check_color_per_fragment_ops( const GLcontext *ctx )
}
static GLboolean
-check_depth_per_fragment_ops( const GLcontext *ctx )
+check_depth_per_fragment_ops( const struct gl_context *ctx )
{
return ( ctx->Current.RasterPosValid &&
ctx->Color.ColorMask[0][RCOMP] == 0 &&
@@ -162,7 +160,7 @@ check_depth_per_fragment_ops( const GLcontext *ctx )
*/
#if defined(MESA_packed_depth_stencil)
static GLboolean
-check_stencil_per_fragment_ops( const GLcontext *ctx )
+check_stencil_per_fragment_ops( const struct gl_context *ctx )
{
return ( !ctx->Pixel.IndexShift &&
!ctx->Pixel.IndexOffset );
@@ -171,8 +169,8 @@ check_stencil_per_fragment_ops( const GLcontext *ctx )
static GLboolean
-clip_pixelrect( const GLcontext *ctx,
- const GLframebuffer *buffer,
+clip_pixelrect( const struct gl_context *ctx,
+ const struct gl_framebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height,
GLint *skipPixels, GLint *skipRows,
@@ -217,7 +215,7 @@ clip_pixelrect( const GLcontext *ctx,
}
static GLboolean
-mgaTryReadPixels( GLcontext *ctx,
+mgaTryReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -252,13 +250,11 @@ mgaTryReadPixels( GLcontext *ctx,
return GL_FALSE;
switch (format) {
-#if defined(MESA_packed_depth_stencil)
- case GL_DEPTH_STENCIL_MESA:
+ case GL_DEPTH_STENCIL:
ok = check_depth_stencil_24_8(ctx, type, pack, pixels, size, pitch);
planemask = ~0;
source = mmesa->mgaScreen->depthOffset;
break;
-#endif
case GL_DEPTH_COMPONENT:
ok = check_depth(ctx, type, pack, pixels, size, pitch);
@@ -377,7 +373,7 @@ mgaTryReadPixels( GLcontext *ctx,
}
static void
-mgaDDReadPixels( GLcontext *ctx,
+mgaDDReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -390,7 +386,7 @@ mgaDDReadPixels( GLcontext *ctx,
-static void do_draw_pix( GLcontext *ctx,
+static void do_draw_pix( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint pitch,
const void *pixels,
@@ -474,7 +470,7 @@ static void do_draw_pix( GLcontext *ctx,
static GLboolean
-mgaTryDrawPixels( GLcontext *ctx,
+mgaTryDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -494,8 +490,7 @@ mgaTryDrawPixels( GLcontext *ctx,
switch (format) {
-#if defined(MESA_packed_depth_stencil)
- case GL_DEPTH_STENCIL_MESA:
+ case GL_DEPTH_STENCIL:
dest = mmesa->mgaScreen->depthOffset;
planemask = ~0;
if (!check_depth_stencil_24_8(ctx, type, unpack, pixels, size, pitch) ||
@@ -503,7 +498,6 @@ mgaTryDrawPixels( GLcontext *ctx,
!check_stencil_per_fragment_ops(ctx))
return GL_FALSE;
break;
-#endif
case GL_DEPTH_COMPONENT:
dest = mmesa->mgaScreen->depthOffset;
@@ -625,7 +619,7 @@ mgaTryDrawPixels( GLcontext *ctx,
}
static void
-mgaDDDrawPixels( GLcontext *ctx,
+mgaDDDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -643,7 +637,7 @@ mgaDDDrawPixels( GLcontext *ctx,
* the same block of agp space which isn't used for anything else at
* present.
*/
-void mgaDDInitPixelFuncs( GLcontext *ctx )
+void mgaDDInitPixelFuncs( struct gl_context *ctx )
{
#if 0
/* evidently, these functions don't always work */