i965/vec4: fix register width for DF VGRF and UNIFORM
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 25 Apr 2017 10:18:17 +0000 (12:18 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 3 May 2017 13:32:39 +0000 (15:32 +0200)
commitaaeb1c99beed39d85c300ebdb8a7bf056ee6717c
treeced45559a30aee15b5dcdff3855c7c4edc3b0e0e
parent7f728bce811fc283e672e3a07b008bb7b52de35e
i965/vec4: fix register width for DF VGRF and UNIFORM

On gen7, the swizzles used in DF align16 instructions works for element
size of 32 bits, so we can address only 2 consecutive DFs. As we assumed that
in the rest of the code and prepare the instructions for this (scalarize_df()),
we need to set it to two again.

However, for DF align1 instructions, a width of 2 is wrong as we are not
reading the data we want. For example, an uniform would have a region of
<0, 2, 1> so it would repeat the first 2 DFs, when we wanted to access
to the first 4.

This patch sets the default one to 4 and then modifies the width of
align16 instruction's DF sources when we translate the logical swizzle
to the physical one.

v2:
- Remove conditional (Curro).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/intel/compiler/brw_vec4.cpp