mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
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 <kenneth@whitecape.org>
This commit is contained in:
parent
b823d5df0f
commit
3330dec90c
1 changed files with 3 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue