glsl: Require that indices into uniform block arrays be constants
[mesa.git] / src / glsl / standalone_scaffolding.cpp
index f15f2d882debee728cfc1d99c9d96212017791ab..ccf5b4f8d60cd3fe04fc43e2332988a320ddbdc0 100644 (file)
 #include <string.h>
 #include "ralloc.h"
 
+void
+_mesa_warning(struct gl_context *ctx, const char *fmt, ...)
+{
+    va_list vargs;
+    (void) ctx;
+
+    va_start(vargs, fmt);
+
+    /* This output is not thread-safe, but that's good enough for the
+     * standalone compiler.
+     */
+    fprintf(stderr, "Mesa warning: ");
+    vfprintf(stderr, fmt, vargs);
+    fprintf(stderr, "\n");
+
+    va_end(vargs);
+}
+
 void
 _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
                        struct gl_shader *sh)
@@ -73,12 +91,16 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.dummy_false = false;
    ctx->Extensions.dummy_true = true;
    ctx->Extensions.ARB_ES2_compatibility = true;
+   ctx->Extensions.ARB_ES3_compatibility = false;
    ctx->Extensions.ARB_draw_instanced = true;
    ctx->Extensions.ARB_fragment_coord_conventions = true;
    ctx->Extensions.EXT_texture_array = true;
    ctx->Extensions.NV_texture_rectangle = true;
    ctx->Extensions.EXT_texture3D = true;
    ctx->Extensions.OES_EGL_image_external = true;
+   ctx->Extensions.ARB_shader_bit_encoding = true;
+   ctx->Extensions.OES_standard_derivatives = true;
+   ctx->Extensions.ARB_texture_cube_map_array = true;
 
    ctx->Const.GLSLVersion = 120;