[Mesa-dev] [PATCH 3/5] gallium: rename TGSI tessellation processor types to match pipe shader names

Marek Olšák maraeo at gmail.com
Sun May 24 02:47:52 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

I forgot to do this when pushing the interface changes.
---
 src/gallium/auxiliary/tgsi/tgsi_dump.c     |  6 +++---
 src/gallium/auxiliary/tgsi/tgsi_info.c     |  4 ++--
 src/gallium/auxiliary/tgsi/tgsi_sanity.c   | 12 ++++++------
 src/gallium/auxiliary/tgsi/tgsi_scan.c     |  8 ++++----
 src/gallium/include/pipe/p_shader_tokens.h |  4 ++--
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index c584c2b..c80d7a2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -286,15 +286,15 @@ iter_declaration(
    if (decl->Declaration.File == TGSI_FILE_INPUT &&
        (iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY ||
         (!patch &&
-         (iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL ||
-          iter->processor.Processor == TGSI_PROCESSOR_TESSEVAL)))) {
+         (iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL ||
+          iter->processor.Processor == TGSI_PROCESSOR_TESS_EVAL)))) {
       TXT("[]");
    }
 
    /* all non-patch tess ctrl shader outputs are two dimensional */
    if (decl->Declaration.File == TGSI_FILE_OUTPUT &&
        !patch &&
-       iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL) {
+       iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL) {
       TXT("[]");
    }
 
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index eb447cb..9295311 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -302,9 +302,9 @@ tgsi_get_processor_name( uint processor )
       return "fragment shader";
    case TGSI_PROCESSOR_GEOMETRY:
       return "geometry shader";
-   case TGSI_PROCESSOR_TESSCTRL:
+   case TGSI_PROCESSOR_TESS_CTRL:
       return "tessellation control shader";
-   case TGSI_PROCESSOR_TESSEVAL:
+   case TGSI_PROCESSOR_TESS_EVAL:
       return "tessellation evaluation shader";
    default:
       return "unknown shader type!";
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index 2ac74fb..be4851f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -415,8 +415,8 @@ iter_declaration(
          decl->Semantic.Name == TGSI_SEMANTIC_TESSINNER;
       if (file == TGSI_FILE_INPUT && !patch && (
                 processor == TGSI_PROCESSOR_GEOMETRY ||
-                processor == TGSI_PROCESSOR_TESSCTRL ||
-                processor == TGSI_PROCESSOR_TESSEVAL)) {
+                processor == TGSI_PROCESSOR_TESS_CTRL ||
+                processor == TGSI_PROCESSOR_TESS_EVAL)) {
          uint vert;
          for (vert = 0; vert < ctx->implied_array_size; ++vert) {
             scan_register *reg = MALLOC(sizeof(scan_register));
@@ -424,7 +424,7 @@ iter_declaration(
             check_and_declare(ctx, reg);
          }
       } else if (file == TGSI_FILE_OUTPUT && !patch &&
-                 processor == TGSI_PROCESSOR_TESSCTRL) {
+                 processor == TGSI_PROCESSOR_TESS_CTRL) {
          uint vert;
          for (vert = 0; vert < ctx->implied_out_array_size; ++vert) {
             scan_register *reg = MALLOC(sizeof(scan_register));
@@ -489,7 +489,7 @@ iter_property(
        prop->Property.PropertyName == TGSI_PROPERTY_GS_INPUT_PRIM) {
       ctx->implied_array_size = u_vertices_per_prim(prop->u[0].Data);
    }
-   if (iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL &&
+   if (iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL &&
        prop->Property.PropertyName == TGSI_PROPERTY_TCS_VERTICES_OUT)
       ctx->implied_out_array_size = prop->u[0].Data;
    return TRUE;
@@ -499,8 +499,8 @@ static boolean
 prolog(struct tgsi_iterate_context *iter)
 {
    struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
-   if (iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL ||
-       iter->processor.Processor == TGSI_PROCESSOR_TESSEVAL)
+   if (iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL ||
+       iter->processor.Processor == TGSI_PROCESSOR_TESS_EVAL)
       ctx->implied_array_size = 32;
    return TRUE;
 }
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 3f94bab..d821072 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -74,8 +74,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
    assert(procType == TGSI_PROCESSOR_FRAGMENT ||
           procType == TGSI_PROCESSOR_VERTEX ||
           procType == TGSI_PROCESSOR_GEOMETRY ||
-          procType == TGSI_PROCESSOR_TESSCTRL ||
-          procType == TGSI_PROCESSOR_TESSEVAL ||
+          procType == TGSI_PROCESSOR_TESS_CTRL ||
+          procType == TGSI_PROCESSOR_TESS_EVAL ||
           procType == TGSI_PROCESSOR_COMPUTE);
    info->processor = procType;
 
@@ -239,8 +239,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
 
                   if (procType == TGSI_PROCESSOR_VERTEX ||
                       procType == TGSI_PROCESSOR_GEOMETRY ||
-                      procType == TGSI_PROCESSOR_TESSCTRL ||
-                      procType == TGSI_PROCESSOR_TESSEVAL) {
+                      procType == TGSI_PROCESSOR_TESS_CTRL ||
+                      procType == TGSI_PROCESSOR_TESS_EVAL) {
                      if (semName == TGSI_SEMANTIC_CLIPDIST) {
                         info->num_written_clipdistance +=
                            util_bitcount(fulldecl->Declaration.UsageMask);
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 953bdf6..bb57e80 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -43,8 +43,8 @@ struct tgsi_header
 #define TGSI_PROCESSOR_FRAGMENT  0
 #define TGSI_PROCESSOR_VERTEX    1
 #define TGSI_PROCESSOR_GEOMETRY  2
-#define TGSI_PROCESSOR_TESSCTRL  3
-#define TGSI_PROCESSOR_TESSEVAL  4
+#define TGSI_PROCESSOR_TESS_CTRL 3
+#define TGSI_PROCESSOR_TESS_EVAL 4
 #define TGSI_PROCESSOR_COMPUTE   5
 
 struct tgsi_processor
-- 
2.1.0



More information about the mesa-dev mailing list