From: Thomas Helland
Shows no changes for shader-db.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 21bf332..a49752d 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/s
From: Thomas Helland
Since we lower A - B to A + neg(B) on some architectures
lets add a optimization for this pattern.
This yields some gains in a shader-db run with extra shaders
added from Team Fortress 2 and Portal.
helped: shaders/tf2/1684.shader_test fs16: 62 -> 60 (-3.23%)
helpe
From: Thomas Helland
Let's cut the needless A && B here.
v1 -> v2: Correct the comments, return A instead of A && B
v2 -> v3: Rebase on top of this series
Signed-off-by: Thomas Helland
---
This was originally posted here:
http://lists.freedesktop.org/archives/mesa-dev/2014-July/063129.html
v2
From: Thomas Helland
And the log2() equivalent.
v1 -> v2: Correct trailing whitespace
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 12
1 file changed, 12 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cp
From: Thomas Helland
v1 -> v2: Drop the neg(A) - B == neg(A+B) part
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 0ecadbe..c673495 100644
--- a/src/glsl/opt_algeb
From: Thomas Helland
And it's exp2() equivalent.
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 11 +++
1 file changed, 11 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 141b930..0e21ff8 100644
--- a/s
From: Thomas Helland
And it's cousins
v1 -> v2: Correct indentation
Correct returned operand from second if statement
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 10 ++
1 file changed, 10 insertions(+)
diff --git a/src/glsl/opt_a
From: Thomas Helland
Specifically x^-1 = rcp(x)
.0^x = 0
.x^0 = 1
v1 -> v2: Correct indentation
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 15 +++
1 file changed, 15 insertions(+)
diff --git a/src/glsl/opt_al
From: Thomas Helland
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 8
1 file changed, 8 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 67326c5..cdabdb8 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/sr
From: Thomas Helland
v1 -> v2: Correct indentation
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 12
1 file changed, 12 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index c179d53..67326c5 100644
---
From: Thomas Helland
v1 -> v2: Corrected indentation.
Signed-off-by: Thomas Helland
Reviewed-by: Eric Anholt
---
src/glsl/opt_algebraic.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index ac7514a..c179d53 100644
--- a/src/gl
From: Thomas Helland
Some of these patches have been posted to the list before.
Eric showed interest in these being merged, so I addressed his points.
Pathces 1 - 7 I've added Eric's R-B on.
Patch 8 drops the part that people had doubt on.
Patch 9 has been posted before, and seemed to be accept
From: Thomas Helland
When writing that A || (A && B) patch some
days ago I also wrote some other patches
that have no impact on my collection of shaders.
(shader-db + Some TF2 and Portal-shaders).
No reduction in instruction count, and no
significant increase in compilation time.
I decided to pu
From: Thomas Helland
This also only handles floats.
ir_unop_saturate should also be added when the
support for this lands in the ir.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 38 ++
1 file changed, 38 insertions(+)
diff --git a/src/glsl
From: Thomas Helland
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 8
1 file changed, 8 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 385f0a2..748fd05 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@
From: Thomas Helland
Silly optimization indeed, but who knows.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index ac7514a..c179d53 100644
--- a/src/glsl/opt_algebraic.
From: Thomas Helland
Specifically x^-1 = rcp(x)
.0^x = 0
.x^0 = 1
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 15 +++
1 file changed, 15 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index fba9de6..1
From: Thomas Helland
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 12
1 file changed, 12 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index c179d53..385f0a2 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic
From: Thomas Helland
And it's exp2() equivalent.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 11 +++
1 file changed, 11 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index e2abf5f..2361d0f 100644
--- a/src/glsl/opt_algebraic.cpp
From: Thomas Helland
This patch is a bit sketchy.
It only handles float-constants, otherwise it bails.
Also, ir_unop_saturate should be added here when
support for it lands in the ir.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 37 +
1 fil
From: Thomas Helland
...and neg(A) - B == neg(A + B)
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 2361d0f..fba9de6 100644
--- a/src/glsl/opt_algebraic.cpp
++
From: Thomas Helland
And the log2() equivalent.
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 12
1 file changed, 12 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index deaa49e..e2abf5f 100644
--- a/src/glsl/opt_algebraic.cpp
From: Thomas Helland
And it's cousins
Signed-off-by: Thomas Helland
---
src/glsl/opt_algebraic.cpp | 10 ++
1 file changed, 10 insertions(+)
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 748fd05..230fb1b 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/gl
From: Thomas Helland
Let's cut the needless A && B here.
Gives some effect on a clean shader-db with
some extra shaders from TF2 and portal.
helped: shaders/tf2/2042.shader_test fs16:23 -> 21 (-8.70%)
helped: shaders/tf2/2042.shader_test fs8: 23 -> 21 (-8.70%)
helped: shaders/tf2
From: Thomas Helland
Let's cut the needless A && B here.
Gives some effect on a clean shader-db with
some extra shaders from TF2 and portal.
helped: shaders/tf2/2042.shader_test fs16:23 -> 21
(-8.70%)
helped: shaders/tf2/2042.shader_test fs8: 23 -> 21
(-8.70%)
hel
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/ir_constant_expression.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/glsl/ir_constant_expression.cpp
b/src/glsl/ir_constant_expression.cpp
index 8afe8f7..7b4a2
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system
Signed-off-by: Thomas Helland
---
src/glsl/hir_field_selection.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index 1e92c89..0fa9768 100644
-
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/ir.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 8fed768..10c0006 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -23,
From: Thomas Helland
Only function-defs use glsl_type so forward declare instead.
Compile-tested on my Ivy-bridge system.
IWYU also suggests removing #include , and this compiles fine.
I'm not familiar enough with memory management in C/C++ that I feel
comfortable removing this. Insights would b
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/ir_expression_flattening.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/glsl/ir_expression_flattening.cpp
b/src/glsl/ir_expression_flattening.cpp
index c1cadb
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/ir_basic_block.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/glsl/ir_basic_block.cpp b/src/glsl/ir_basic_block.cpp
index 426fda2..74ee4b6 100644
--- a/src/gls
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/builtin_variables.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 9b35850..e22b083 100644
--- a/
From: Thomas Helland
This series removes some unused includes in the glsl-directory.
These were found with Google's include-what-you-use plugin for clang.
Patches have been compile-tested and a quick glxgears-run has been done.
I have not done a full piglit-run, let me know if that's wanted.
Oh,
From: Thomas Helland
Found with IWYU. Comment says it's for struct gl_extensions.
Grepping for gl_extensions shows no uses.
Tested by compiling on my Ivy-bridge system.
Signed-off-by: Thomas Helland
---
src/glsl/ast_to_hir.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/glsl/ast_to_
From: Thomas Helland
Found with IWYU, compile-tested on my Ivy-bridge system.
This is not used in the header, and is included in the source.
Signed-off-by: Thomas Helland
---
src/glsl/link_uniform_block_active_visitor.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/glsl/link_uniform
From: Thomas Helland
Found with IWYU. Compile-tested on my Ivy-bridge system.
Added comment about core.h being used for MAX2.
Signed-off-by: Thomas Helland
---
src/glsl/glsl_types.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl
From: Thomas Helland
Found with IWYU, confirmed with grepping for "hash" and "symbol".
No negative effects on compilation.
IWYU also reported core.h and linker.h could be removed,
but I'm unsure if those are false positives.
Signed-off-by: Thomas Helland
---
src/glsl/link_uniform_initializers
37 matches
Mail list logo