aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_extensions.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index d01942967..0b7001bae 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -289,14 +289,6 @@ void st_init_limits(struct st_context *st)
}
-static GLboolean st_get_s3tc_override(void)
-{
- const char *override = _mesa_getenv("force_s3tc_enable");
- if (override && !strcmp(override, "true"))
- return GL_TRUE;
- return GL_FALSE;
-}
-
/**
* Given a member \c x of struct gl_extensions, return offset of
* \c x in bytes.
@@ -606,16 +598,24 @@ void st_init_extensions(struct st_context *st)
_mesa_override_glsl_version(st->ctx);
+ if (st->options.force_glsl_version > 0 &&
+ st->options.force_glsl_version <= ctx->Const.GLSLVersion) {
+ ctx->Const.ForceGLSLVersion = st->options.force_glsl_version;
+ }
+
if (ctx->Const.GLSLVersion >= 130) {
ctx->Const.NativeIntegers = GL_TRUE;
ctx->Const.MaxClipPlanes = 8;
/* Extensions that either depend on GLSL 1.30 or are a subset thereof. */
ctx->Extensions.ARB_conservative_depth = GL_TRUE;
- ctx->Extensions.ARB_shader_bit_encoding = GL_TRUE;
ctx->Extensions.ARB_shading_language_packing = GL_TRUE;
ctx->Extensions.OES_depth_texture_cube_map = GL_TRUE;
ctx->Extensions.ARB_shading_language_420pack = GL_TRUE;
+
+ if (!st->options.disable_shader_bit_encoding) {
+ ctx->Extensions.ARB_shader_bit_encoding = GL_TRUE;
+ }
} else {
/* Optional integer support for GLSL 1.2. */
if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
@@ -628,7 +628,7 @@ void st_init_extensions(struct st_context *st)
/* Below are the cases which cannot be moved into tables easily. */
- if (!ctx->Mesa_DXTn && !st_get_s3tc_override()) {
+ if (!ctx->Mesa_DXTn && !st->options.force_s3tc_enable) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_FALSE;
ctx->Extensions.ANGLE_texture_compression_dxt = GL_FALSE;
}
@@ -710,9 +710,11 @@ void st_init_extensions(struct st_context *st)
}
else if (ctx->Const.MaxSamples >= 2) {
ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
+ ctx->Extensions.EXT_framebuffer_multisample_blit_scaled = GL_TRUE;
}
- if (ctx->Const.MaxDualSourceDrawBuffers > 0)
+ if (ctx->Const.MaxDualSourceDrawBuffers > 0 &&
+ !st->options.disable_blend_func_extended)
ctx->Extensions.ARB_blend_func_extended = GL_TRUE;
st->has_time_elapsed =