freedreno/a3xx/compiler: handle kill properly (new compiler)

Graphics / Mesa 3D Graphics Library / Mesa - Rob Clark [freedesktop.org] - 16 February 2014 07:17 UTC

Since 'kill' does not produce a result, the new compiler was happily optimizing them out. We need to instead track 'kill's similar to outputs. But since there is no non-predicated kill instruction, (and for flattend if/else we do want them to be predicated), we need to track the topmost branch condition on the stack and use that as src arg to the kill. For a kill at the topmost level, we have to generate an immediate 1.0 to feed into the cmps.f for setting the predicate register.

579473f freedreno/a3xx/compiler: handle kill properly (new compiler)
src/gallium/drivers/freedreno/a3xx/fd3_compiler.c | 113 +++++++++++++++++----
src/gallium/drivers/freedreno/a3xx/ir3.h | 10 +-
src/gallium/drivers/freedreno/a3xx/ir3_depth.c | 2 +-
src/gallium/drivers/freedreno/a3xx/ir3_ra.c | 6 +-
4 files changed, 105 insertions(+), 26 deletions(-)

Upstream: cgit.freedesktop.org


  • Share