projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c95cea
)
glsl: Initialize ctx->ShaderCompilerOptions in standalone scaffolding.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 18 Apr 2013 00:30:21 +0000
(17:30 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Sun, 12 May 2013 16:36:39 +0000
(09:36 -0700)
This code is copied from _mesa_init_shader_state().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/standalone_scaffolding.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/standalone_scaffolding.cpp
b/src/glsl/standalone_scaffolding.cpp
index 8653c4e1eef79fbf0b5c931c5ceaaeb81556f99c..11cd6cdc02d1e50b7cffaad3af2359c3ac5dbb9e 100644
(file)
--- a/
src/glsl/standalone_scaffolding.cpp
+++ b/
src/glsl/standalone_scaffolding.cpp
@@
-123,4
+123,16
@@
void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Const.FragmentProgram.MaxUniformComponents = 64;
ctx->Const.MaxDrawBuffers = 1;
+
+ /* Set up default shader compiler options. */
+ struct gl_shader_compiler_options options;
+ memset(&options, 0, sizeof(options));
+ options.MaxUnrollIterations = 32;
+ options.MaxIfDepth = UINT_MAX;
+
+ /* Default pragma settings */
+ options.DefaultPragmas.Optimize = true;
+
+ for (int sh = 0; sh < MESA_SHADER_TYPES; ++sh)
+ memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
}