summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-10-12 12:26:10 -0400
committerKristian Høgsberg <[email protected]>2010-10-13 09:43:25 -0400
commitf9995b30756140724f41daf963fa06167912be7f (patch)
treebc34fd4db5eb9d2ad55968cb4e6e4e5a65df5a27 /src/mesa/main/dlist.c
parent31aca27c08d6a385c595d34fe4ee06390bf5b0e8 (diff)
Drop GLcontext typedef and use struct gl_context instead
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index cccec248539..f513f31c56e 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -77,9 +77,9 @@
struct gl_list_instruction
{
GLuint Size;
- void (*Execute)( GLcontext *ctx, void *data );
- void (*Destroy)( GLcontext *ctx, void *data );
- void (*Print)( GLcontext *ctx, void *data );
+ void (*Execute)( struct gl_context *ctx, void *data );
+ void (*Destroy)( struct gl_context *ctx, void *data );
+ void (*Print)( struct gl_context *ctx, void *data );
};
@@ -496,7 +496,7 @@ make_list(GLuint name, GLuint count)
* Lookup function to just encapsulate casting.
*/
static INLINE struct gl_display_list *
-lookup_list(GLcontext *ctx, GLuint list)
+lookup_list(struct gl_context *ctx, GLuint list)
{
return (struct gl_display_list *)
_mesa_HashLookup(ctx->Shared->DisplayList, list);
@@ -513,7 +513,7 @@ is_ext_opcode(OpCode opcode)
/** Destroy an extended opcode instruction */
static GLint
-ext_opcode_destroy(GLcontext *ctx, Node *node)
+ext_opcode_destroy(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -525,7 +525,7 @@ ext_opcode_destroy(GLcontext *ctx, Node *node)
/** Execute an extended opcode instruction */
static GLint
-ext_opcode_execute(GLcontext *ctx, Node *node)
+ext_opcode_execute(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -537,7 +537,7 @@ ext_opcode_execute(GLcontext *ctx, Node *node)
/** Print an extended opcode instruction */
static GLint
-ext_opcode_print(GLcontext *ctx, Node *node)
+ext_opcode_print(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -552,7 +552,7 @@ ext_opcode_print(GLcontext *ctx, Node *node)
* \param dlist - display list pointer
*/
void
-_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
+_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
{
Node *n, *block;
GLboolean done;
@@ -730,7 +730,7 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
* \param list - display list number
*/
static void
-destroy_list(GLcontext *ctx, GLuint list)
+destroy_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
@@ -814,7 +814,7 @@ translate_id(GLsizei n, GLenum type, const GLvoid * list)
* If we run out of memory, GL_OUT_OF_MEMORY will be recorded.
*/
static GLvoid *
-unpack_image(GLcontext *ctx, GLuint dimensions,
+unpack_image(struct gl_context *ctx, GLuint dimensions,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid * pixels,
const struct gl_pixelstore_attrib *unpack)
@@ -866,7 +866,7 @@ unpack_image(GLcontext *ctx, GLuint dimensions,
* \return pointer to allocated memory (the opcode space)
*/
static Node *
-dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes)
+dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes)
{
const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node);
Node *n;
@@ -917,7 +917,7 @@ dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes)
* opcode).
*/
void *
-_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
+_mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint bytes)
{
Node *n = dlist_alloc(ctx, (OpCode) opcode, bytes);
if (n)
@@ -938,11 +938,11 @@ _mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
* \return the new opcode number or -1 if error
*/
GLint
-_mesa_dlist_alloc_opcode(GLcontext *ctx,
+_mesa_dlist_alloc_opcode(struct gl_context *ctx,
GLuint size,
- void (*execute) (GLcontext *, void *),
- void (*destroy) (GLcontext *, void *),
- void (*print) (GLcontext *, void *))
+ void (*execute) (struct gl_context *, void *),
+ void (*destroy) (struct gl_context *, void *),
+ void (*print) (struct gl_context *, void *))
{
if (ctx->ListExt->NumOpcodes < MAX_DLIST_EXT_OPCODES) {
const GLuint i = ctx->ListExt->NumOpcodes++;
@@ -967,7 +967,7 @@ _mesa_dlist_alloc_opcode(GLcontext *ctx,
* \return pointer to start of instruction space
*/
static INLINE Node *
-alloc_instruction(GLcontext *ctx, OpCode opcode, GLuint nparams)
+alloc_instruction(struct gl_context *ctx, OpCode opcode, GLuint nparams)
{
return dlist_alloc(ctx, opcode, nparams * sizeof(Node));
}
@@ -1132,7 +1132,7 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
}
}
-static void invalidate_saved_current_state( GLcontext *ctx )
+static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
@@ -6795,7 +6795,7 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
* command that provoked the error. I don't see this as a problem.
*/
static void
-save_error(GLcontext *ctx, GLenum error, const char *s)
+save_error(struct gl_context *ctx, GLenum error, const char *s)
{
Node *n;
n = alloc_instruction(ctx, OPCODE_ERROR, 2);
@@ -6810,7 +6810,7 @@ save_error(GLcontext *ctx, GLenum error, const char *s)
* Compile an error into current display list.
*/
void
-_mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
+_mesa_compile_error(struct gl_context *ctx, GLenum error, const char *s)
{
if (ctx->CompileFlag)
save_error(ctx, error, s);
@@ -6823,7 +6823,7 @@ _mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
* Test if ID names a display list.
*/
static GLboolean
-islist(GLcontext *ctx, GLuint list)
+islist(struct gl_context *ctx, GLuint list)
{
if (list > 0 && lookup_list(ctx, list)) {
return GL_TRUE;
@@ -6847,7 +6847,7 @@ islist(GLcontext *ctx, GLuint list)
* \param list - display list number
*/
static void
-execute_list(GLcontext *ctx, GLuint list)
+execute_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
Node *n;
@@ -9577,7 +9577,7 @@ enum_string(GLenum k)
* TODO: many commands aren't handled yet.
*/
static void GLAPIENTRY
-print_list(GLcontext *ctx, GLuint list)
+print_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
Node *n;
@@ -9969,7 +9969,7 @@ void _mesa_init_dlist_dispatch(struct _glapi_table *disp)
* Initialize display list state for given context.
*/
void
-_mesa_init_display_list(GLcontext *ctx)
+_mesa_init_display_list(struct gl_context *ctx)
{
static GLboolean tableInitialized = GL_FALSE;
@@ -9999,7 +9999,7 @@ _mesa_init_display_list(GLcontext *ctx)
void
-_mesa_free_display_list_data(GLcontext *ctx)
+_mesa_free_display_list_data(struct gl_context *ctx)
{
free(ctx->ListExt);
ctx->ListExt = NULL;