From 7dbf83af54067efcbd8fb872bbd1115fcecfab47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 14 Nov 2016 02:01:34 +0100 Subject: [PATCH] tgsi/scan: record if a shader writes the position output MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested-by: Edmondo Tommasina Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 ++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index f0dba0b1bda..84d64568c4b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -575,6 +575,8 @@ scan_declaration(struct tgsi_shader_info *info, case TGSI_SEMANTIC_POSITION: if (procType == PIPE_SHADER_FRAGMENT) info->writes_z = true; + else + info->writes_position = true; break; } break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 602a8703d50..fe503e8ba36 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -110,6 +110,7 @@ struct tgsi_shader_info boolean uses_primid; boolean uses_frontface; boolean uses_invocationid; + boolean writes_position; boolean writes_psize; boolean writes_clipvertex; boolean writes_viewport_index; -- 2.30.2