summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_gs.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2006-10-18 00:24:01 -0700
committerEric Anholt <eric@anholt.net>2006-12-10 12:24:51 -0800
commit9a94dae4c292bfc2aa94a3f86865550e2217b870 (patch)
treeb10040a5802727ceb94923b7d3544e6397cc23d9 /src/mesa/drivers/dri/i965/brw_gs.c
parent183abbcd6b48178a3412ee8992131ce8c7e7b69d (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 7d3f9dd5e3..9066e42252 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -66,7 +66,9 @@ static void compile_gs_prog( struct brw_context *brw,
/* Begin the compilation:
*/
brw_init_compile(&c.func);
-
+
+ c.func.single_program_flow = 1;
+
/* For some reason the thread is spawned with only 4 channels
* unmasked.
*/