diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.c b/src/gallium/auxiliary/tgsi/tgsi_transform.c index 4b2b10f50ad..a1b66ea2faf 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.c +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.c @@ -108,7 +108,6 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, uint max_tokens_out, struct tgsi_transform_context *ctx) { - uint procType; boolean first_instruction = TRUE; boolean epilog_emitted = FALSE; int cond_stack = 0; @@ -139,7 +138,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, debug_printf("tgsi_parse_init() failed in tgsi_transform_shader()!\n"); return -1; } - procType = parse.FullHeader.Processor.Processor; + ctx->processor = parse.FullHeader.Processor.Processor; /** ** Setup output shader @@ -148,7 +147,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, *ctx->header = tgsi_build_header(); processor = (struct tgsi_processor *) (tokens_out + 1); - *processor = tgsi_build_processor( procType, ctx->header ); + *processor = tgsi_build_processor( ctx->processor, ctx->header ); ctx->ti = 2; diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 727edeb05ac..176bc9f1bb9 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h @@ -29,6 +29,7 @@ #define TGSI_TRANSFORM_H +#include "pipe/p_defines.h" #include "pipe/p_shader_tokens.h" #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_build.h" @@ -68,6 +69,7 @@ struct tgsi_transform_context */ void (*epilog)(struct tgsi_transform_context *ctx); + enum pipe_shader_type processor; /*** PRIVATE ***/