summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
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/mesa/main
parent5c69173907e72a0978af5028db336f051ce733b0 (diff)
mesa: move ShaderCompilerOptions into gl_constants
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp2
-rw-r--r--src/mesa/main/ffvertex_prog.c2
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/main/shaderapi.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 8758b5e9d23..9bb706cc549 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1252,7 +1252,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
validate_ir_tree(p.shader->ir);
const struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
+ &ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
while (do_common_optimization(p.shader->ir, false, false, options,
ctx->Const.NativeIntegers))
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 728cf968b7e..d5afc3d812c 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -1676,7 +1676,7 @@ _mesa_get_fixed_func_vertex_program(struct gl_context *ctx)
return NULL;
create_new_program( &key, prog,
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS,
+ ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS,
ctx->Const.Program[MESA_SHADER_VERTEX].MaxTemps );
#if 0
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e141ac65893..3775b5ba996 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3529,6 +3529,8 @@ struct gl_constants
GLfloat MaxFragmentInterpolationOffset;
GLboolean FakeSWMSAA;
+
+ struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_STAGES];
};
@@ -4172,8 +4174,6 @@ struct gl_context
*/
struct gl_pipeline_object *_Shader;
- struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_STAGES];
-
struct gl_query_state Query; /**< occlusion, timer queries */
struct gl_transform_feedback_state TransformFeedback;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index b4a5e70506b..620cab3cc0e 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -119,7 +119,7 @@ _mesa_init_shader_state(struct gl_context *ctx)
options.DefaultPragmas.Optimize = GL_TRUE;
for (sh = 0; sh < MESA_SHADER_STAGES; ++sh)
- memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
+ memcpy(&ctx->Const.ShaderCompilerOptions[sh], &options, sizeof(options));
ctx->Shader.Flags = _mesa_get_shader_flags();
@@ -826,7 +826,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
if (!sh)
return;
- options = &ctx->ShaderCompilerOptions[sh->Stage];
+ options = &ctx->Const.ShaderCompilerOptions[sh->Stage];
/* set default pragma state for shader */
sh->Pragmas = options->DefaultPragmas;