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>
macos/master
Emma Anholt 3 years ago committed by Gert Wollny
parent a30704147c
commit addbd9c505
  1. 2
      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;

Loading…
Cancel
Save