OSDN Git Service

freedreno/a3xx/compiler: handle kill properly (new compiler)
authorRob Clark <robclark@freedesktop.org>
Sun, 16 Feb 2014 12:35:20 +0000 (07:35 -0500)
committerRob Clark <robclark@freedesktop.org>
Sun, 16 Feb 2014 13:17:23 +0000 (08:17 -0500)
commit579473f8f838aade82ad58949902910fa5fe15e3
tree083ed5f9fe3eeaf2fe02699b1b489ea8020a421e
parente35747b8824b0f996c5ef5c7b58fcaa200cc231e
freedreno/a3xx/compiler: handle kill properly (new compiler)

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.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_compiler.c
src/gallium/drivers/freedreno/a3xx/ir3.h
src/gallium/drivers/freedreno/a3xx/ir3_depth.c
src/gallium/drivers/freedreno/a3xx/ir3_ra.c