aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader_nir.c
diff options
context:
space:
mode:
authorTimur Kristóf <[email protected]>2019-02-05 18:08:24 +0100
committerEric Anholt <[email protected]>2019-03-05 19:13:27 +0000
commit317f10bf404b562e1dda79c0636aee86beeccc2f (patch)
tree72c9aed2a1232f1ccca8a7374fbd18c33a5160df /src/gallium/drivers/radeonsi/si_shader_nir.c
parent2780a99ff80cf84f887e8a1dca0079271f90f947 (diff)
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 <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_nir.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 812c2172366..5e29c8f4ccd 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -343,6 +343,9 @@ void si_nir_scan_shader(const struct nir_shader *nir,
info->properties[TGSI_PROPERTY_NEXT_SHADER] =
pipe_shader_type_from_mesa(nir->info.next_stage);
+ info->properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION] =
+ nir->info.vs.window_space_position;
+
if (nir->info.stage == MESA_SHADER_TESS_CTRL) {
info->properties[TGSI_PROPERTY_TCS_VERTICES_OUT] =
nir->info.tess.tcs_vertices_out;