nir: Add ability for shaders to use window space coordinates.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 5 Feb 2019 17:08:24 +0000 (18:08 +0100)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2019 19:13:27 +0000 (19:13 +0000)
commit317f10bf404b562e1dda79c0636aee86beeccc2f
tree72c9aed2a1232f1ccca8a7374fbd18c33a5160df
parent2780a99ff80cf84f887e8a1dca0079271f90f947
nir: Add ability for shaders to use window space coordinates.

This patch adds a shader_info field that tells the driver to use window
space coordinates for a given vertex shader. It also enables this feature
in radeonsi (the only NIR-capable driver that supported it in TGSI),
and makes tgsi_to_nir aware of it.

Signed-Off-By: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/shader_info.h
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/radeonsi/si_shader_nir.c