Commit 93f5f9e5 authored by Gert Wollny's avatar Gert Wollny Committed by Marge Bot

r600/sfn: Add methods to valuepool to get a vector of values

Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
Part-of: <mesa/mesa!4714>
parent 7cbca9cf
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment