OSDN Git Service

i965/vec4: Simplify visit(ir_expression *)'s result_src/dst setup.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 16 Oct 2014 02:17:21 +0000 (19:17 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 22 Oct 2014 04:14:00 +0000 (21:14 -0700)
commitf5c3f095b97dc5d8997ca448ffffbca67b3db4d5
treef187faadc607598b8e45180716f2c11619f0e99a
parentcb36e79f96101528080917c469dea3b525df2a32
i965/vec4: Simplify visit(ir_expression *)'s result_src/dst setup.

Using dst_reg(this, ir->type) automatically sets the writemask to the
proper size for the type; src_reg(dst_reg) preserves that.  This should
be equivalent, but less code.

Note that src_reg(dst_reg) either uses SWIZZLE_XXXX or SWIZZLE_XYZW, so
the old code did need the manual writemask adjustment, since it
constructed the registers the other way around.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp