tgsi/scan: set if a fragment shader writes sample mask
authorMarek Olšák <marek.olsak@amd.com>
Wed, 23 Dec 2015 02:01:32 +0000 (03:01 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 7 Jan 2016 17:26:05 +0000 (18:26 +0100)
This will be used by radeonsi.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index e04f4076e9cb600235cc97df207e7fa9f1c2f1e2..e3feed9aa981216145339d42987b94570b32dca7 100644 (file)
@@ -392,6 +392,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
                      }
                      else if (semName == TGSI_SEMANTIC_STENCIL) {
                         info->writes_stencil = TRUE;
+                     } else if (semName == TGSI_SEMANTIC_SAMPLEMASK) {
+                        info->writes_samplemask = TRUE;
                      }
                   }
 
index 7e9a5597db2fa7459bfe88998d9f233245919595..a3e437809aa8c0c316b5f6ba19d14ce72037f2aa 100644 (file)
@@ -82,6 +82,7 @@ struct tgsi_shader_info
    boolean reads_z; /**< does fragment shader read depth? */
    boolean writes_z;  /**< does fragment shader write Z value? */
    boolean writes_stencil; /**< does fragment shader write stencil value? */
+   boolean writes_samplemask; /**< does fragment shader write sample mask? */
    boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
    boolean uses_kill;  /**< KILL or KILL_IF instruction used? */
    boolean uses_persp_center;