util: use standard name for strdup()
[mesa.git] / src / mesa / program / program.h
index defeb2f2a0f246fe745f4d33bc6485a025a4479e..49e888e57df248e60ebff7921653c15e0e9934aa 100644 (file)
@@ -40,8 +40,7 @@
 #ifndef PROGRAM_H
 #define PROGRAM_H
 
-#include "main/compiler.h"
-#include "main/mtypes.h"
+#include "prog_parameter.h"
 
 
 #ifdef __cplusplus
@@ -64,10 +63,12 @@ extern void
 _mesa_set_program_error(struct gl_context *ctx, GLint pos, const char *string);
 
 extern struct gl_program *
-_mesa_init_gl_program(struct gl_program *prog, GLenum target, GLuint id);
+_mesa_init_gl_program(struct gl_program *prog, GLenum target, GLuint id,
+                      bool is_arb_asm);
 
 extern struct gl_program *
-_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id);
+_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id,
+                  bool is_arb_asm);
 
 extern void
 _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog);
@@ -89,20 +90,12 @@ _mesa_reference_program(struct gl_context *ctx,
       _mesa_reference_program_(ctx, ptr, prog);
 }
 
-static inline void
-_mesa_reference_fragprog(struct gl_context *ctx,
-                         struct gl_fragment_program **ptr,
-                         struct gl_fragment_program *prog)
-{
-   _mesa_reference_program(ctx, (struct gl_program **) ptr,
-                           (struct gl_program *) prog);
-}
-
 extern  GLboolean
 _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count);
 
 extern  GLboolean
-_mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count);
+_mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count,
+                          void *mem_ctx);
 
 extern void
 _mesa_find_used_registers(const struct gl_program *prog,
@@ -115,8 +108,7 @@ _mesa_find_free_register(const GLboolean used[],
 
 extern GLint
 _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
-                                       const struct gl_fragment_program *prog,
-                                       bool ignore_sample_qualifier);
+                                       const struct gl_program *prog);
 
 static inline GLuint
 _mesa_program_enum_to_shader_stage(GLenum v)
@@ -166,17 +158,9 @@ _mesa_shader_stage_to_program(unsigned stage)
 }
 
 
-static inline struct gl_fragment_program *
-gl_fragment_program(struct gl_program *prog)
-{
-   return (struct gl_fragment_program *) prog;
-}
+GLbitfield
+gl_external_samplers(const struct gl_program *prog);
 
-static inline const struct gl_fragment_program *
-gl_fragment_program_const(const struct gl_program *prog)
-{
-   return (const struct gl_fragment_program *) prog;
-}
 
 #ifdef __cplusplus
 } /* extern "C" */