summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/trident/trident_context.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@freedesktop.org>2004-12-24 03:04:14 +0000
committerAdam Jackson <ajax@freedesktop.org>2004-12-24 03:04:14 +0000
commit46a35b2284211e2c068c4c37f8bd3aced240e47a (patch)
tree45a723fcfb6a7557ff61a0adde675d8c82c79f16 /src/mesa/drivers/dri/trident/trident_context.h
parent1c86c7ad9c38b5ef1baa19677b78076889b60e7f (diff)
Get trident building and -Werror clean.
- Added Makefile - Deleted references to old headers - Added prototypes all over the place - Lots of type updates (drmHandle -> drm_handle_t etc.) - Added __driCreateNewScreen(), deleted __driCreateScreen() - Fixed context creation to match other drivers - Fixed various bitfield names - Bumped driver date Still nowhere close to usable, the DDX isn't DRI-aware and there's no DRM.
Diffstat (limited to 'src/mesa/drivers/dri/trident/trident_context.h')
-rw-r--r--src/mesa/drivers/dri/trident/trident_context.h37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/trident/trident_context.h b/src/mesa/drivers/dri/trident/trident_context.h
index ee098e5e7d..74a3acb2ce 100644
--- a/src/mesa/drivers/dri/trident/trident_context.h
+++ b/src/mesa/drivers/dri/trident/trident_context.h
@@ -27,7 +27,6 @@
#ifndef _TRIDENT_CONTEXT_H_
#define _TRIDENT_CONTEXT_H_
-#include "compiler.h"
#include "dri_util.h"
#include "macros.h"
#include "mtypes.h"
@@ -54,6 +53,23 @@
#include "tnl_dd/t_dd_vertex.h"
#undef TAG
+/* these require that base be dword-aligned */
+static inline void MMIO_OUT32(unsigned char *base, unsigned int offset,
+ unsigned int val)
+{
+ unsigned int *addr = (unsigned int *)(base + offset);
+ *addr = val;
+}
+
+static inline unsigned int MMIO_IN32(unsigned char *base, unsigned int offset)
+{
+ unsigned int *addr = (unsigned int *)(base + offset);
+ return *addr;
+}
+
+#define MMIO_OUT8(base, offset, val) *((base) + (offset)) = (val)
+#define MMIO_IN8(base, offset) *((base) + (offset))
+
struct trident_context;
typedef struct trident_context tridentContextRec;
typedef struct trident_context *tridentContextPtr;
@@ -74,7 +90,7 @@ typedef void (*trident_point_func)( tridentContextPtr,
const tridentVertex * );
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
unsigned char *map; /* Mapping of the DRM region */
} tridentRegionRec, *tridentRegionPtr;
@@ -123,11 +139,9 @@ struct trident_context {
/* Mirrors of some DRI state
*/
- Display *display; /* X server display */
-
int lastStamp; /* mirror driDrawable->lastStamp */
- drmContext hHWContext;
+ drm_context_t hHWContext;
drmLock *driHwLock;
int driFd;
@@ -141,10 +155,10 @@ struct trident_context {
GLint readOffset, readPitch;
GLuint numClipRects; /* Cliprects for the draw buffer */
- XF86DRIClipRectPtr pClipRects;
+ drm_clip_rect_t *pClipRects;
GLint scissor;
- XF86DRIClipRectRec ScissorRect; /* Current software scissor */
+ drm_clip_rect_t ScissorRect; /* Current software scissor */
GLuint Fallback;
GLuint RenderIndex;
@@ -199,10 +213,19 @@ void tridentInitHW( tridentContextPtr tmesa );
void tridentDDInitStateFuncs( GLcontext *ctx );
void tridentDDInitTextureFuncs( GLcontext *ctx );
void tridentDDInitTriFuncs( GLcontext *ctx );
+
extern void tridentBuildVertices( GLcontext *ctx,
GLuint start,
GLuint count,
GLuint newinputs );
+extern void tridentInitVB( GLcontext *ctx );
+extern void tridentCopyBuffer( const __DRIdrawablePrivate *dPriv );
+extern void tridentFallback( tridentContextPtr tmesa, GLuint bit,
+ GLboolean mode );
+extern void tridentCheckTexSizes( GLcontext *ctx );
+extern void tridentChooseVertexState( GLcontext *ctx );
+extern void tridentDDUpdateHWState( GLcontext *ctx );
+extern void tridentUploadHwStateLocked( tridentContextPtr tmesa );
#define TRIDENT_CONTEXT(ctx) ((tridentContextPtr)(ctx->DriverCtx))