agx: Always use hash table for extracts
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16268>
This commit is contained in:

committed by
Alyssa Rosenzweig

parent
860832e41b
commit
6a4d742369
@@ -62,13 +62,10 @@ agx_index_to_key(agx_index idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extract a single channel out of a vector source. This corresponds to the
|
* Extract a single channel out of a vector source. We split vectors with
|
||||||
* pseduo-instruction p_extract, which gets lowered to a move after
|
* p_split so we can use the split components directly, without emitting a
|
||||||
* register-allocation.
|
* machine instruction. This has advantages of RA, as the split can usually be
|
||||||
*
|
* optimized away.
|
||||||
* However, if the vector was split (with p_split), we can use the split
|
|
||||||
* components directly, without emitting a machine instruction. This has
|
|
||||||
* advantages of RA, as the split can be optimized away.
|
|
||||||
*/
|
*/
|
||||||
static agx_index
|
static agx_index
|
||||||
agx_emit_extract(agx_builder *b, agx_index vec, unsigned channel)
|
agx_emit_extract(agx_builder *b, agx_index vec, unsigned channel)
|
||||||
@@ -76,10 +73,9 @@ agx_emit_extract(agx_builder *b, agx_index vec, unsigned channel)
|
|||||||
agx_index *components = _mesa_hash_table_u64_search(b->shader->allocated_vec,
|
agx_index *components = _mesa_hash_table_u64_search(b->shader->allocated_vec,
|
||||||
agx_index_to_key(vec));
|
agx_index_to_key(vec));
|
||||||
|
|
||||||
if (components)
|
assert(components != NULL && "missing agx_emit_combine_to");
|
||||||
return components[channel];
|
|
||||||
else
|
return components[channel];
|
||||||
return agx_p_extract(b, vec, channel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user