i965: Handle TCS outputs and TES inputs.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 10 Dec 2015 05:41:35 +0000 (21:41 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 14 Dec 2015 22:48:13 +0000 (14:48 -0800)
commitbee42cc1f78c480d13da879682268ee14b0d6fe7
treee67817998df698a4a8f07dbd8d85ff12da0e0a5e
parent31140d097a7939e0f917aa76bd37b5c682898e63
i965: Handle TCS outputs and TES inputs.

TCS outputs and TES inputs both refer to a common "patch URB entry"
shared across all invocations.  First, there are some number of
per-patch entries.  Then, there are per-vertex entries accessed via
an offset for the variable and a stride times the vertex index.

Because these calculations need to be done in both the vec4 and scalar
backends, it's simpler to just compute the offset calculations in NIR.
It doesn't necessarily make much sense to use per-vertex intrinsics
afterwards, but that at least means we don't lose the per-patch vs.
per-vertex information.

v2: Use is_input/is_output helpers (suggested by Jordan Justen).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_nir.c