r600/sfn: Add methods to valuepool to get a vector of values
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
This commit is contained in:
parent
7cbca9cf64
commit
93f5f9e584
|
@ -53,9 +53,28 @@ GPRVector ValuePool::vec_from_nir(const nir_dest& dst, int num_components)
|
|||
for (int i = 0; i < 4; ++i)
|
||||
result[i] = from_nir(dst, i < num_components ? i : 7);
|
||||
return GPRVector(result);
|
||||
|
||||
}
|
||||
|
||||
std::vector<PValue> ValuePool::varvec_from_nir(const nir_dest& dst, int num_components)
|
||||
{
|
||||
std::vector<PValue> result(num_components);
|
||||
for (int i = 0; i < num_components; ++i)
|
||||
result[i] = from_nir(dst, i);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
std::vector<PValue> ValuePool::varvec_from_nir(const nir_src& src, int num_components)
|
||||
{
|
||||
std::vector<PValue> result(num_components);
|
||||
int i;
|
||||
for (i = 0; i < num_components; ++i)
|
||||
result[i] = from_nir(src, i);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
PValue ValuePool::from_nir(const nir_src& v, unsigned component, unsigned swizzled)
|
||||
{
|
||||
sfn_log << SfnLog::reg << "Search " << (v.is_ssa ? "ssa_reg " : "reg ")
|
||||
|
|
|
@ -89,6 +89,9 @@ public:
|
|||
|
||||
GPRVector vec_from_nir(const nir_dest& dst, int num_components);
|
||||
|
||||
std::vector<PValue> varvec_from_nir(const nir_dest& src, int num_components);
|
||||
std::vector<PValue> varvec_from_nir(const nir_src& src, int num_components);
|
||||
|
||||
PValue from_nir(const nir_src& v, unsigned component, unsigned swizzled);
|
||||
|
||||
PValue from_nir(const nir_src& v, unsigned component);
|
||||
|
|
Loading…
Reference in New Issue