i965/vec4: add a helper function to create double immediates
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 9 Mar 2016 15:37:33 +0000 (16:37 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:50 +0000 (11:26 +0100)
commit98da3623d5dfd991362c4fd3571325fe0277a2f9
tree9ea244cdb5a44e1958134cb95248f27858cbc020
parent8f9ce5fa22c04b5b34aa6dc67e4a9b2d151d293d
i965/vec4: add a helper function to create double immediates

Gen7 hardware does not support double immediates so these need
to be moved in 32-bit chunks to a regular vgrf instead. Instead
of doing this every time we need to create a DF immediate,
create a helper function that does the right thing depending
on the hardware generation.

v2 (Curro):
  - Use swizzle() and writemask() helpers and make tmp const.

v3 (Iago):
  - Adapt to changes in offset()

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp