diff options
author | Nicolai Hähnle <[email protected]> | 2016-02-09 12:54:10 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-03-14 17:24:49 -0500 |
commit | 0ffcc318e691c46648a94e5237b7da065cfe2bf9 (patch) | |
tree | 8f0b8402543fdb6f422a23294fb18ed09e9b0aae /src/gallium | |
parent | c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5 (diff) |
tgsi: add tgsi_full_src_register_from_dst helper function
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.c | 15 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.h | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index cfe9b92ee1b..e5355f573bb 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 c5127e1855c..34d181ab247 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 |