gallium/tgsi: Introduce the compute processor.

This commit is contained in:
Francisco Jerez
2012-03-18 19:09:18 +01:00
parent 1279923d72
commit 63428372ca
5 changed files with 9 additions and 4 deletions

View File

@@ -68,7 +68,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
procType = parse.FullHeader.Processor.Processor;
assert(procType == TGSI_PROCESSOR_FRAGMENT ||
procType == TGSI_PROCESSOR_VERTEX ||
procType == TGSI_PROCESSOR_GEOMETRY);
procType == TGSI_PROCESSOR_GEOMETRY ||
procType == TGSI_PROCESSOR_COMPUTE);
/**

View File

@@ -32,11 +32,12 @@
#include "tgsi_strings.h"
const char *tgsi_processor_type_names[3] =
const char *tgsi_processor_type_names[4] =
{
"FRAG",
"VERT",
"GEOM"
"GEOM",
"COMP"
};
const char *tgsi_file_names[TGSI_FILE_COUNT] =

View File

@@ -38,7 +38,7 @@ extern "C" {
#endif
extern const char *tgsi_processor_type_names[3];
extern const char *tgsi_processor_type_names[4];
extern const char *tgsi_file_names[TGSI_FILE_COUNT];

View File

@@ -238,6 +238,8 @@ static boolean parse_header( struct translate_ctx *ctx )
processor = TGSI_PROCESSOR_VERTEX;
else if (str_match_no_case( &ctx->cur, "GEOM" ))
processor = TGSI_PROCESSOR_GEOMETRY;
else if (str_match_no_case( &ctx->cur, "COMP" ))
processor = TGSI_PROCESSOR_COMPUTE;
else {
report_error( ctx, "Unknown header" );
return FALSE;

View File

@@ -43,6 +43,7 @@ struct tgsi_header
#define TGSI_PROCESSOR_FRAGMENT 0
#define TGSI_PROCESSOR_VERTEX 1
#define TGSI_PROCESSOR_GEOMETRY 2
#define TGSI_PROCESSOR_COMPUTE 3
struct tgsi_processor
{