summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-08-03 04:31:56 +0200
committerMarek Olšák <[email protected]>2014-08-11 21:53:57 +0200
commit002211f9eea258acc253528024ee104aa1fcd90d (patch)
treede9c794cf0313358ae483a5701e167404d22b550 /src/glsl
parent5c69173907e72a0978af5028db336f051ce733b0 (diff)
mesa: move ShaderCompilerOptions into gl_constants
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glsl_parser_extras.cpp2
-rw-r--r--src/glsl/link_varyings.cpp2
-rw-r--r--src/glsl/linker.cpp4
-rw-r--r--src/glsl/standalone_scaffolding.cpp2
-rw-r--r--src/glsl/test_optpass.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 2d94d3554cd..ad91c466143 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1472,7 +1472,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
if (!state->error && !shader->ir->is_empty()) {
struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[shader->Stage];
+ &ctx->Const.ShaderCompilerOptions[shader->Stage];
/* Do some optimization at compile time to reduce shader IR size
* and reduce later work if the same shader is linked multiple times
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 1438a4b16c2..54ceae1b9eb 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -329,7 +329,7 @@ tfeedback_decl::init(struct gl_context *ctx, const void *mem_ctx,
* class must behave specially to account for the fact that gl_ClipDistance
* is converted from a float[8] to a vec4[2].
*/
- if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerClipDistance &&
+ if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerClipDistance &&
strcmp(this->var_name, "gl_ClipDistance") == 0) {
this->is_clip_distance_mesa = true;
}
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 0096fb023dc..497a77aeab4 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2660,12 +2660,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (!prog->LinkStatus)
goto done;
- if (ctx->ShaderCompilerOptions[i].LowerClipDistance) {
+ if (ctx->Const.ShaderCompilerOptions[i].LowerClipDistance) {
lower_clip_distance(prog->_LinkedShaders[i]);
}
while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false,
- &ctx->ShaderCompilerOptions[i],
+ &ctx->Const.ShaderCompilerOptions[i],
ctx->Const.NativeIntegers))
;
}
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index abdd83a4408..2b76dd17b2a 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -164,5 +164,5 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
options.DefaultPragmas.Optimize = true;
for (int sh = 0; sh < MESA_SHADER_STAGES; ++sh)
- memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
+ memcpy(&ctx->Const.ShaderCompilerOptions[sh], &options, sizeof(options));
}
diff --git a/src/glsl/test_optpass.cpp b/src/glsl/test_optpass.cpp
index e4878bf15c7..24c06f11b14 100644
--- a/src/glsl/test_optpass.cpp
+++ b/src/glsl/test_optpass.cpp
@@ -242,7 +242,7 @@ int test_optpass(int argc, char **argv)
if (!state->error) {
GLboolean progress;
const struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(shader_type)];
+ &ctx->Const.ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(shader_type)];
do {
progress = do_optimization_passes(shader->ir, &argv[optind],
argc - optind, quiet != 0, options);