diff options
author | Roland Scheidegger <sroland@vmware.com> | 2014-09-15 18:44:57 +0200 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2014-09-16 03:50:31 +0200 |
commit | 02595c55b077e5422a2f2cafc7b53df2ddaf6ce3 (patch) | |
tree | a74aa01c77fcf7e64f1d3667e932e1e96a97d9c1 /src/gallium/auxiliary/tgsi/tgsi_text.c | |
parent | 3a9eb40ee16eedb6caff90a8c0c24b7d801063f3 (diff) | |
download | external_mesa3d-02595c55b077e5422a2f2cafc7b53df2ddaf6ce3.zip external_mesa3d-02595c55b077e5422a2f2cafc7b53df2ddaf6ce3.tar.gz external_mesa3d-02595c55b077e5422a2f2cafc7b53df2ddaf6ce3.tar.bz2 |
tgsi: accept offsets for sample opcodes too in the text parser
sample opcodes are a little oddly represented in the opcode_info, since
they don't count as texture instructions - they don't have valid target
information, but they may have offsets (unlike "ordinary" texture
instructions, the texture token may be optional for them).
So just make sure with these opcodes the optional offsets are accepted.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_text.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 6403344..7291145 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -993,8 +993,7 @@ parse_instruction( /* * These are not considered tex opcodes here (no additional * target argument) however we're required to set the Texture - * bit so we can set the number of tex offsets (offsets aren't - * actually handled here yet in any case). + * bit so we can set the number of tex offsets. */ inst.Instruction.Texture = 1; inst.Texture.Texture = TGSI_TEXTURE_UNKNOWN; @@ -1040,7 +1039,7 @@ parse_instruction( cur = ctx->cur; eat_opt_white( &cur ); - for (i = 0; info->is_tex && *cur == ','; i++) { + for (i = 0; inst.Instruction.Texture && *cur == ','; i++) { cur++; eat_opt_white( &cur ); ctx->cur = cur; |