panfrost/midgard: Emit extended branches
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 17 Feb 2019 22:09:09 +0000 (22:09 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 21 Feb 2019 07:08:47 +0000 (07:08 +0000)
commit5abb7b559e9c81b354a4417b910032e70d075f7b
tree30954a9e5ebe98b8f3f7858985c3e795e9e78bfa
parent813bb34fd8986408c479417372f078836e43990e
panfrost/midgard: Emit extended branches

Previously, we only emitted compact branches; however, the offset range
of these branches is too small for many real world shaders. This patch
implements support for emitting extended branches and switches to always
using them for control flow. This incurs a code size and possibly
performance penalty, but expands the range of working shaders and
provides opportunity for further optimization.

Support for emitting compact branches is retained but this code path is
presently unused. In the future, we'll want to heuristically determine
which type of branch should be emitted for optimal codegen.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/helpers.h
src/gallium/drivers/panfrost/midgard/midgard_compile.c