OSDN Git Service

glsl: Pass struct shader_compiler_options into do_common_optimization.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Apr 2013 00:30:22 +0000 (17:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 12 May 2013 16:36:41 +0000 (09:36 -0700)
commitb765740a66821c4e97816a938c94740717661ba3
treeedc9135329af865781199d48e12514a1aa74ab01
parent6bb9acfb4eb3f6a2c61e03cbd5a6c6c464d2ae0c
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>
src/glsl/glsl_parser_extras.cpp
src/glsl/ir_optimization.h
src/glsl/linker.cpp
src/glsl/main.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/main/ff_fragment_shader.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp