diff --git a/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp b/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp index 8ce378b43b3..579e39f0acd 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp @@ -172,7 +172,7 @@ PValue ValuePool::create_register_from_nir_src(const nir_src& src, int comp) get_local_register_index(*src.reg.reg); auto retval = lookup_register(idx, comp, false); - if (!retval) + if (!retval || retval->type() != Value::gpr || retval->type() != Value::gpr_array_value) retval = create_register(idx, comp); return retval; }