summaryrefslogtreecommitdiff
path: root/src/savage_bci.h
diff options
context:
space:
mode:
authorAlex Deucher <agd5f@yahoo.com>2004-09-16 22:00:48 +0000
committerAlex Deucher <agd5f@yahoo.com>2004-09-16 22:00:48 +0000
commit0ac19a8436291c9c14b192306c756cb1ad28c9d4 (patch)
tree1bef613a093f7b7fcfbe2e023001b6aaa13c9118 /src/savage_bci.h
parent77a543764b11d59217eed223dbd3bbc3ed9222bf (diff)
Merge savage DDX from DRI to xorg and fix conflicts.
Diffstat (limited to 'src/savage_bci.h')
-rw-r--r--src/savage_bci.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/savage_bci.h b/src/savage_bci.h
index 0c57957..4874be7 100644
--- a/src/savage_bci.h
+++ b/src/savage_bci.h
@@ -3,6 +3,42 @@
#ifndef _S3BCI_H_
#define _S3BCI_H_
+
+/* BCI Control Register */
+#define S3_BCI_CONTROL 0x816C
+
+/*
+ * High 8 bit of primary bitmap descriptor 2 register.
+ * Bits 25-24: Tile Format 00 = Linear ; 10 = 16 bits; 11 = 32 bits (Savage4)
+ * 00 = Linear ; 01 = Tile; 10 = Texture tiling format/ Destination Tiling format
+ * 11 = Reserved/Destination tiling format.
+ */
+
+
+#define TILE_LINEAR 0
+#define TILE_FORMAT_LINEAR 0
+#define TILE_TEXTURE 2
+#define TILE_DESTINATION 1
+#define TILE_FORMAT_DESTINATION16 2
+#define TILE_FORMAT_DESTINATION32 3
+
+/* BD - BCI enable */
+/* savage4, MX, IX, 3D */
+#define BCI_ENABLE 8
+/* twister, prosavage */
+/* not sure which one supersavage fits into */
+#define BCI_ENABLE_TWISTER 0
+
+#define S3_BIG_ENDIAN 4
+#define S3_LITTLE_ENDIAN 0
+#define S3_BD64 1
+
+
+
+/* Global Bitmap Descriptor */
+#define S3_BCI_GLB_BD_LOW 0x8168
+#define S3_BCI_GLB_BD_HIGH 0x816C
+
#define REVERSE_BYTE_ORDER32(dword) {\
unsigned int temp; \
dword = (temp & 0xFF) << 24; \
@@ -71,7 +107,7 @@
#define BCI_BD_TILE_MASK 0x03000000
#define BCI_BD_TILE_NONE 0x00000000
#define BCI_BD_TILE_16 0x02000000
-#define BCI_BD_TILE_32 0x04000000
+#define BCI_BD_TILE_32 0x03000000
#define BCI_BD_GET_BPP(bd) (((bd) >> 16) & 0xFF)
#define BCI_BD_SET_BPP(bd, bpp) ((bd) |= (((bpp) & 0xFF) << 16))
#define BCI_BD_GET_STRIDE(bd) ((bd) & 0xFFFF)