i965/vec4: fix vertical stride to avoid breaking region parameter rule
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 26 Apr 2017 08:12:03 +0000 (10:12 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 3 May 2017 13:32:39 +0000 (15:32 +0200)
commit7f728bce811fc283e672e3a07b008bb7b52de35e
treefa51548f6b5f286c12acde54b9631d596278cddf
parent3bf3f9866c1387872521242921bb00c7fb7c2834
i965/vec4: fix vertical stride to avoid breaking region parameter rule

From IVB PRM, vol4, part3, "General Restrictions on Regioning
Parameters":

  "If ExecSize = Width and HorzStride ≠ 0, VertStride must
   be set to Width * HorzStride."

In next patch, we are going to modify the region parameter for
uniforms and vgrf. For uniforms that are the source of
DF align1 instructions, they will have <0, 4, 1> regioning and
the execsize for those instructions will be 4, so they will break
the regioning rule. This will be the same for VGRF sources where
we use the vstride == 0 exploit.

As we know we are not going to cross the GRF boundary with that
execsize and parameters (not even with the exploit), we just fix
the vstride here.

v2:
- Move is_align1_df() (Curro)
- Refactor exec_size == width calculation (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