[Mesa-dev] [PATCH 1/2] glsl: Add uniform_locations_assigned parameter to do_dead_code opt pass
Bryan Cain
bryancain3 at gmail.com
Fri Oct 21 11:53:31 PDT 2011
If it's worth anything, the glsl_to_tgsi part is
Reviewed-by: Bryan Cain <bryancain3 at gmail.com>
On 10/21/2011 01:49 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Setting this flag prevents declarations of uniforms from being removed
> from the IR. Since the IR is directly used by several API functions
> that query uniforms in shaders, uniform declarations cannot be removed
> after the locations have been set. However, it should still be safe
> to reorder the declarations (this is not tested).
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980
> Cc: Brian Paul <brianp at vmware.com>
> Cc: Bryan Cain <bryancain3 at gmail.com>
> Cc: Vinson Lee <vlee at vmware.com>
> Cc: José Fonseca <jfonseca at vmware.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/glsl/glsl_parser_extras.cpp | 23 +++++++++++++++++++++--
> src/glsl/ir_optimization.h | 6 ++++--
> src/glsl/linker.cpp | 2 +-
> src/glsl/main.cpp | 2 +-
> src/glsl/opt_dead_code.cpp | 14 ++++++++++----
> src/glsl/test_optpass.cpp | 4 ++--
> src/mesa/drivers/dri/i965/brw_shader.cpp | 3 ++-
> src/mesa/main/ff_fragment_shader.cpp | 2 +-
> src/mesa/program/ir_to_mesa.cpp | 6 ++++--
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 +++-
> 10 files changed, 49 insertions(+), 17 deletions(-)
More information about the mesa-dev
mailing list