From: Gert Wollny Date: Wed, 6 May 2020 21:38:01 +0000 (+0200) Subject: r600/sfn: re-use an allocated register in lookup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19673ce47dfdacce81ad0095efc7eb6960aed531;p=mesa.git r600/sfn: re-use an allocated register in lookup For texture coordinates we always allocate all four components so that we can use these for LOD and, compare etc. Signed-off-by: Gert Wollny Reviewed-by: Reviewed-by: Dave Airlie Part-of: --- 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; }