gallium/tgsi: add missing string for layer semantic
authorRoland Scheidegger <sroland@vmware.com>
Thu, 6 Jun 2013 21:50:21 +0000 (23:50 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 6 Jun 2013 21:51:38 +0000 (23:51 +0200)
Also report if a shader writes the layer semantic

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h
src/gallium/auxiliary/tgsi/tgsi_strings.c

index 0230267a5dedcc5a608dfc91cd3a42e57fe29e32..d331257cc4fc74fd31e72102a44919ceade7ac59 100644 (file)
@@ -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;
+                  }
                }
 
              }
index 676abf0c9a91b11975be625cfad0186c2315caf3..a5b70244bd7dd45c6d9f76092fde29d8f2e3c21c 100644 (file)
@@ -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;
    /**
index 6abf9272a26b7bc6d6b9503e921df70b113baba6..d8caae5a6063ba94658e0e1049e7421e2a4c6a61 100644 (file)
@@ -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] =