mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 23:09:05 +02:00
tgsi-dump: dump label if instruction has one
The instruction has an associated label when Instruction.Label == 1,
as can be seen in ureg_emit_label() or tgsi_build_full_instruction().
This fixes dump generating extra :0 labels on conditionals, and virgl
parsing more than the expected tokens and eventually reaching "Illegal
command buffer" (when parsing more than a safety margin of 10 we
currently have).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit dc2d9b8da1)
This commit is contained in:
parent
8ca2e38abb
commit
32d0dc50a0
1 changed files with 13 additions and 11 deletions
|
|
@ -685,17 +685,19 @@ iter_instruction(
|
|||
}
|
||||
}
|
||||
|
||||
switch (inst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_IF:
|
||||
case TGSI_OPCODE_UIF:
|
||||
case TGSI_OPCODE_ELSE:
|
||||
case TGSI_OPCODE_BGNLOOP:
|
||||
case TGSI_OPCODE_ENDLOOP:
|
||||
case TGSI_OPCODE_CAL:
|
||||
case TGSI_OPCODE_BGNSUB:
|
||||
TXT( " :" );
|
||||
UID( inst->Label.Label );
|
||||
break;
|
||||
if (inst->Instruction.Label) {
|
||||
switch (inst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_IF:
|
||||
case TGSI_OPCODE_UIF:
|
||||
case TGSI_OPCODE_ELSE:
|
||||
case TGSI_OPCODE_BGNLOOP:
|
||||
case TGSI_OPCODE_ENDLOOP:
|
||||
case TGSI_OPCODE_CAL:
|
||||
case TGSI_OPCODE_BGNSUB:
|
||||
TXT( " :" );
|
||||
UID( inst->Label.Label );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* update indentation */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue