-/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgacontext.h,v 1.7 2002/12/16 16:18:52 dawes Exp $*/
/*
* Copyright 2000-2001 VA Linux Systems, Inc.
* All Rights Reserved.
#ifndef MGALIB_INC
#define MGALIB_INC
-#include <inttypes.h>
+#include <stdint.h>
+#include "drm.h"
+#include "mga_drm.h"
#include "dri_util.h"
-#include "mtypes.h"
#include "xf86drm.h"
-#include "mm.h"
-#include "mga_sarea.h"
-#include "colormac.h"
+#include "main/mtypes.h"
+#include "main/mm.h"
+#include "main/colormac.h"
+#include "main/macros.h"
#include "texmem.h"
-#include "macros.h"
#include "xmlconfig.h"
#define MGA_SET_FIELD(reg,mask,val) reg = ((reg) & (mask)) | ((val) & ~(mask))
#define MGA_FALLBACK_STENCIL 0x20
#define MGA_FALLBACK_DEPTH 0x40
#define MGA_FALLBACK_BORDER_MODE 0x80
+#define MGA_FALLBACK_DISABLE 0x100
/* Use the templated vertex formats:
int texelBytes;
GLuint age;
- mga_texture_regs_t setup;
+ drm_mga_texture_regs_t setup;
/* If one texture dimension wraps with GL_CLAMP and the other with
* GL_CLAMP_TO_EDGE, we have to fallback to software. We would also have
GLuint NewGLState;
GLuint dirty;
- mga_context_regs_t setup;
+ drm_mga_context_regs_t setup;
GLuint ClearColor;
GLuint ClearDepth;
drmBufPtr vertex_dma_buffer;
drmBufPtr iload_buffer;
- /* VBI
- */
- GLuint vbl_seq;
- GLuint vblank_flags;
-
int64_t swap_ust;
int64_t swap_missed_ust;
GLuint swap_count;
GLuint swap_missed_count;
- PFNGLXGETUSTPROC get_ust;
+ uint32_t last_frame_fence;
/* Drawable, cliprect and scissor information
*/
/* Mirrors of some DRI state.
*/
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
- __DRIdrawablePrivate *driDrawable;
- __DRIdrawablePrivate *driReadable;
-
- /**
- * Drawable used by Mesa for software fallbacks for reading and
- * writing. It is set by Mesa's \c SetBuffer callback, and will always be
- * either \c mga_context_t::driDrawable or \c mga_context_t::driReadable.
- */
- __DRIdrawablePrivate *mesa_drawable;
+ __DRIdrawable *driDrawable;
+ __DRIdrawable *driReadable;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
struct mga_screen_private_s *mgaScreen;
- MGASAREAPrivPtr sarea;
+ drm_mga_sarea_t *sarea;
/* Configuration cache
*/
#define DEBUG_VERBOSE_TEXTURE 0x08
#define DEBUG_VERBOSE_FALLBACK 0x10
-static __inline__ GLuint mgaPackColor(GLuint cpp,
- GLubyte r, GLubyte g,
- GLubyte b, GLubyte a)
+static INLINE GLuint mgaPackColor(GLuint cpp,
+ GLubyte r, GLubyte g,
+ GLubyte b, GLubyte a)
{
switch (cpp) {
case 2: