diff options
author | Emma Anholt <emma@anholt.net> | 2021-09-10 14:40:45 -0700 |
---|---|---|
committer | Gert Wollny <gw.fossdev@gmail.com> | 2021-09-16 16:25:14 +0000 |
commit | addbd9c5058dcc9d561b20ab747aed58c53499da (patch) | |
tree | 1f808352f242a67760a11c63143324cacb4bfee1 | |
parent | a30704147c5725811e743b195d234c75da7ebde0 (diff) | |
download | virglrenderer-addbd9c5058dcc9d561b20ab747aed58c53499da.tar.gz |
Don't expect Memory tokens with TGSI_OPCODE_BARRIER
If the shader had too many BARRIERs, we'd overflow our preallocated
token buffer and fail to parse the command stream.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 080dbfab..0d0a9a37 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -1075,7 +1075,7 @@ parse_instruction( inst.Texture.Texture = TGSI_TEXTURE_UNKNOWN; } - if ((i >= TGSI_OPCODE_LOAD && i <= TGSI_OPCODE_ATOMIMAX) || + if ((i >= TGSI_OPCODE_LOAD && i <= TGSI_OPCODE_ATOMIMAX && i != TGSI_OPCODE_BARRIER) || i == TGSI_OPCODE_RESQ) { inst.Instruction.Memory = 1; inst.Memory.Qualifier = 0; |