lima/ppir: Fix branch codegen
authorVasily Khoruzhick <anarsoul@gmail.com>
Mon, 15 Jul 2019 01:22:36 +0000 (18:22 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Mon, 15 Jul 2019 02:49:14 +0000 (19:49 -0700)
commiteb862c2365cbc68d07360628f72af0db426f6b6f
treec07c83a1147d6328d87bd3919bfec0d70ca33847
parent8f0160ca249fcfda676b2bb42dc2726edba50f9a
lima/ppir: Fix branch codegen

"unknown_2" field is actually a size of instruction that branch
points to. If it's set to a smaller size than actual instruction
branch behavior is not defined (and it usually wedges the GPU).

Fix it by setting this field correctly.

Fixes: af0de6b91c0b ("lima/ppir: implement discard and discard_if")
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/ir/pp/codegen.c
src/gallium/drivers/lima/ir/pp/codegen.h
src/gallium/drivers/lima/ir/pp/ppir.h