i965: Fix register types in dump_instructions(), again.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Mar 2014 07:04:35 +0000 (00:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 14 Mar 2014 20:17:57 +0000 (13:17 -0700)
In commit e57d77280efcbfd6579a88f071426653287ef833, I fixed this for
destinations in the Vec4 backend, and sources in the scalar backend.
But not both types in both backends.

To prevent this mess from continuing, make the reg_encoding table
static, so only the disassembler can use it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp

index ae66249d94c4d63263c6dd8ad230052ee7407c6f..bc79a00b593dc6bd71b0371dc338f469193cc104 100644 (file)
@@ -1843,7 +1843,6 @@ struct opcode_desc {
 
 extern const struct opcode_desc opcode_descs[128];
 extern const char * const conditional_modifier[16];
-extern const char * const reg_encoding[8];
 
 void
 brw_emit_depthbuffer(struct brw_context *brw);
index d79e7503a695c5382236019da7396c84311e1024..8cd8a40792ef7400e3a671907c2b90954eb35658 100644 (file)
@@ -244,7 +244,7 @@ static const char * const access_mode[2] = {
     [1] = "align16",
 };
 
-const char * const reg_encoding[8] = {
+static const char * const reg_encoding[8] = {
     [0] = "UD",
     [1] = "D",
     [2] = "UW",
index 27cf0f6f2f18c72100b680affc49e280cbf5b338..9081aafb30fb5f77c11eb21c7310241e3a1f556d 100644 (file)
@@ -3068,7 +3068,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
       fprintf(stderr, "???");
       break;
    }
-   fprintf(stderr, ":%s, ", reg_encoding[inst->dst.type]);
+   fprintf(stderr, ":%s, ", brw_reg_type_letters(inst->dst.type));
 
    for (int i = 0; i < 3 && inst->src[i].file != BAD_FILE; i++) {
       if (inst->src[i].negate)
index 87825f1349708da7665858d8fa565e7f7606ae01..0245f40330cedfa45b9db1c80daa777fae742a0d 100644 (file)
@@ -1269,7 +1269,7 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst)
          fprintf(stderr, "|");
 
       if (inst->src[i].file != IMM) {
-         fprintf(stderr, ":%s", reg_encoding[inst->src[i].type]);
+         fprintf(stderr, ":%s", brw_reg_type_letters(inst->src[i].type));
       }
 
       if (i < 2 && inst->src[i + 1].file != BAD_FILE)