Commit 13f3c1ec authored by jhartmann's avatar jhartmann
Browse files

Import of XFree86 4.0

parent dc1f830c
#
# $Id: Makefile.in,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $
# Id: Makefile.in,v 1.4 1998/12/06 18:50:22 mleisher Exp $
#
#
......
#
# $Id: README,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $
# Id: README,v 1.18 1999/08/19 16:30:24 mleisher Exp $
#
#
......
dnl $Id: configure.in,v 1.1.1.1 1999/12/05 01:23:19 daryll Exp $
dnl Id: configure.in,v 1.1 1998/01/14 21:45:26 mleisher Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(../../lib/freetype.h)
......
#
# $Id: iso8859.1,v 1.1.1.1 2000/02/22 15:38:16 kem Exp $
# Id: iso8859.1,v 1.2 1999/06/16 16:13:11 mleisher Exp $
#
# SAMPLE TTF2BDF MAPPING TABLE
#
......
#
# $Id: iso8859.2,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $
# Id: iso8859.2,v 1.2 1999/06/16 16:13:11 mleisher Exp $
#
# SAMPLE TTF2BDF MAPPING TABLE
#
......
#
# $Id: iso8859.3,v 1.1.1.1 2000/02/22 15:38:16 kem Exp $
# Id: iso8859.3,v 1.2 1999/06/16 16:13:11 mleisher Exp $
#
# SAMPLE TTF2BDF MAPPING TABLE
#
......
......@@ -22,9 +22,9 @@
*/
#ifndef lint
#ifdef __GNUC__
static char rcsid[] __attribute__ ((unused)) = "$Id: remap.c,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $";
static char rcsid[] __attribute__ ((unused)) = "Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $";
#else
static char rcsid[] = "$Id: remap.c,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $";
static char rcsid[] = "Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $";
#endif
#endif
......
......@@ -25,7 +25,7 @@
#define _h_remap
/*
* $Id: remap.h,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $
* Id: remap.h,v 1.4 1999/05/03 17:07:04 mleisher Exp $
*/
#ifdef __cplusplus
......
......@@ -22,9 +22,9 @@
*/
#ifndef lint
#ifdef __GNUC__
static char rcsid[] __attribute__ ((unused)) = "$Id: ttf2bdf.c,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $";
static char rcsid[] __attribute__ ((unused)) = "Id: ttf2bdf.c,v 1.25 1999/10/21 16:31:54 mleisher Exp $";
#else
static char rcsid[] = "$Id: ttf2bdf.c,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $";
static char rcsid[] = "Id: ttf2bdf.c,v 1.25 1999/10/21 16:31:54 mleisher Exp $";
#endif
#endif
......
.\"
.\" $Id: ttf2bdf.man,v 1.1.1.2 2000/02/22 15:38:16 kem Exp $
.\" Id: ttf2bdf.man,v 1.14 1999/10/21 16:31:54 mleisher Exp $
.\"
.TH TTF2BDF 1 "21 October 1999" "X Version 11"
.SH NAME
......
......@@ -46,7 +46,7 @@
#include "freetype.h"
#include "extend/ftxpost.h" /* we are in the FreeType package tree */
char rcsid[] = "$Id: ttf2pfb.c,v 1.1.1.2 2000/02/22 15:38:17 kem Exp $";
char rcsid[] = "Id: ttf2pfb.c,v 1.13 1999/08/20 13:14:26 werner Exp $";
#define PID_UNICODE 3
......@@ -885,7 +885,7 @@ tmp_out(FILE* tmpout)
Fputps("%!PS");
Fputps("%%% CharString debugging program.");
Fputps("%%% Generated by: ttf2pfb $Revision: 1.1.1.2 $");
Fputps("%%% Generated by: ttf2pfb Revision: 1.13 $");
Fputps("%%% plot char-string (pathes defined in /cjkxxxx)");
Fputps("");
Fputps("%%% user-defined parameter");
......
......@@ -4,7 +4,7 @@
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1.1.1 1999/12/05 01:22:27 daryll Exp $
# Id: mkinstalldirs,v 1.2 1998/09/01 16:52:17 werner Exp $
errstatus=0
......
......@@ -23,9 +23,9 @@
#ifndef lint
#ifdef __GNUC__
static char rcsid[] __attribute__ ((unused)) = "$Id: common.c,v 1.1.1.2 2000/02/22 15:38:42 kem Exp $";
static char rcsid[] __attribute__ ((unused)) = "Id: common.c,v 1.14 1999/08/13 12:54:34 werner Exp $";
#else
static char rcsid[] = "$Id: common.c,v 1.1.1.2 2000/02/22 15:38:42 kem Exp $";
static char rcsid[] = "Id: common.c,v 1.14 1999/08/13 12:54:34 werner Exp $";
#endif
#endif
......
......@@ -56,38 +56,44 @@
# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
# pragma warning( disable : 4127 ) /* conditional expression is constant */
# if defined(MESA_MINWARN)
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# if defined(MESA_MINWARN)
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# endif
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
# define GLAPIENTRYP __stdcall *
# define GLCALLBACK __stdcall
# define GLCALLBACKP __stdcall *
# define GLWINAPI __stdcall
# define GLWINAPIV __cdecl
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
# define GLAPIENTRYP __stdcall *
# define GLCALLBACK __stdcall
# define GLCALLBACKP __stdcall *
# if defined(__CYGWIN32__)
# define GLCALLBACKPCAST *
# else
# define GLCALLBACKPCAST __stdcall *
# endif
# define GLWINAPI __stdcall
# define GLWINAPIV __cdecl
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
# define GLAPIENTRYP *
# define GLCALLBACK
# define GLCALLBACKP *
# define GLWINAPI
# define GLWINAPIV
# define GLAPI extern
# define GLAPIENTRY
# define GLAPIENTRYP *
# define GLCALLBACK
# define GLCALLBACKP *
# define GLCALLBACKPCAST *
# define GLWINAPI
# define GLWINAPIV
#endif /* WIN32 / CYGWIN32 bracket */
/* compatability guard so we don't need to change client code */
......@@ -130,18 +136,9 @@ extern "C" {
/*
* Apps can test for this symbol to do conditional compilation if needed.
*/
/* XXX these Mesa symbols are going away
#define MESA
#define MESA_MAJOR_VERSION 3
#define MESA_MINOR_VERSION 1
*/
#define GL_VERSION_1_1 1
#define GL_VERSION_1_2 1
#define GL_HAS_GLEXT 1
......@@ -1783,7 +1780,7 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
/*
* XXX these extensions may eventually be moved into a new glext.h file
* XXX these extensions may eventually be moved into glext.h
*/
......@@ -2157,19 +2154,19 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/*
* GL_INGR_blend_func_separate (EXT number 173)
* GL_EXT_blend_func_separate (EXT number 173) (aka GL_INGR_blend_func_separate)
*/
#ifndef GL_INGR_blend_func_separate
#define GL_INGR_blend_func_separate 1
#ifndef GL_EXT_blend_func_separate
#define GL_EXT_blend_func_separate 1
#define GL_BLEND_DST_RGB_INGR 0x80C8
#define GL_BLEND_SRC_RGB_INGR 0x80C9
#define GL_BLEND_DST_ALPHA_INGR 0x80CA
#define GL_BLEND_SRC_ALPHA_INGR 0x80CB
#define GL_BLEND_DST_RGB_EXT 0x80C8
#define GL_BLEND_SRC_RGB_EXT 0x80C9
#define GL_BLEND_DST_ALPHA_EXT 0x80CA
#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
GLAPI void GLAPIENTRY glBlendFuncSeparateINGR( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha );
GLAPI void GLAPIENTRY glBlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha );
#endif /* GL_INGR_blend_func_separate */
#endif /* GL_EXT_blend_func_separate */
......@@ -2199,7 +2196,7 @@ GLAPI void GLAPIENTRY glBlendFuncSeparateINGR( GLenum sfactorRGB, GLenum dfactor
/*
* GL_ARB_multitexture (no number)
* GL_ARB_multitexture (ARB 0)
*/
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
......@@ -2280,7 +2277,7 @@ GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
/*
* GL_MESA_window_pos (no number)
* GL_MESA_window_pos (197)
*/
#ifndef GL_MESA_window_pos
#define GL_MESA_window_pos 1
......@@ -2315,7 +2312,7 @@ GLAPI void GLAPIENTRY glWindowPos4dvMESA( const GLdouble *p );
/*
* GL_MESA_resize_bufffers (no number)
* GL_MESA_resize_bufffers (196)
*/
#ifndef GL_MESA_resize_bufffers
#define GL_MESA_resize_buffers 1
......@@ -2327,7 +2324,7 @@ GLAPI void GLAPIENTRY glResizeBuffersMESA( void );
/*
* GL_ARB_tranpose_matrix (number ?)
* GL_ARB_tranpose_matrix (ARB 2)
*/
#ifndef GL_ARB_transpose_matrix
#define GL_ARB_transpose_matrix 1
......@@ -2342,7 +2339,21 @@ GLAPI void GLAPIENTRY glLoadTransposeMatrixfARB( const GLfloat m[16] );
GLAPI void GLAPIENTRY glMultTransposeMatrixdARB( const GLdouble m[16] );
GLAPI void GLAPIENTRY glMultTransposeMatrixfARB( const GLfloat m[16] );
#endif
#endif /* GL_ARB_tranpose_matrix */
/*
* GL_ARB_multisample (ARB 4)
*/
#ifndef GL_ARB_multisample
#define GL_ARB_multisample 1
GLAPI void GLAPIENTRY glSampleCoverageARB(GLclampf value, GLboolean invert);
GLAPI void GLAPIENTRY glSamplePassARB(GLenum pass);
#endif /* GL_ARB_multisample */
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
* Mesa 3-D graphics library
* Version: 3.3
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2000 Brian Paul 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"),
......@@ -224,7 +224,7 @@ extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
GLXContext ctx);
extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
GLuint mask );
unsigned long mask );
extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
......
......@@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
* $Header: /home/ajax/dri-backup/xc/xc/extras/Mesa/include/GL/Attic/xmesa_x.h,v 1.1.1.1 2000/02/22 15:38:44 kem Exp $
*/
#ifndef _XMESA_X_H_
......@@ -78,7 +77,6 @@ typedef XColor XMesaColor;
#define GET_REDMASK(__v) __v->visinfo->red_mask
#define GET_GREENMASK(__v) __v->visinfo->green_mask
#define GET_BLUEMASK(__v) __v->visinfo->blue_mask
#define GET_BITS_PER_PIXEL(__v) bits_per_pixel(__v->display, __v->visinfo)
#if defined(__cplusplus) || defined(c_plusplus)
#define GET_VISUAL_CLASS(__v) __v->visinfo->c_class
#else
......
......@@ -25,12 +25,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/extras/Mesa/include/GL/xmesa_xf86.h,v 1.4 2000/03/03 16:02:10 tsi Exp $ */
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
* $Header: /home/ajax/dri-backup/xc/xc/extras/Mesa/include/GL/Attic/xmesa_xf86.h,v 1.1.1.1 2000/02/22 15:38:44 kem Exp $
*/
#ifndef _XMESA_XF86_H_
......@@ -128,12 +128,12 @@ do { \
do { \
xRectangle __r[1]; \
(void) __d; \
ValidateGC(__b, __gc); \
ValidateGC((DrawablePtr)__b, __gc); \
__r[0].x = __x; \
__r[0].y = __y; \
__r[0].width = __w; \
__r[0].height = __h; \
(*__gc->ops->PolyFillRect)(__b, __gc, 1, __r); \
(*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
} while (0)
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
......@@ -179,13 +179,6 @@ do { \
#define GET_REDMASK(__v) __v->visinfo->redMask
#define GET_GREENMASK(__v) __v->visinfo->greenMask
#define GET_BLUEMASK(__v) __v->visinfo->blueMask
/*XXX this was wrong. However, using nplanes instead may fail when
* we have overlay planes in the future!
*/
/*#define GET_BITS_PER_PIXEL(__v) __v->visinfo->bitsPerRGBValue*/
#define GET_BITS_PER_PIXEL(__v) __v->visinfo->nplanes
#define GET_VISUAL_CLASS(__v) __v->visinfo->class
#define GET_VISUAL_DEPTH(__v) __v->visinfo->nplanes
#define GET_BLACK_PIXEL(__v) __v->display->blackPixel
......
......@@ -52,6 +52,7 @@
#if defined(FX)
#include "image.h"
#include "types.h"
#include "fxdrv.h"
#include "enums.h"
......@@ -169,95 +170,110 @@ static void fxDDClearColor(GLcontext *ctx, GLubyte red, GLubyte green,
fxMesa->clearA=alpha;
}
/* Clear the color and/or depth buffers */
static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
const FxU16 clearD = (FxU16) (ctx->Depth.Clear * 0xffff);
GLbitfield softwareMask = mask & (DD_STENCIL_BIT | DD_ACCUM_BIT);
GLbitfield newMask = mask & ~(DD_STENCIL_BIT | DD_ACCUM_BIT);
if (MESA_VERBOSE&VERBOSE_DRIVER) {
if (MESA_VERBOSE & VERBOSE_DRIVER) {
fprintf(stderr,"fxmesa: fxDDClear(%d,%d,%d,%d)\n", (int) x, (int) y,
(int) width, (int) height);
}
if (mask == (DD_BACK_LEFT_BIT | DD_DEPTH_BIT)
&& colorMask == 0xffffffff) {
/* common case: clear back color buffer and depth buffer */
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
(FxU16)(ctx->Depth.Clear*0xffff));
return 0;
}
/* depth masking */
if (newMask & DD_DEPTH_BIT) {
FX_grDepthMask(FXTRUE);
CLEAR_BITS(newMask, DD_DEPTH_BIT);
}
else {
FX_grDepthMask(FXFALSE);
}
if (colorMask != 0xffffffff) {
/* do masked color clear in software */
softwareMask |= (newMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
CLEAR_BITS(newMask, (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
/* do color buffer clears in software */
softwareMask |= (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT);
}
if (newMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) {
if (newMask & DD_FRONT_LEFT_BIT) {
if (mask & DD_DEPTH_BIT) {
/* XXX it appears that the depth buffer isn't cleared when
* glRenderBuffer(GR_BUFFER_FRONTBUFFER) is set.
* This is a work-around/
*/
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grColorMask(FXFALSE,FXFALSE);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
(FxU16)(ctx->Depth.Clear*0xffff));
FX_grColorMask(ctx->Color.ColorMask[RCOMP] ||
ctx->Color.ColorMask[GCOMP] ||
ctx->Color.ColorMask[BCOMP],
ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
/*
* This could probably be done fancier but doing each possible case
* explicitly is less error prone.
*/
switch (mask) {
case DD_BACK_LEFT_BIT | DD_DEPTH_BIT:
/* back buffer & depth */
FX_grDepthMask(FXTRUE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
if (!ctx->Depth.Mask) {
FX_grDepthMask(FXFALSE);
}
break;
case DD_FRONT_LEFT_BIT | DD_DEPTH_BIT:
/* XXX it appears that the depth buffer isn't cleared when
* glRenderBuffer(GR_BUFFER_FRONTBUFFER) is set.
* This is a work-around/
*/
/* clear depth */
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grColorMask(FXFALSE,FXFALSE);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
/* clear front */
FX_grColorMask(FXTRUE, ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
break;
case DD_BACK_LEFT_BIT:
/* back buffer only */
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
if (!ctx->Depth.Mask) {
FX_grDepthMask(FXFALSE);
}
break;
case DD_FRONT_LEFT_BIT:
/* front buffer only */
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
(FxU16)(ctx->Depth.Clear*0xffff));
}
if (newMask & DD_BACK_LEFT_BIT) {
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
if (!ctx->Depth.Mask) {
FX_grDepthMask(FXFALSE);
}
break;
case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT:
/* front and back */
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
if (!ctx->Depth.Mask) {
FX_grDepthMask(FXFALSE);
}
break;
case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT:
/* clear front */
FX_grDepthMask(FXFALSE);
FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
/* clear back and depth */
FX_grDepthMask(FXTRUE);
FX_grRenderBuffer(GR_BUFFER_BACKBUFFER);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA, clearD);
if (!ctx->Depth.Mask) {
FX_grDepthMask(FXFALSE);
}
break;
case DD_DEPTH_BIT:
/* just the depth buffer */
FX_grColorMask(FXFALSE,FXFALSE);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
(FxU16)(ctx->Depth.Clear*0xffff));
}
CLEAR_BITS(newMask, (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
}
else if (mask & DD_DEPTH_BIT) {
/* clear depth but not color */
FX_grColorMask(FXFALSE,FXFALSE);
FX_grBufferClear(fxMesa->clearC, fxMesa->clearA,
(FxU16)(ctx->Depth.Clear*0xffff));
FX_grColorMask(ctx->Color.ColorMask[RCOMP] ||
ctx->Color.ColorMask[GCOMP] ||
ctx->Color.ColorMask[BCOMP],
ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
}
/* Restore depth mask state */
if (mask & DD_DEPTH_BIT) {
if (ctx->Depth.Mask) {
FX_grDepthMask(FXTRUE);
}
else {
FX_grDepthMask(FXFALSE);
}
FX_grColorMask(FXTRUE, ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
break;
default:
/* error */
;
}
return newMask | softwareMask;
return softwareMask;
}
......@@ -311,11 +327,10 @@ static void fxDDSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer,
#ifdef XF86DRI
/* test if window coord (px,py) is visible */
static GLboolean inClipRects(fxMesaContext fxMesa, int px, int py)
{
int i;
py=fxMesa->height+fxMesa->y_offset-py;
for (i=0; i<fxMesa->numClipRects; i++) {
if ((px>=fxMesa->pClipRects[i].x1) &&
(px<fxMesa->pClipRects[i].x2) &&
......@@ -333,127 +348,170 @@ static GLboolean fxDDDrawBitMap(GLcontext *ctx, GLint px, GLint py,
const GLubyte *bitmap)
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
FxU16 *p;
GrLfbInfo_t info;
const GLubyte *pb;
int x,y,xmin,xmax,ymin,ymax;
GLint r,g,b,a,scrwidth,scrheight,stride;
FxU16 color;
/* TODO: with a little work, these bitmap unpacking parameter restrictions
* could be removed.
*/
if((unpack->Alignment!=1) ||
(unpack->RowLength!=0) ||
(unpack->SkipPixels!=0) ||
(unpack->SkipRows!=0) ||
(unpack->SwapBytes) ||
(unpack->LsbFirst))
const struct gl_pixelstore_attrib *finalUnpack;
struct gl_pixelstore_attrib scissoredUnpack;
/* check if there's any raster operations enabled which we can't handle */
if (ctx->RasterMask & (ALPHATEST_BIT |
BLEND_BIT |
DEPTH_BIT |
FOG_BIT |
LOGIC_OP_BIT |
SCISSOR_BIT |