summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-01-04 21:58:42 +0100
committerMarek Olšák <[email protected]>2015-01-07 12:06:43 +0100
commit1b82eb677de63ec49f56800b81ac49b79fc5576a (patch)
treef6229b1c662f596e11bb6f7249fefaf324356157 /src
parenteaae92a349af1fd6641c4bdd4bfd1185b1b6fe3e (diff)
tgsi: add uses_centroid into tgsi_shader_info
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c3
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index eb313e430d6..6210ebdb3ad 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -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) {
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 375f75a3b98..bacb4aba242 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -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;