diff options
author | Matt Turner <[email protected]> | 2014-03-08 12:16:13 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-03-10 14:13:45 -0700 |
commit | 3330dec90ccba5d6c2932ff4e223d37eaa97fc60 (patch) | |
tree | 477d4343b5aaf6e68bec39a1f43a6cd8a08a0a6f /src/mesa/drivers/dri/i965 | |
parent | b823d5df0f65fd7b1a821bcb00f1270ada5bf879 (diff) |
i965/vec4: Don't fix-up scalar uniforms for 3 src instructions.
Removes unnecessary MOV instructions in L4D2, TF2, Dota2, and many other
Steam games.
total instructions in shared programs: 1668126 -> 1657509 (-0.64%)
instructions in affected programs: 242235 -> 231618 (-4.38%)
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 921e9099e08..c73e58d6cf7 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -277,6 +277,9 @@ vec4_visitor::fix_3src_operand(src_reg src) if (src.file != UNIFORM && src.file != IMM) return src; + if (src.file == UNIFORM && brw_is_single_value_swizzle(src.swizzle)) + return src; + dst_reg expanded = dst_reg(this, glsl_type::vec4_type); expanded.type = src.type; emit(MOV(expanded, src)); |