From 92d88ccd9a3f68584453ba548df4fb5496a7dbf9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 6 May 2010 14:55:40 -0600 Subject: [PATCH] tgsi: added tgsi_get_processor_name() --- src/gallium/auxiliary/tgsi/tgsi_info.c | 15 +++++++++++++++ src/gallium/auxiliary/tgsi/tgsi_info.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index cfa2f631bd8..e59e964ffa7 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 74713c3b98a..50248884fd0 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 } -- 2.30.2