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 <gert.wollny@collabora.com> Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user