tgsi: Declare a LOOP register.
authorMichal Krol <michal@vmware.com>
Thu, 30 Jul 2009 08:34:06 +0000 (10:34 +0200)
committerMichal Krol <michal@vmware.com>
Thu, 30 Jul 2009 08:34:06 +0000 (10:34 +0200)
The only valid usage for LOOP/ENDLOOP instructions
is LOOP[0] as a destination register.
The only valid usage for the remaining instructions
is LOOP[0].x as an indirect register.

src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/auxiliary/tgsi/tgsi_dump_c.c
src/gallium/auxiliary/tgsi/tgsi_sanity.c
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/include/pipe/p_shader_tokens.h

index e1cd8479cb4b12850d507a0f3e71f6b4d2be9295..4ca3a16b8ae46ee3f08f0a1d8c5c8b9e906b186e 100644 (file)
@@ -82,7 +82,7 @@ static const char *processor_type_names[] =
    "GEOM"
 };
 
-static const char *file_names[] =
+static const char *file_names[TGSI_FILE_COUNT] =
 {
    "NULL",
    "CONST",
@@ -91,7 +91,8 @@ static const char *file_names[] =
    "TEMP",
    "SAMP",
    "ADDR",
-   "IMM"
+   "IMM",
+   "LOOP"
 };
 
 static const char *interpolate_names[] =
index c944760ca67fd540e0c48d6f46d1bc8e7f17d3b3..4a9c02b1413c73c01076a55eb239262b42d6254b 100644 (file)
@@ -69,7 +69,7 @@ static const char *TGSI_TOKEN_TYPES[] =
    "TOKEN_TYPE_INSTRUCTION"
 };
 
-static const char *TGSI_FILES[] =
+static const char *TGSI_FILES[TGSI_FILE_COUNT] =
 {
    "FILE_NULL",
    "FILE_CONSTANT",
@@ -78,7 +78,8 @@ static const char *TGSI_FILES[] =
    "FILE_TEMPORARY",
    "FILE_SAMPLER",
    "FILE_ADDRESS",
-   "FILE_IMMEDIATE"
+   "FILE_IMMEDIATE",
+   "FILE_LOOP"
 };
 
 static const char *TGSI_INTERPOLATES[] =
index 6f1f5c2b4b0b624216283d2c9d5b14389f5881c8..8bb186bae54f161dfc0e1191279e9556e2de0d6e 100644 (file)
@@ -131,7 +131,7 @@ is_register_used(
    return (ctx->regs_used[file][index / BITS_IN_REG_FLAG] & (1 << (index % BITS_IN_REG_FLAG))) ? TRUE : FALSE;
 }
 
-static const char *file_names[] =
+static const char *file_names[TGSI_FILE_COUNT] =
 {
    "NULL",
    "CONST",
@@ -140,7 +140,8 @@ static const char *file_names[] =
    "TEMP",
    "SAMP",
    "ADDR",
-   "IMM"
+   "IMM",
+   "LOOP"
 };
 
 static boolean
index bfcbc40982a7558f3406b24a6b5e27d3e3d7037c..d438450b1e4cf0f63f8630e1aa3471ffd1576a41 100644 (file)
@@ -231,7 +231,8 @@ static const char *file_names[TGSI_FILE_COUNT] =
    "TEMP",
    "SAMP",
    "ADDR",
-   "IMM"
+   "IMM",
+   "LOOP"
 };
 
 static boolean
index e6e29a04ec043bb74eef7987145589f21c6e8e47..c4be604e5a0aa44b36e2c6d2b96a2d3d321f052b 100644 (file)
@@ -78,6 +78,7 @@ enum tgsi_file_type {
    TGSI_FILE_SAMPLER     =5,
    TGSI_FILE_ADDRESS     =6,
    TGSI_FILE_IMMEDIATE   =7,
+   TGSI_FILE_LOOP        =8,
    TGSI_FILE_COUNT      /**< how many TGSI_FILE_ types */
 };