Mesa (10.5): r600g/sb: treat undefined values like constants
Emil Velikov
evelikov at kemper.freedesktop.org
Sat Feb 28 00:18:09 UTC 2015
Module: Mesa
Branch: 10.5
Commit: c0f425bb813729ac9b4589c8a717ed27ba5998b9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0f425bb813729ac9b4589c8a717ed27ba5998b9
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Feb 18 10:13:20 2015 +1000
r600g/sb: treat undefined values like constants
When we schedule an instructions with undefined value, we
eventually will use 0, which is a constant, however sb wasn't
taking this into account and creating ops with illegal scalar
swizzles.
this replaces my fix for op3 in t slots.
Reviewed-by: Glenn Kennard <glenn.kennard at gmail.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit e8e4437ed0660b3f1d1912f53d997cf5e25f486d)
---
src/gallium/drivers/r600/sb/sb_sched.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/sb/sb_sched.cpp b/src/gallium/drivers/r600/sb/sb_sched.cpp
index 4fbdc4f..63e7464 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.cpp
+++ b/src/gallium/drivers/r600/sb/sb_sched.cpp
@@ -266,7 +266,7 @@ bool rp_gpr_tracker::try_reserve(alu_node* n) {
for (i = 0; i < nsrc; ++i) {
value *v = n->src[i];
- if (v->is_readonly()) {
+ if (v->is_readonly() || v->is_undef()) {
const_count++;
if (trans && const_count == 3)
break;
@@ -295,7 +295,7 @@ bool rp_gpr_tracker::try_reserve(alu_node* n) {
if (need_unreserve && i--) {
do {
value *v = n->src[i];
- if (!v->is_readonly()) {
+ if (!v->is_readonly() && !v->is_undef()) {
if (i == 1 && opt)
continue;
unreserve(bs_cycle(trans, bs, i), n->bc.src[i].sel,
More information about the mesa-commit
mailing list