#ifndef STANDALONE_SCAFFOLDING_H
#define STANDALONE_SCAFFOLDING_H
+#include <assert.h>
#include "main/mtypes.h"
extern "C" void
_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,
- const char *msg, int len);
+_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh);
+
+extern "C" void
+_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);
+
+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_TESS_CONTROL_SHADER:
+ return MESA_SHADER_TESS_CTRL;
+ case GL_TESS_EVALUATION_SHADER:
+ return MESA_SHADER_TESS_EVAL;
+ 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