nir: Add a pass to lower TES patch_vertices intrinsics to a constant.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 1 Oct 2016 19:34:36 +0000 (12:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Jan 2017 21:21:53 +0000 (13:21 -0800)
commit5297267a1c78d21486fbe8c2a584f53c4147c950
tree0c0b89ddae2ac44b57bda15afc996ace5d573789
parent944e8b08cd182d00f82e8fa1efea4503eed18e1d
nir: Add a pass to lower TES patch_vertices intrinsics to a constant.

In Vulkan, we always have both the TCS and TES available in the same
pipeline, so we can simply use the TCS OutputVertices execution mode
value as the TES PatchVertices built-in.

For GLSL, we handle this in the linker.  But we could use this pass
in the case when both TCS and TES are linked together, if we wanted.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/Makefile.sources
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_patch_vertices.c [new file with mode: 0644]