1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
#ifndef _sis_mesa_h_
#define _sis_mesa_h_
void sis_UpdateState (GLcontext * ctx);
void sis_ClearIndex (GLcontext * ctx, GLuint index);
void sis_ClearColor (GLcontext * ctx, GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha);
GLbitfield sis_Clear (GLcontext * ctx, GLbitfield mask, GLboolean all,
GLint x, GLint y, GLint width, GLint height);
GLboolean sis_SetDrawBuffer (GLcontext * ctx, GLenum mode);
void sis_SetReadBuffer (GLcontext *ctx, GLframebuffer *colorBuffer,
GLenum buffer);
void sis_GetBufferSize (GLcontext * ctx, GLuint * width, GLuint * height);
const char *sis_ExtensionString (GLcontext * ctx);
const GLubyte *sis_GetString (GLcontext * ctx, GLenum name);
void sis_Finish (GLcontext * ctx);
void sis_Flush (GLcontext * ctx);
GLboolean sis_IndexMask (GLcontext * ctx, GLuint mask);
GLboolean sis_ColorMask (GLcontext * ctx,
GLboolean rmask, GLboolean gmask,
GLboolean bmask, GLboolean amask);
GLboolean sis_LogicOp (GLcontext * ctx, GLenum op);
void sis_Dither (GLcontext * ctx, GLboolean enable);
void sis_Error (GLcontext * ctx);
void sis_NearFar (GLcontext * ctx, GLfloat nearVal, GLfloat farVal);
GLint sis_GetParameteri (const GLcontext * ctx, GLint param);
GLboolean sis_DrawPixels (GLcontext * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid * pixels);
GLboolean sis_Bitmap (GLcontext * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte * bitmap);
void sis_RenderStart (GLcontext * ctx);
void sis_RenderFinish (GLcontext * ctx);
typedef void (*sis_setup_func_t)(struct vertex_buffer *, GLuint, GLuint);
sis_setup_func_t sis_ChooseRasterSetupFunc (GLcontext * ctx);
void sis_ReducedPrimitiveChange (GLcontext * ctx, GLenum primitive);
GLboolean sis_MultipassFunc (struct vertex_buffer *VB, GLuint passno);
/*
* Texture
*/
void sis_validate_texture (GLcontext * ctx);
void sis_TexEnv( GLcontext *ctx, GLenum target, GLenum pname,
const GLfloat *param );
void sis_TexImage (GLcontext * ctx, GLenum target,
struct gl_texture_object *tObj, GLint level,
GLint internalFormat,
const struct gl_texture_image *image);
void sis_TexSubImage (GLcontext * ctx, GLenum target,
struct gl_texture_object *tObj, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLint internalFormat,
const struct gl_texture_image *image);
void sis_TexParameter (GLcontext * ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat * params);
void sis_BindTexture (GLcontext * ctx, GLenum target,
struct gl_texture_object *tObj);
void sis_DeleteTexture (GLcontext * ctx, struct gl_texture_object *tObj);
void sis_UpdateTexturePalette (GLcontext * ctx,
struct gl_texture_object *tObj);
void sis_UseGlobalTexturePalette (GLcontext * ctx, GLboolean state);
void sis_ActiveTexture (GLcontext * ctx, GLuint texUnitNumber);
GLboolean sis_IsTextureResident (GLcontext * ctx,
struct gl_texture_object *t);
void sis_PrioritizeTexture (GLcontext * ctx,
struct gl_texture_object *t, GLclampf priority);
/*
* Optimization
*/
void sis_RegisterVB (struct vertex_buffer *VB);
void sis_UnregisterVB (struct vertex_buffer *VB);
void sis_ResetVB (struct vertex_buffer *VB);
void sis_ResetCvaVB (struct vertex_buffer *VB, GLuint stages);
GLuint sis_RegisterPipelineStages (struct gl_pipeline_stage *out,
const struct gl_pipeline_stage *in,
GLuint nr);
GLboolean sis_BuildPrecalcPipeline (GLcontext * ctx);
GLboolean sis_BuildEltPipeline (GLcontext * ctx);
void sis_OptimizePrecalcPipeline (GLcontext * ctx, struct gl_pipeline *pipe);
void sis_OptimizeImmediatePipeline (GLcontext * ctx,
struct gl_pipeline *pipe);
/*
* State-Change
*/
void sis_AlphaFunc (GLcontext * ctx, GLenum func, GLclampf ref);
void sis_BlendEquation (GLcontext * ctx, GLenum mode);
void sis_BlendFunc (GLcontext * ctx, GLenum sfactor, GLenum dfactor);
void sis_BlendFuncSeparate (GLcontext * ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA);
void sis_ClearDepth (GLcontext * ctx, GLclampd d);
void sis_CullFace (GLcontext * ctx, GLenum mode);
void sis_FrontFace (GLcontext * ctx, GLenum mode);
void sis_DepthFunc (GLcontext * ctx, GLenum func);
void sis_DepthMask (GLcontext * ctx, GLboolean flag);
void sis_DepthRange (GLcontext * ctx, GLclampd nearval, GLclampd farval);
void sis_Enable (GLcontext * ctx, GLenum cap, GLboolean state);
void sis_Fogfv (GLcontext * ctx, GLenum pname, const GLfloat * params);
void sis_Hint (GLcontext * ctx, GLenum target, GLenum mode);
void sis_Lightfv (GLcontext * ctx, GLenum light,
GLenum pname, const GLfloat * params, GLint nparams);
void sis_LightModelfv (GLcontext * ctx, GLenum pname, const GLfloat * params);
void sis_PolygonMode (GLcontext * ctx, GLenum face, GLenum mode);
void sis_Scissor (GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h);
void sis_ShadeModel (GLcontext * ctx, GLenum mode);
void sis_ClearStencil (GLcontext * ctx, GLint s);
void sis_StencilFunc (GLcontext * ctx, GLenum func, GLint ref, GLuint mask);
void sis_StencilMask (GLcontext * ctx, GLuint mask);
void sis_StencilOp (GLcontext * ctx, GLenum fail, GLenum zfail, GLenum zpass);
void sis_Viewport (GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h);
/*
* Buffer Allocation
*/
void sis_alloc_z_stencil_buffer (GLcontext * ctx);
void sis_free_z_stencil_buffer (XMesaBuffer buf);
void sis_alloc_back_image (GLcontext * ctx, XMesaImage *image, void **free,
ENGPACKET *packet);
void sis_free_back_image (XMesaBuffer buf, XMesaImage *image, void *free);
void sis_alloc_texture_image (GLcontext * ctx, GLtextureImage * image);
void sis_free_texture_image (GLtextureImage * image);
/*
* Raster-Function Picker
*/
void sis_set_render_func (GLcontext * ctx);
/*
* VB Rendering Function
*/
void sis_init_vbrender (void);
void sis_set_render_vb_tabs (GLcontext * ctx);
/*
* Local
*/
void set_color_pattern (__GLSiScontext * hwcx, GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha);
void set_z_stencil_pattern (__GLSiScontext * hwcx, GLclampd z, int stencil);
void sis_init_driver (GLcontext * ctx);
void sis_sw_init_driver (GLcontext * ctx);
void sis_sw_set_zfuncs_static (GLcontext * ctx);
void WaitEngIdle (__GLSiScontext * hwcx);
void Wait2DEngIdle (__GLSiScontext * hwcx);
void sis_set_buffer_static (GLcontext * ctx);
void sis_set_render_pos(GLcontext * ctx, GLubyte *base, GLuint pitch);
/*
* X window system Information
*/
#define sis_is_window(xmesa) (!((xmesa)->xm_buffer->pixmap_flag))
GLboolean sis_get_clip_rects (XMesaContext xmesa, BoxPtr * ppExtents,
int *pCount);
void *sis_get_drawable_pos (XMesaContext xmesa);
void sis_get_drawable_origin (XMesaContext xmesa, GLuint * x, GLuint * y);
void sis_get_drawable_size (XMesaContext xmesa, GLuint * w, GLuint * h);
void sis_get_drawable_box (XMesaContext xmesa, BoxPtr pBox);
/* GLX */
void SiSCreateContext (XMesaContext xmesa);
void SiSDestroyContext (XMesaContext xmesa);
void sis_swap_buffers (XMesaBuffer b);
void SiSDestroyBuffer (XMesaBuffer buf);
/* Profile */
#ifndef SIS_DEBUG
# define SIS_VERBOSE 0
#else
extern int SIS_VERBOSE;
#endif
enum _sis_verbose {
VERBOSE_SIS_BUFFER = 0x1,
VERBOSE_SIS_MEMORY = 0x2
};
#endif
|