i965/vec4: Add a new dst_reg constructor accepting a brw_reg_type
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sat, 23 May 2015 21:42:58 +0000 (23:42 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:50 +0000 (09:40 -0700)
commit0d43d27df742ad95a086580bae2ee08a0bc00e69
tree2e9a850d617897aa874a76aa4f167fafd63f43ce
parentc15eea2afa7a295992cde949b8e2a5d4552f6290
i965/vec4: Add a new dst_reg constructor accepting a brw_reg_type

This is useful for the upcoming texture support in NIR->vec4 pass,
as we found several cases where the brw_type is available, but not
the glsl_type.

Without this new constructor, the alternative would be:
dst_reg reg(MRF, <reg>)
reg.type = <brw_type>
reg.writemask = <mask>

Adding a new constructor makes code easier to read.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_ir_vec4.h
src/mesa/drivers/dri/i965/brw_vec4.cpp