From: Brian Paul Date: Fri, 31 Jul 2009 16:23:09 +0000 (-0600) Subject: tgsi: added tgsi_get_opcode_name() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3c90c2dd95ba4f714c6d5fdf5793e1db1a191ca;p=mesa.git tgsi: added tgsi_get_opcode_name() --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index cd8871e32dd..ccf4b205ffb 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -170,3 +170,12 @@ tgsi_get_opcode_info( uint opcode ) assert( 0 ); return NULL; } + + +const char * +tgsi_get_opcode_name( uint opcode ) +{ + const struct tgsi_opcode_info *info = tgsi_get_opcode_info(opcode); + return info->mnemonic; +} + diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h index 16577598bb0..b2375c69710 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.h +++ b/src/gallium/auxiliary/tgsi/tgsi_info.h @@ -47,6 +47,10 @@ struct tgsi_opcode_info const struct tgsi_opcode_info * tgsi_get_opcode_info( uint opcode ); +const char * +tgsi_get_opcode_name( uint opcode ); + + #if defined __cplusplus } #endif