swrast: replace __FUNCTION__ with __func__
[mesa.git] / src / glsl / standalone_scaffolding.h
index 41ce35befc628c2f8ab160940502077c6e52c1db..895dd2782fbaffb1eed907dbef76971bc5dc732c 100644 (file)
 #ifndef STANDALONE_SCAFFOLDING_H
 #define STANDALONE_SCAFFOLDING_H
 
+#include <assert.h>
 #include "main/mtypes.h"
 
+extern "C" void
+_mesa_warning(struct gl_context *ctx, const char *fmtString, ... );
+
 extern "C" void
 _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
                        struct gl_shader *sh);
@@ -41,9 +45,30 @@ extern "C" struct gl_shader *
 _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
 
 extern "C" void
-_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint id,
+_mesa_clear_shader_program_data(struct gl_shader_program *);
+
+extern "C" void
+_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
                    const char *msg, int len);
 
+static inline gl_shader_stage
+_mesa_shader_enum_to_shader_stage(GLenum v)
+{
+   switch (v) {
+   case GL_VERTEX_SHADER:
+      return MESA_SHADER_VERTEX;
+   case GL_FRAGMENT_SHADER:
+      return MESA_SHADER_FRAGMENT;
+   case GL_GEOMETRY_SHADER:
+      return MESA_SHADER_GEOMETRY;
+   case GL_COMPUTE_SHADER:
+      return MESA_SHADER_COMPUTE;
+   default:
+      assert(!"bad value in _mesa_shader_enum_to_shader_stage()");
+      return MESA_SHADER_VERTEX;
+   }
+}
+
 /**
  * Initialize the given gl_context structure to a reasonable set of
  * defaults representing the minimum capabilities required by the