Currently there is a single option - force_glsl_extensions_warn.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
enum st_attachment_type render_buffer;
};
+
+/**
+ * Configuration options from driconf
+ */
+struct st_config_options
+{
+ boolean force_glsl_extensions_warn;
+};
+
/**
* Represent the attributes of a context.
*/
* The visual of the framebuffers the context will be bound to.
*/
struct st_visual visual;
+
+ /**
+ * Configuration options.
+ */
+ struct st_config_options options;
};
/**
static struct st_context *
-st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
+st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
+ const struct st_config_options *options)
{
struct pipe_screen *screen = pipe->screen;
uint i;
struct st_context *st = ST_CALLOC_STRUCT( st_context );
+ st->options = *options;
+
ctx->st = st;
st->ctx = ctx;
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
const struct gl_config *visual,
- struct st_context *share)
+ struct st_context *share,
+ const struct st_config_options *options)
{
struct gl_context *ctx;
struct gl_context *shareCtx = share ? share->ctx : NULL;
if (debug_get_option_mesa_mvp_dp4())
_mesa_set_mvp_with_dp4( ctx, GL_TRUE );
- return st_create_context_priv(ctx, pipe);
+ return st_create_context_priv(ctx, pipe, options);
}
int32_t draw_stamp;
int32_t read_stamp;
+
+ struct st_config_options options;
};
extern struct st_context *
st_create_context(gl_api api, struct pipe_context *pipe,
const struct gl_config *visual,
- struct st_context *share);
+ struct st_context *share,
+ const struct st_config_options *options);
extern void
st_destroy_context(struct st_context *st);
ctx->Extensions.ARB_draw_instanced) {
ctx->Extensions.ARB_transform_feedback_instanced = GL_TRUE;
}
+ if (st->options.force_glsl_extensions_warn)
+ ctx->Const.ForceGLSLExtensionsWarn = 1;
}
}
st_visual_to_context_mode(&attribs->visual, &mode);
- st = st_create_context(api, pipe, &mode, shared_ctx);
+ st = st_create_context(api, pipe, &mode, shared_ctx, &attribs->options);
if (!st) {
*error = ST_CONTEXT_ERROR_NO_MEMORY;
pipe->destroy(pipe);