Mesa (main): aco: New writeout overloads for the test framework.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 28 12:38:33 UTC 2021


Module: Mesa
Branch: main
Commit: 6f3c472f2e8309b4da1eb5167033a4ddd4294687
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f3c472f2e8309b4da1eb5167033a4ddd4294687

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Fri Dec  4 16:18:44 2020 +0100

aco: New writeout overloads for the test framework.

These will be used by future tests.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>

---

 src/amd/compiler/tests/helpers.cpp | 15 +++++++++++++++
 src/amd/compiler/tests/helpers.h   |  3 +++
 2 files changed, 18 insertions(+)

diff --git a/src/amd/compiler/tests/helpers.cpp b/src/amd/compiler/tests/helpers.cpp
index 87f085fbd6d..1a579ad6521 100644
--- a/src/amd/compiler/tests/helpers.cpp
+++ b/src/amd/compiler/tests/helpers.cpp
@@ -222,6 +222,21 @@ void writeout(unsigned i, Temp tmp)
       bld.pseudo(aco_opcode::p_unit_test, Operand(i));
 }
 
+void writeout(unsigned i, aco::Builder::Result res)
+{
+   bld.pseudo(aco_opcode::p_unit_test, Operand(i), res);
+}
+
+void writeout(unsigned i, Operand op)
+{
+   bld.pseudo(aco_opcode::p_unit_test, Operand(i), op);
+}
+
+void writeout(unsigned i, Operand op0, Operand op1)
+{
+   bld.pseudo(aco_opcode::p_unit_test, Operand(i), op0, op1);
+}
+
 VkDevice get_vk_device(enum chip_class chip_class)
 {
    enum radeon_family family;
diff --git a/src/amd/compiler/tests/helpers.h b/src/amd/compiler/tests/helpers.h
index bd87f841ae4..90964c8bf56 100644
--- a/src/amd/compiler/tests/helpers.h
+++ b/src/amd/compiler/tests/helpers.h
@@ -85,6 +85,9 @@ void finish_insert_nops_test();
 void finish_assembler_test();
 
 void writeout(unsigned i, aco::Temp tmp=aco::Temp(0, aco::s1));
+void writeout(unsigned i, aco::Builder::Result res);
+void writeout(unsigned i, aco::Operand op);
+void writeout(unsigned i, aco::Operand op0, aco::Operand op1);
 
 /* vulkan helpers */
 VkDevice get_vk_device(enum chip_class chip_class);



More information about the mesa-commit mailing list