tgsi/scan: record if a shader writes the position output
authorMarek Olšák <marek.olsak@amd.com>
Mon, 14 Nov 2016 01:01:34 +0000 (02:01 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 21 Nov 2016 20:44:35 +0000 (21:44 +0100)
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index f0dba0b..84d6456 100644 (file)
@@ -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;
index 602a870..fe503e8 100644 (file)
@@ -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;