[Mesa-dev] [PATCH 09/10] tgsi: add tgsi_full_src_register_from_dst helper function
Nicolai Hähnle
nhaehnle at gmail.com
Sun Mar 13 14:29:51 UTC 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 15 +++++++++++++++
src/gallium/auxiliary/tgsi/tgsi_build.h | 5 +++++
2 files changed, 20 insertions(+)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index cfe9b92..e5355f5 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -1425,3 +1425,18 @@ tgsi_build_full_property(
return size;
}
+
+struct tgsi_full_src_register
+tgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst)
+{
+ struct tgsi_full_src_register src;
+ src.Register = tgsi_default_src_register();
+ src.Register.File = dst->Register.File;
+ src.Register.Indirect = dst->Register.Indirect;
+ src.Register.Dimension = dst->Register.Dimension;
+ src.Register.Index = dst->Register.Index;
+ src.Indirect = dst->Indirect;
+ src.Dimension = dst->Dimension;
+ src.DimIndirect = dst->DimIndirect;
+ return src;
+}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.h b/src/gallium/auxiliary/tgsi/tgsi_build.h
index c5127e1..34d181a 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.h
@@ -30,6 +30,8 @@
struct tgsi_token;
+struct tgsi_full_dst_register;
+struct tgsi_full_src_register;
#if defined __cplusplus
@@ -111,6 +113,9 @@ tgsi_build_full_instruction(
struct tgsi_instruction_predicate
tgsi_default_instruction_predicate(void);
+struct tgsi_full_src_register
+tgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst);
+
#if defined __cplusplus
}
#endif
--
2.5.0
More information about the mesa-dev
mailing list