summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2011-04-18 21:16:14 -0700
committerTom Stellard <[email protected]>2011-04-18 21:27:03 -0700
commitffc1d166d24532aeaa4dcf06a431e43ab7e7e315 (patch)
tree4a31df83b57af499ddb7c7b05612499f63a1f07a /src/mesa/drivers/dri/r300
parentf41e1db3273a31285360241c4342f0a403ee0b03 (diff)
r300/compiler: Fix dataflow analysis bug with ELSE blocks
Writes within ELSE blocks were being ignored which prevented us from discovering all possible writers for some register values. Fixes piglit glsl-fs-raytrace-bug27060
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
index c080d5aecc6..d1a7eab50f7 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
@@ -704,9 +704,16 @@ static void get_readers_for_single_write(
&d->BranchMasks[branch_depth];
if (masks->HasElse) {
+ /* Abort on read for components that
+ * were written in the IF block. */
d->ReaderData->AbortOnRead |=
masks->IfWriteMask
& ~masks->ElseWriteMask;
+ /* Abort on read for components that
+ * were written in the ELSE block. */
+ d->ReaderData->AbortOnRead |=
+ masks->ElseWriteMask
+ & ~d->AliveWriteMask;
d->AliveWriteMask = masks->IfWriteMask
^ ((masks->IfWriteMask ^
masks->ElseWriteMask)