Merge commit 'origin/gallium-master-merge'
[mesa.git] / src / mesa / shader / program.h
index 73f5238928941a22c6e4f5e427394241fd4cc653..48176162c35fb62e7061cb52721032797d323ca6 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.2
+ * Version:  6.5.3
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
 #ifndef PROGRAM_H
 #define PROGRAM_H
 
-#include "mtypes.h"
+#include "main/mtypes.h"
 
 
 extern struct gl_program _mesa_DummyProgram;
 
 
-/*
- * Internal functions
- */
-
 extern void
 _mesa_init_program(GLcontext *ctx);
 
 extern void
 _mesa_free_program_data(GLcontext *ctx);
 
+extern void
+_mesa_update_default_objects_program(GLcontext *ctx);
+
 extern void
 _mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string);
 
@@ -64,13 +63,13 @@ _mesa_find_line_column(const GLubyte *string, const GLubyte *pos,
                        GLint *line, GLint *col);
 
 
-extern struct gl_program * 
-_mesa_init_vertex_program(GLcontext *ctx, 
-                          struct gl_vertex_program *prog, 
+extern struct gl_program *
+_mesa_init_vertex_program(GLcontext *ctx,
+                          struct gl_vertex_program *prog,
                           GLenum target, GLuint id);
 
-extern struct gl_program * 
-_mesa_init_fragment_program(GLcontext *ctx, 
+extern struct gl_program *
+_mesa_init_fragment_program(GLcontext *ctx,
                             struct gl_fragment_program *prog,
                             GLenum target, GLuint id);
 
@@ -83,37 +82,46 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog);
 extern struct gl_program *
 _mesa_lookup_program(GLcontext *ctx, GLuint id);
 
+extern void
+_mesa_reference_program(GLcontext *ctx,
+                        struct gl_program **ptr,
+                        struct gl_program *prog);
+
+static INLINE void
+_mesa_reference_vertprog(GLcontext *ctx,
+                         struct gl_vertex_program **ptr,
+                         struct gl_vertex_program *prog)
+{
+   _mesa_reference_program(ctx, (struct gl_program **) ptr,
+                           (struct gl_program *) prog);
+}
+
+static INLINE void
+_mesa_reference_fragprog(GLcontext *ctx,
+                         struct gl_fragment_program **ptr,
+                         struct gl_fragment_program *prog)
+{
+   _mesa_reference_program(ctx, (struct gl_program **) ptr,
+                           (struct gl_program *) prog);
+}
 
 extern struct gl_program *
 _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog);
 
+extern  GLboolean
+_mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count);
 
-/*
- * API functions common to ARB/NV_vertex/fragment_program
- */
-
-extern void GLAPIENTRY
-_mesa_BindProgram(GLenum target, GLuint id);
-
-extern void GLAPIENTRY
-_mesa_DeletePrograms(GLsizei n, const GLuint *ids);
-
-extern void GLAPIENTRY
-_mesa_GenPrograms(GLsizei n, GLuint *ids);
-
-
+extern  GLboolean
+_mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count);
 
-/*
- * GL_MESA_program_debug
- */
+extern struct gl_program *
+_mesa_combine_programs(GLcontext *ctx,
+                       const struct gl_program *progA,
+                       const struct gl_program *progB);
 
-extern void
-_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback,
-                          GLvoid *data);
+extern GLint
+_mesa_find_free_register(const struct gl_program *prog, GLuint regFile);
 
-extern void
-_mesa_GetProgramRegisterfvMESA(GLenum target, GLsizei len,
-                               const GLubyte *registerName, GLfloat *v);
 
 
 #endif /* PROGRAM_H */