i965/tes: account for the fact that dvec3/4 inputs take two slots
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 9 Oct 2017 12:17:43 +0000 (14:17 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 10 Oct 2017 06:59:54 +0000 (08:59 +0200)
commit5ec21eb1a0c9fa08978784e58456fdd212aab4d7
tree43b11a726fc45d97f35f507e8987fc798479bc03
parent63e6db18c5cdec50688d604a43ddaf86a2238f76
i965/tes: account for the fact that dvec3/4 inputs take two slots

When computing the total size of the URB for tessellation evaluation
inputs we were not accounting for this, and instead we were always
assuming that each input would take a single vec4 slot, which could
lead to computing a smaller read size than required. Specifically, this
is a problem when the last input is a dvec3/4 such that its XY components
are stored in the the second half of a payload register (which can happen
if the offset for the input in the URB is not 64-bit aligned because
there are 32-bit inputs mixed in) and the ZW components in the
first half of the next, as in this case we would fail to account for the
extra slot required for the ZW components.

Fixes (requires another fix in CTS currently in review):
KHR-GL45.enhanced_layouts.varying_locations
KHR-GL45.enhanced_layouts.varying_array_locations

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs_nir.cpp