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@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
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;
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,