* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h,v 1.5 2002/02/24 21:51:10 dawes Exp $ */
/*
* New fixes:
#ifdef XFree86Server
#include "GL/xf86glx.h"
#else
-#include "glheader.h"
+#include "main/glheader.h"
#endif
#if defined(__linux__)
#include <signal.h>
#include "drm.h"
#include "drm_sarea.h"
#include "tdfx_glide.h"
+#include "xmlconfig.h"
-#include "clip.h"
-#include "context.h"
-#include "macros.h"
-#include "matrix.h"
-#include "imports.h"
-#include "mtypes.h"
+#include "main/clip.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/matrix.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
#include "tdfx_screen.h"
#define TDFX_FALLBACK_COLORMASK 0x0100
#define TDFX_FALLBACK_BLEND 0x0200
#define TDFX_FALLBACK_LINE_STIPPLE 0x0400
+#define TDFX_FALLBACK_DISABLE 0x0800
/* Different Glide vertex layouts
*/
char rendererString[100];
/* stuff added for DRI */
- __DRIscreenPrivate *driScreen;
- __DRIcontextPrivate *driContext;
- __DRIdrawablePrivate *driDrawable;
+ __DRIscreen *driScreen;
+ __DRIcontext *driContext;
+
+ /**
+ * DRI drawable bound to this context for drawing.
+ */
+ __DRIdrawable *driDrawable;
+
+ /**
+ * DRI drawable bound to this context for reading.
+ */
+ __DRIdrawable *driReadable;
+
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
tdfxStats stats;
- GLboolean debugFallbacks;
+ /* Configuration cache
+ */
+ driOptionCache optionCache;
};
#define TDFX_CONTEXT(ctx) ((tdfxContextPtr)((ctx)->DriverCtx))
extern GLboolean
-tdfxCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+tdfxCreateContext( gl_api api,
+ const __GLcontextModes *mesaVis,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void
-tdfxDestroyContext( __DRIcontextPrivate *driContextPriv );
+tdfxDestroyContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxUnbindContext( __DRIcontextPrivate *driContextPriv );
+tdfxUnbindContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+tdfxMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
extern GLboolean
tdfxInitGlide( tdfxContextPtr tmesa );
#define TDFXPACKCOLOR4444( r, g, b, a ) \
((((a) & 0xf0) << 8) | (((b) & 0xf0) << 4) | ((g) & 0xf0) | ((r) >> 4))
-static __inline__ GrColor_t tdfxPackColor( GLuint cpp,
- GLubyte r, GLubyte g,
- GLubyte b, GLubyte a )
+static INLINE GrColor_t tdfxPackColor( GLuint cpp,
+ GLubyte r, GLubyte g,
+ GLubyte b, GLubyte a )
{
switch ( cpp ) {
case 2:
}
}
-#define DO_DEBUG 0
+#define DO_DEBUG 1
#if DO_DEBUG
extern int TDFX_DEBUG;
#else
#define DEBUG_ALWAYS_SYNC 0x01
#define DEBUG_VERBOSE_API 0x02
-#define DEBUG_VERBOSE_MSG 0x04
-#define DEBUG_VERBOSE_LRU 0x08
-#define DEBUG_VERBOSE_DRI 0x10
-#define DEBUG_VERBOSE_IOCTL 0x20
-#define DEBUG_VERBOSE_2D 0x40
+#define DEBUG_VERBOSE_DRI 0x04
+#define DEBUG_VERBOSE_FALL 0x08
/* conf */
#define FX_COMPRESS_S3TC_AS_FXT1_HACK 1