diff options
author | Roland Scheidegger <[email protected]> | 2013-06-06 23:50:21 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-06 23:51:38 +0200 |
commit | 769449b3e86daccdba41d49219ad7191baba356f (patch) | |
tree | fc7a0243434f5bca7e03fae2e206dcd86bb92460 | |
parent | d0518c4c69b32815cbf6e850d47190bb57d25a0c (diff) |
gallium/tgsi: add missing string for layer semantic
Also report if a shader writes the layer semantic
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 0230267a5de..d331257cc4f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -217,6 +217,11 @@ tgsi_scan_shader(const struct tgsi_token *tokens, TGSI_SEMANTIC_VIEWPORT_INDEX) { info->writes_viewport_index = TRUE; } + if (procType == TGSI_PROCESSOR_GEOMETRY && + fulldecl->Semantic.Name == + TGSI_SEMANTIC_LAYER) { + info->writes_layer = TRUE; + } } } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 676abf0c9a9..a5b70244bd7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -76,6 +76,7 @@ struct tgsi_shader_info boolean pixel_center_integer; boolean color0_writes_all_cbufs; boolean writes_viewport_index; + boolean writes_layer; unsigned num_written_clipdistance; /** diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index 6abf9272a26..d8caae5a606 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -79,7 +79,8 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] = "THREAD_ID", "TEXCOORD", "PCOORD", - "VIEWPORT_INDEX" + "VIEWPORT_INDEX", + "LAYER" }; const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] = |