tgsi: add uses_centroid into tgsi_shader_info
authorMarek Olšák <marek.olsak@amd.com>
Sun, 4 Jan 2015 20:58:42 +0000 (21:58 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jan 2015 11:06:43 +0000 (12:06 +0100)
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index eb313e430d62b3d6ad7460e10fdc0099078092b0..6210ebdb3ade017724127247becf0e6381c6c973 100644 (file)
@@ -191,6 +191,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
                   info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap;
                   info->num_inputs++;
 
+                  if (fulldecl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
+                     info->uses_centroid = TRUE;
+
                   if (semName == TGSI_SEMANTIC_PRIMID)
                      info->uses_primid = TRUE;
                   else if (procType == TGSI_PROCESSOR_FRAGMENT) {
index 375f75a3b983d9270ee2bc592c4e7c2fcf14c3c1..bacb4aba24218d652538ef2af529acba40012d57 100644 (file)
@@ -72,6 +72,7 @@ struct tgsi_shader_info
    boolean writes_stencil; /**< does fragment shader write stencil value? */
    boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
    boolean uses_kill;  /**< KILL or KILL_IF instruction used? */
+   boolean uses_centroid;
    boolean uses_instanceid;
    boolean uses_vertexid;
    boolean uses_vertexid_nobase;