Remove some long-dead code.
[mesa.git] / src / mesa / drivers / dri / sis / sis_common2.h
1 /**************************************************************************
2
3 Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan.
4 All Rights Reserved.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sub license, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
13
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial portions
16 of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 IN NO EVENT SHALL SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR
22 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26 **************************************************************************/
27 /* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_common.h,v 1.5 2000/09/26 15:56:48 tsi Exp $ */
28
29 /*
30 * Authors:
31 * Sung-Ching Lin <sclin@sis.com.tw>
32 */
33
34 #ifndef _sis_common_h_
35 #define _sis_common_h_
36
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <string.h>
40 typedef struct _Box
41 {
42 short x1, y1, x2, y2;
43 }
44 BoxRec;
45 #define NullBox ((BoxPtr)0)
46 typedef struct _Box *BoxPtr;
47
48 /* BitBlt Commands */
49 #define CMD0_DD_ENABLE 0x06
50 #define CMD0_SRC_VIDEO 0x00
51 #define CMD0_SRC_CPU 0x10
52 #define CMD0_PAT_FG_COLOR 0x00
53 #define CMD1_DIR_X_DEC 0x00
54 #define CMD1_DIR_X_INC 0x01
55 #define CMD1_DIR_Y_DEC 0x00
56 #define CMD1_DIR_Y_INC 0x02
57 #define REG_SRC_ADDR 0x8200
58 #define REG_CMD0 0x823c
59
60 typedef struct
61 {
62 GLshort wSrcPitch;
63 GLshort wDestPitch;
64 }
65 _PITCH;
66 typedef struct
67 {
68 GLshort wWidth;
69 GLshort wHeight;
70 }
71 _DIM;
72 typedef struct
73 {
74 GLshort wY;
75 GLshort wX;
76 }
77 _POS;
78
79 typedef struct
80 {
81 GLubyte cCmd0;
82 GLubyte cRop;
83 GLubyte cCmd1;
84 GLubyte cReserved;
85 }
86 _CMD;
87
88 typedef struct
89 {
90 GLshort wStatus0;
91 GLbyte cStatus0_GLbyte3;
92 GLbyte cStatus0_GLbyte4;
93 }
94 _CMDQUESTATUS;
95
96 typedef struct
97 {
98 GLint dwSrcBaseAddr;
99 GLint dwSrcPitch;
100 _POS stdwSrcPos;
101 _POS stdwDestPos;
102 GLint dwDestBaseAddr;
103 GLshort wDestPitch;
104 GLshort wDestHeight;
105 _DIM stdwDim;
106 GLint dwFgRopColor;
107 GLint dwBgRopColor;
108 GLint dwSrcHiCKey;
109 GLint dwSrcLoCKey;
110 GLint dwMaskA;
111 GLint dwMaskB;
112 GLint dwClipA;
113 GLint dwClipB;
114 _CMD stdwCmd;
115 _CMDQUESTATUS stdwCmdQueStatus;
116 }
117 ENGPACKET, *LPENGPACKET;
118
119 /* Hardware Info */
120 #include "sis_reg.h"
121
122 /* HW capability */
123 #define SIS_MAX_TEXTURE_SIZE 2048
124 #define SIS_MAX_TEXTURES 2
125
126 #define SIS_MAX_FRAME_LENGTH 3
127
128 GLint doFPtoFixedNoRound( GLfloat dwInValue, int nFraction );
129
130 #endif