gallium/tgsi: Introduce the compute processor.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 18 Mar 2012 18:09:18 +0000 (19:09 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 May 2012 10:39:40 +0000 (12:39 +0200)
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_strings.c
src/gallium/auxiliary/tgsi/tgsi_strings.h
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/include/pipe/p_shader_tokens.h

index 036ff314389c10bbc52a09758148a6ff981f9eae..df299baa9c13581464ad7346b2244e48af7c97be 100644 (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);
 
 
    /**
index 626ff6ffde564f3d5973e1069e700f040d6e6c3e..3c7ab3b1657c7229f81a719e29c07f690449bb4c 100644 (file)
 #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] =
index 0946a58f135e400ca84972ee000a118c8fd988d3..5c57e229c28e4b8a9583f8b7fc4c910228fde1da 100644 (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];
 
index 7269f5343ec077193b1882fda4fa2faf1d0a24ab..04862759b7f43f8e1644ce030933d6985b274df8 100644 (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;
index 3542e54f2c6ae173d3b6130c3ba0b9d616756abe..3c970723d35af44e8cd449565ce0b4d2bf133583 100644 (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
 {