diff options
author | Zack Rusin <[email protected]> | 2013-03-29 04:50:32 -0700 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-04-03 10:16:25 -0700 |
commit | d8543bd7528de05e5ce3ac407838e7500428a93d (patch) | |
tree | 92a46903a64aefda058173b22ecbdd444ca1cba2 /src/gallium/auxiliary/tgsi | |
parent | f6bfb62c500c059464e66a4246a2e6089752d3db (diff) |
draw: Implement support for primitive id
We were largely ignoring primitive id.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index c59b3a75bd9..373391d62c1 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -186,6 +186,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens, } else if (fulldecl->Semantic.Name == TGSI_SEMANTIC_VERTEXID) { info->uses_vertexid = TRUE; + } else if (fulldecl->Semantic.Name == TGSI_SEMANTIC_PRIMID) { + info->uses_primid = TRUE; } } else if (file == TGSI_FILE_OUTPUT) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 235e6a3fae0..9debc341f52 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -71,6 +71,7 @@ struct tgsi_shader_info boolean uses_kill; /**< KIL or KILP instruction used? */ boolean uses_instanceid; boolean uses_vertexid; + boolean uses_primid; boolean origin_lower_left; boolean pixel_center_integer; boolean color0_writes_all_cbufs; |