summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-05-06 14:55:40 -0600
committerBrian Paul <brianp@vmware.com>2010-05-06 15:19:02 -0600
commit92d88ccd9a3f68584453ba548df4fb5496a7dbf9 (patch)
treedbb54fc5c2a348d5bab66f81548aa1270bc470b4 /src
parentc8f0e805a9e4c26eadc45bb1fd172b6702f581ab (diff)
tgsi: added tgsi_get_processor_name()
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c15
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index cfa2f631bd..e59e964ffa 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -205,3 +205,18 @@ tgsi_get_opcode_name( uint opcode )
return info->mnemonic;
}
+
+const char *
+tgsi_get_processor_name( uint processor )
+{
+ switch (processor) {
+ case TGSI_PROCESSOR_VERTEX:
+ return "vertex shader";
+ case TGSI_PROCESSOR_FRAGMENT:
+ return "fragment shader";
+ case TGSI_PROCESSOR_GEOMETRY:
+ return "geometry shader";
+ default:
+ return "unknown shader type!";
+ }
+}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h
index 74713c3b98..50248884fd 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.h
@@ -52,6 +52,9 @@ tgsi_get_opcode_info( uint opcode );
const char *
tgsi_get_opcode_name( uint opcode );
+const char *
+tgsi_get_processor_name( uint processor );
+
#if defined __cplusplus
}