[Mesa-dev] [PATCH 3/3] i965/vec4: Don't fix-up scalar uniforms for 3 src instructions.
Kenneth Graunke
kenneth at whitecape.org
Sat Mar 8 13:02:19 PST 2014
On 03/08/2014 12:46 PM, Matt Turner wrote:
> 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%)
> ---
> src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index 921e909..c73e58d 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));
>
Series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140308/cd29afb7/attachment.pgp>
More information about the mesa-dev
mailing list