aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/sis/sis_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2004-06-08 09:19:17 +0000
committerEric Anholt <[email protected]>2004-06-08 09:19:17 +0000
commite84f77be215ec1fc7a27388819b6c3a711057e4a (patch)
treee7f86df30254abcdb5f5581a9dc00a41d0877ac6 /src/mesa/drivers/dri/sis/sis_context.h
parenta94185474d38f88f141d45d8d42bf9ea081c483d (diff)
* Convert to use t_vertex.c instead of sis_vb.[ch]
* Don't dispatch vertices directly to MMIO; queue them up in dma-like buffers first. This makes things more uniform between AGP and MMIO paths, cleans up some locking ugliness, and makes the driver look more like other drivers. * Don't use the AGP Cmd buffer provided by the server. Instead allocate one in the client, which avoids the need for lots of synchronization stuff. * Mark some MMIO accesses volatile that should have been. * Disable the AGP submission path by default (agp_disable=true) due to unresolved issues in the new code. The old code had its own (serious) errors with AGP, so this is not really a step backwards.
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_context.h')
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h
index cc35c028727..0ea2e2a59ac 100644
--- a/src/mesa/drivers/dri/sis/sis_context.h
+++ b/src/mesa/drivers/dri/sis/sis_context.h
@@ -40,6 +40,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drm.h"
#include "drm_sarea.h"
#include "xmlconfig.h"
+#include "tnl/t_vertex.h"
#include "sis_screen.h"
#include "sis_common2.h"
@@ -237,18 +238,26 @@ struct sis_context
/* This must be first in this structure */
GLcontext *glCtx;
+ /* Vertex state */
+ GLuint vertex_size;
+ struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
+ GLuint vertex_attr_count;
+ char *verts; /* points to tnl->clipspace.vertex_buf */
+
+ /* Vertex buffer (in system memory or AGP) state. */
+ unsigned char *vb; /* Beginning of vertex buffer */
+ unsigned char *vb_cur; /* Current write location in vertex buffer */
+ unsigned char *vb_last; /* Last written location in vertex buffer */
+ unsigned char *vb_end; /* End of vertex buffer */
+ void *vb_agp_handle;
+ GLuint vb_agp_offset;
+ GLboolean using_agp;
+
GLuint NewGLState;
GLuint Fallback;
- GLuint SetupIndex;
- GLuint SetupNewInputs;
GLuint RenderIndex;
GLfloat hw_viewport[16];
GLfloat depth_scale;
- GLuint vertex_size;
- GLuint vertex_stride_shift;
- GLuint vertex_format;
- GLuint num_verts;
- GLubyte *verts;
unsigned int virtualX, virtualY;
unsigned int bytesPerPixel;
@@ -288,15 +297,6 @@ struct sis_context
unsigned char *AGPBase;
unsigned int AGPAddr;
- /* AGP Command Buffer */
- /* TODO: use Global variables */
-
- unsigned char *AGPCmdBufBase;
- GLint AGPCmdBufAddr;
- unsigned int AGPCmdBufSize;
- GLint *pAGPCmdBufNext;
- GLboolean AGPCmdModeEnabled;
-
/* register 0x89F4 */
GLint AGPParseSet;
@@ -313,6 +313,7 @@ struct sis_context
GLboolean blockWrite;
GLint GlobalFlag;
+ GLuint last_tcl_state;
/* Stereo */
GLboolean useStereo;
@@ -382,7 +383,7 @@ struct sis_context
#define MMIO(reg, value) \
{\
- *(GLint *)(GET_IOBase(smesa) + (reg)) = value; \
+ *(volatile GLint *)(smesa->IOBase + (reg)) = value; \
}
#define MMIO_READ(reg) *(volatile GLint *)(smesa->IOBase + (reg))
@@ -390,8 +391,8 @@ struct sis_context
#define mEndPrimitive() \
{ \
- *(GET_IOBase(smesa) + REG_3D_EndPrimitiveList) = 0xFF; \
- *(GLint *)(GET_IOBase(smesa) + 0x8b60) = (GLint)(-1); \
+ *(volatile char *)(smesa->IOBase + REG_3D_EndPrimitiveList) = 0xFF; \
+ *(volatile GLint *)(smesa->IOBase + 0x8b60) = (GLint)(-1); \
}
#define sis_fatal_error(msg) \