summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_context.c10
-rw-r--r--src/mesa/state_tracker/st_context.h5
-rw-r--r--src/mesa/state_tracker/st_extensions.c2
-rw-r--r--src/mesa/state_tracker/st_manager.c2
4 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2e14da2117b..aa353412576 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -114,12 +114,15 @@ st_get_msaa(void)
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;
@@ -207,7 +210,8 @@ static void st_init_driver_flags(struct gl_driver_flags *f)
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;
@@ -234,7 +238,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
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);
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 47d3af52051..c85d09cb5cd 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -194,6 +194,8 @@ struct st_context
int32_t draw_stamp;
int32_t read_stamp;
+
+ struct st_config_options options;
};
@@ -266,7 +268,8 @@ st_get_msaa(void);
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);
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 2f034cb2887..5e482d9f76a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -646,4 +646,6 @@ void st_init_extensions(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;
}
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 5142eb2dddd..33389fc981f 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -637,7 +637,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
}
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);