glsl: Put `sample`-qualified varyings in their own packing classes
[mesa.git] / src / glsl / standalone_scaffolding.h
index 877332006704beda186abe7c23c1439442cd9d57..7afb1c313e6381dd7adac09f446765a24bdf019d 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);
@@ -40,6 +44,26 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
 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,
+                   const char *msg, int len);
+
+static inline gl_shader_type
+_mesa_shader_type_to_index(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;
+   default:
+      assert(!"bad value in _mesa_shader_type_to_index()");
+      return MESA_SHADER_TYPES;
+   }
+}
+
 /**
  * Initialize the given gl_context structure to a reasonable set of
  * defaults representing the minimum capabilities required by the