diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-29 10:18:05 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-29 10:18:05 +0000 |
commit | aa5ee280c290e0b5f1973cc378292989336aea67 (patch) | |
tree | 5b5bd787b5a120575011cb1774bac5b72e747f32 /lib/mesa/src/gallium/auxiliary | |
parent | 0b419bcbdb9b686807916d9f2ccb3e578f22496a (diff) |
Import Mesa 11.2.2
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/tgsi/tgsi_emulate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_emulate.c b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_emulate.c index 806e90c2d..59d2e4c95 100644 --- a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_emulate.c +++ b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_emulate.c @@ -140,6 +140,7 @@ const struct tgsi_token * tgsi_emulate(const struct tgsi_token *tokens, unsigned flags) { struct tgsi_emulation_context ctx; + struct tgsi_token *newtoks; int newlen; if (!(flags & (TGSI_EMU_CLAMP_COLOR_OUTPUTS | @@ -159,6 +160,10 @@ tgsi_emulate(const struct tgsi_token *tokens, unsigned flags) ctx.base.transform_instruction = transform_instr; newlen = tgsi_num_tokens(tokens) + 20; + newtoks = tgsi_alloc_tokens(newlen); + if (!newtoks) + return NULL; - return tgsi_transform_shader(tokens, newlen, &ctx.base); + tgsi_transform_shader(tokens, newtoks, newlen, &ctx.base); + return newtoks; } |