summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_two_side.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_two_side.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_two_side.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_two_side.c b/src/gallium/auxiliary/tgsi/tgsi_two_side.c
index 53ac2a37003..1077c785200 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_two_side.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_two_side.c
@@ -202,7 +202,6 @@ tgsi_add_two_side(const struct tgsi_token *tokens_in)
struct two_side_transform_context transform;
const uint num_new_tokens = 100; /* should be enough */
const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
- struct tgsi_token *new_tokens;
/* setup transformation context */
memset(&transform, 0, sizeof(transform));
@@ -217,13 +216,5 @@ tgsi_add_two_side(const struct tgsi_token *tokens_in)
transform.back_color_input[0] = INVALID_INDEX;
transform.back_color_input[1] = INVALID_INDEX;
- /* allocate new tokens buffer */
- new_tokens = tgsi_alloc_tokens(new_len);
- if (!new_tokens)
- return NULL;
-
- /* transform the shader */
- tgsi_transform_shader(tokens_in, new_tokens, new_len, &transform.base);
-
- return new_tokens;
+ return tgsi_transform_shader(tokens_in, new_len, &transform.base);
}