summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-04-17 17:30:22 -0700
committerKenneth Graunke <kenneth@whitecape.org>2013-05-12 09:36:41 -0700
commitb765740a66821c4e97816a938c94740717661ba3 (patch)
treeedc9135329af865781199d48e12514a1aa74ab01 /src/glsl/glsl_parser_extras.cpp
parent6bb9acfb4eb3f6a2c61e03cbd5a6c6c464d2ae0c (diff)
glsl: Pass struct shader_compiler_options into do_common_optimization.
do_common_optimization may need to make choices about whether to emit certain kinds of instructions. gl_context::ShaderCompilerOptions contains exactly that information, so it makes sense to pass it in. Rather than passing the whole array, pass the structure for the stage that's currently being worked on. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index cf6c8c62151..4e496a1749d 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1203,11 +1203,13 @@ ast_struct_specifier::ast_struct_specifier(const char *identifier,
* \param max_unroll_iterations Maximum number of loop iterations to be
* unrolled. Setting to 0 disables loop
* unrolling.
+ * \param options The driver's preferred shader options.
*/
bool
do_common_optimization(exec_list *ir, bool linked,
bool uniform_locations_assigned,
- unsigned max_unroll_iterations)
+ unsigned max_unroll_iterations,
+ const struct gl_shader_compiler_options *options)
{
GLboolean progress = GL_FALSE;