diff --git a/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp b/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp index 79c83d82859..8ce378b43b3 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_valuepool.cpp @@ -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 ValuePool::varvec_from_nir(const nir_dest& dst, int num_components) +{ + std::vector result(num_components); + for (int i = 0; i < num_components; ++i) + result[i] = from_nir(dst, i); + return result; +} + + +std::vector ValuePool::varvec_from_nir(const nir_src& src, int num_components) +{ + std::vector 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 ") diff --git a/src/gallium/drivers/r600/sfn/sfn_valuepool.h b/src/gallium/drivers/r600/sfn/sfn_valuepool.h index 4dcdc2c78d4..acb04545974 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuepool.h +++ b/src/gallium/drivers/r600/sfn/sfn_valuepool.h @@ -89,6 +89,9 @@ public: GPRVector vec_from_nir(const nir_dest& dst, int num_components); + std::vector varvec_from_nir(const nir_dest& src, int num_components); + std::vector 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);