summaryrefslogtreecommitdiff
path: root/src/mesa/shader/prog_instruction.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-05-11 09:38:32 -0600
committerBrian Paul <brianp@vmware.com>2009-05-11 09:47:32 -0600
commit7c2fe42dedcd9f437f2b3fae92963d4c4c56fe03 (patch)
treedd981f73fc68355928b25633aba665ba83aa0a39 /src/mesa/shader/prog_instruction.c
parent53c2cc8fefa07723fc456d94eda292e201c41dae (diff)
mesa: better handling/printing of driver-specific opcodes, register files
Drivers such as i965 define extra instruction opcodes and register files. Improve the program printing code to handle those opcodes/files better.
Diffstat (limited to 'src/mesa/shader/prog_instruction.c')
-rw-r--r--src/mesa/shader/prog_instruction.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index ae3a003fee..44c961927a 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -343,7 +343,10 @@ _mesa_opcode_string(gl_inst_opcode opcode)
{
if (opcode < MAX_OPCODE)
return InstInfo[opcode].Name;
- else
- return "OP?";
+ else {
+ static char s[20];
+ _mesa_snprintf(s, sizeof(s), "OP%u", opcode);
+ return s;
+ }
}