Mesa (7.10): r300/compiler: Fix dataflow analysis bug with ELSE blocks
Tom Stellard
tstellar at kemper.freedesktop.org
Tue Apr 19 05:06:59 UTC 2011
Module: Mesa
Branch: 7.10
Commit: 1f8c5611a2575e7c660fd10d322cebdafa41e29f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f8c5611a2575e7c660fd10d322cebdafa41e29f
Author: Tom Stellard <tstellar at gmail.com>
Date: Mon Apr 18 21:16:14 2011 -0700
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
(cherry picked from commit ffc1d166d24532aeaa4dcf06a431e43ab7e7e315)
---
.../drivers/dri/r300/compiler/radeon_dataflow.c | 7 +++++++
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 d0a64d9..459ac21 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
@@ -710,9 +710,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)
More information about the mesa-commit
mailing list