summaryrefslogtreecommitdiff
path: root/src/savage_driver.h
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2005-03-13 00:14:02 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2005-03-13 00:14:02 +0000
commit9e84104d6b0ab8fd49edfa3568511fcd41983dc4 (patch)
treea7fc362b4c605125c87147ab2295cb31ed03ce64 /src/savage_driver.h
parent33033884e9ec07d96c70765132a2be0ebc466299 (diff)
- Removed lots of dead code.
- Moved driver-private definitions from savage_dri.h to savage_driver.h. savage_dri.h should only contain the public interface between DDX and DRI drivers. - Don't forget to remove the command DMA mapping in SAVAGEDRICloseScreen.
Diffstat (limited to 'src/savage_driver.h')
-rw-r--r--src/savage_driver.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h
index a60262c..504b36c 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -32,6 +32,69 @@
#include "savage_dri.h"
#include "dri.h"
#include "GL/glxint.h"
+#include "xf86drm.h"
+
+/* Totals 2 Mbytes which equals 2^16 32-byte vertices divided among up
+ * to 32 clients. */
+#define SAVAGE_NUM_BUFFERS 32
+#define SAVAGE_BUFFER_SIZE (1 << 16) /* 64k */
+
+#define SAVAGE_CMDDMA_SIZE 0x100000 /* 1MB */
+
+#define SAVAGE_DEFAULT_AGP_MODE 1
+#define SAVAGE_MAX_AGP_MODE 4
+
+/* Buffer are aligned on 4096 byte boundaries.
+ */
+/* this is used for backbuffer, depthbuffer, etc..*/
+/* alignment */
+
+#define SAVAGE_BUFFER_ALIGN 0x00000fff
+
+typedef struct _server{
+ int reserved_map_agpstart;
+ int reserved_map_idx;
+
+ int sarea_priv_offset;
+
+ int chipset;
+ int sgram; /* seems no use */
+
+ unsigned int frontOffset;
+ unsigned int frontPitch;
+ unsigned int frontbufferSize;
+ unsigned int frontBitmapDesc;
+
+ unsigned int backOffset;
+ unsigned int backPitch;
+ unsigned int backbufferSize;
+ unsigned int backBitmapDesc;
+
+ unsigned int depthOffset;
+ unsigned int depthPitch;
+ unsigned int depthbufferSize;
+ unsigned int depthBitmapDesc;
+
+ unsigned int textureOffset;
+ int textureSize;
+ int logTextureGranularity;
+
+ drmRegion agp;
+
+ /* PCI mappings */
+ drmRegion aperture;
+ drmRegion registers;
+ drmRegion status;
+
+ /* AGP mappings */
+ drmRegion buffers;
+ drmRegion agpTextures;
+ int logAgpTextureGranularity;
+
+ /* command DMA */
+ drmRegion cmdDma;
+} SAVAGEDRIServerPrivateRec, *SAVAGEDRIServerPrivatePtr;
+
#endif
typedef enum {