i965/vec4: Trivial improvements to the with_writemask() function.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 28 Nov 2013 23:07:06 +0000 (15:07 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 19 Feb 2014 15:27:25 +0000 (16:27 +0100)
commit3b032732753b18c84482e30dd3675403eec7919f
treec9ef355b4628c5dc027cdf19cfe8715155e2dd5b
parent42b226ef824ed61ccf51fa9a1198cba305ad5472
i965/vec4: Trivial improvements to the with_writemask() function.

Add assertion that the register is not in the HW_REG or IMM file,
calculate the conjunction of the old and new mask instead of replacing
the old [consistent with the behavior of brw_writemask(), causes no
functional changes right now], make it static inline to let the
compiler do a slightly better job at optimizing things, and shorten
its name.

v2: Assert that the new writemask is not zero to avoid undefined
    hardware behaviour.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp