i965: Avoid branch instructions while in single program flow mode.
authorEric Anholt <eric@anholt.net>
Wed, 18 Oct 2006 07:24:01 +0000 (00:24 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Sat, 6 Jan 2007 23:18:23 +0000 (15:18 -0800)
commit1b9f78195f62959601d440475a6cbba5e8046813
treebf86214e2af04a045369df53e8c025366f533cf7
parente54ec49155052ab663d8671e7036d985992464a3
i965: Avoid branch instructions while in single program flow mode.

There is an errata for Broadwater that threads don't have the instruction/loop
mask stacks initialized on thread spawn.  In single program flow mode, those
stacks are not writable, so we can't initialize them.  However, they do get
read during ELSE and ENDIF instructions.  So, instead, replace branch
instructions in single program flow mode with predicated jumps (ADD to the ip
register), avoiding use of the more complicated branch instructions that may
fail.  This is also a minor optimization as no ENDIF equivalent is necessary.

Signed-off-by: Keith Packard <keithp@neko.keithp.com>
src/mesa/drivers/dri/i965/brw_clip.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_structs.h