aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.sources
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-04-17 17:30:25 -0700
committerKenneth Graunke <[email protected]>2013-05-12 09:36:46 -0700
commite413d3f15ca72b82ca29e43f010597a83427d5e8 (patch)
tree89436a108f3e2f53ebab46c30d80c74ef6336277 /src/glsl/Makefile.sources
parent72a0b7a43531eb5e5cc4355941957864f86dd719 (diff)
glsl: Add a pass to flip matrix/vector multiplies to use dot products.
This pass flips (matrix * vector) operations to (vector * matrixTranspose) for certain built-in matrices (currently gl_ModelViewProjectionMatrix and gl_TextureMatrix). This is equivalent, but results in dot products rather than multiplies and adds. On some hardware, this is more efficient. This pass is conditionalized on ctx->mvp_with_dp4, the flag drivers set to indicate they prefer dot products. Improves performance in Lightsmark by 1.01131% +/- 0.162069% (n = 10) on a Haswell GT2 system. Passes Piglit on Ivybridge. v2: Use struct gl_shader_compiler_options instead of plumbing through another boolean flag for this purpose. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/Makefile.sources')
-rw-r--r--src/glsl/Makefile.sources1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index 674a05f5a32..df03cf806c4 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -82,6 +82,7 @@ LIBGLSL_FILES = \
$(GLSL_SRCDIR)/opt_dead_code_local.cpp \
$(GLSL_SRCDIR)/opt_dead_functions.cpp \
$(GLSL_SRCDIR)/opt_flatten_nested_if_blocks.cpp \
+ $(GLSL_SRCDIR)/opt_flip_matrices.cpp \
$(GLSL_SRCDIR)/opt_function_inlining.cpp \
$(GLSL_SRCDIR)/opt_if_simplification.cpp \
$(GLSL_SRCDIR)/opt_noop_swizzle.cpp \