summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_vectorize.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Fixed vectorize pass vs. texture lookups.Aras Pranckevicius2014-08-141-0/+13
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82574 Reviewed-by: Matt Turner <[email protected]>
* mesa: Make unreachable macro take a string argument.Matt Turner2014-07-011-2/+1
| | | | | | To aid in debugging. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Try vectorizing when seeing a repeated assignment to a channel.Kenneth Graunke2014-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When considering assignment expressions like: v.x += u.x; v.x += u.x; the vectorizer would incorrectly keep going, attempting to find more instructions to vectorize. It would overwrite the saved assignment to point at the second one, and increment channels a second time, resulting in try_vectorize thinking the expression was a vec2 instead of a float. Instead, if we see a repeated assignment to a channel, just try to vectorize everything we've found so far. This clears the saved state so it will start over. Fixes Piglit's repeated-channel-assignments.vert. Cc: "10.1" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Clean up "unused parameter" warningsIan Romanick2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ../../src/glsl/builtin_functions.cpp:72:1: warning: unused parameter 'state' [-Wunused-parameter] ../../src/glsl/ir_clone.cpp:31:1: warning: unused parameter 'ht' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:44:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:50:1: warning: unused parameter 'ignore' [-Wunused-parameter] ../../src/glsl/ir_equals.cpp:68:1: warning: unused parameter 'ignore' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:149:6: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:556:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/ir_print_visitor.cpp:562:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/link_uniforms.cpp:213:1: warning: unused parameter 'record_type' [-Wunused-parameter] ../../src/glsl/loop_analysis.cpp:225:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:73:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:79:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/loop_unroll.cpp:85:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_copy_propagation_elements.cpp:189:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_cse.cpp:402:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_dead_code_local.cpp:117:30: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_redundant_jumps.cpp:53:1: warning: unused parameter 'ir' [-Wunused-parameter] ../../src/glsl/opt_vectorize.cpp:301:1: warning: unused parameter 'ir' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Don't vectorize horizontal expressions.Matt Turner2014-02-281-0/+15
| | | | | Cc: "10.1" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75224
* glsl: Do not vectorize vector array dereferences.Matt Turner2014-02-111-0/+14
| | | | | | | | | | Array dereferences must have scalar indices, so we cannot vectorize them. Cc: "10.1" <[email protected]> Reported-by: Andrew Guertin <[email protected]> Tested-by: Andrew Guertin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Expand non-expr & non-swizzle scalar rvalues in vectorizing.Matt Turner2014-01-311-6/+8
|
* glsl: Avoid combining statements from different basic blocks.Matt Turner2014-01-271-0/+35
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74113 Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Set proper swizzle when a channel is missing in vectorizing.Matt Turner2014-01-271-4/+13
| | | | | | | | | | | | | | | | | | | Previously, for example if the x channel was missing from a series of assignments we were attempting to vectorize, the wrong swizzle mask would be applied. a.y = b.y; a.z = b.z; a.w = b.w; would be incorrectly transformed into a.yzw = b.xyz; Fixes two transform feedback tests in the ES3 conformance suite. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73978 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73954 Reviewed-by: Ian Romanick <[email protected]>
* glsl: Vectorize multiple scalar assignmentsMatt Turner2014-01-211-0/+319
Reduces vertex shader instruction counts in DOTA2 by 6.42%, L4D2 by 4.61%, and CS:GO by 5.71%. total instructions in shared programs: 1500153 -> 1498191 (-0.13%) instructions in affected programs: 59919 -> 57957 (-3.27%) Reviewed-by: Ian Romanick <[email protected]>