mesa/st/tests: Use tgsi opcode enum also in the test classes
authorGert Wollny <gw.fossdev@gmail.com>
Mon, 26 Mar 2018 08:17:00 +0000 (02:17 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 26 Mar 2018 15:04:53 +0000 (09:04 -0600)
Fixes: ec478cf9c31K ("st/mesa,tgsi: use enum tgsi_opcode")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105737
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/tests/st_tests_common.cpp
src/mesa/state_tracker/tests/st_tests_common.h

index ea01ca5555fdc05686280832d232191eed6fa771..63e3d6b2c41a09a76b0ada9b6b1961ba7eab3a4d 100644 (file)
@@ -43,7 +43,7 @@ using std::tuple;
 /* Implementation of helper and test classes */
 void *FakeCodeline::mem_ctx = nullptr;
 
-FakeCodeline::FakeCodeline(unsigned _op, const vector<int>& _dst,
+FakeCodeline::FakeCodeline(tgsi_opcode _op, const vector<int>& _dst,
                            const vector<int>& _src, const vector<int>&_to):
    op(_op),
    max_temp_id(0)
@@ -59,7 +59,7 @@ FakeCodeline::FakeCodeline(unsigned _op, const vector<int>& _dst,
 
 }
 
-FakeCodeline::FakeCodeline(unsigned _op, const vector<pair<int,int>>& _dst,
+FakeCodeline::FakeCodeline(tgsi_opcode _op, const vector<pair<int,int>>& _dst,
                            const vector<pair<int, const char *>>& _src,
                            const vector<pair<int, const char *>>&_to,
                            SWZ with_swizzle):
@@ -84,7 +84,7 @@ FakeCodeline::FakeCodeline(unsigned _op, const vector<pair<int,int>>& _dst,
    });
 }
 
-FakeCodeline::FakeCodeline(unsigned _op, const vector<tuple<int,int,int>>& _dst,
+FakeCodeline::FakeCodeline(tgsi_opcode _op, const vector<tuple<int,int,int>>& _dst,
                            const vector<tuple<int,int,int>>& _src,
                            const vector<tuple<int,int,int>>&_to, RA with_reladdr):
    op(_op),
index 2e188329231af379b5cc4aa6f188d473dc5b4907..6d855fe581161b5106e672816da93183e4466fcb 100644 (file)
@@ -40,15 +40,15 @@ struct RA {};
 
 /* A line to describe a TGSI instruction for building mock shaders. */
 struct FakeCodeline {
-   FakeCodeline(unsigned _op): op(_op), max_temp_id(0) {}
-   FakeCodeline(unsigned _op, const std::vector<int>& _dst, const std::vector<int>& _src,
+   FakeCodeline(tgsi_opcode _op): op(_op), max_temp_id(0) {}
+   FakeCodeline(tgsi_opcode _op, const std::vector<int>& _dst, const std::vector<int>& _src,
                 const std::vector<int>&_to);
 
-   FakeCodeline(unsigned _op, const std::vector<std::pair<int,int>>& _dst,
+   FakeCodeline(tgsi_opcode _op, const std::vector<std::pair<int,int>>& _dst,
                 const std::vector<std::pair<int, const char *>>& _src,
                 const std::vector<std::pair<int, const char *>>&_to, SWZ with_swizzle);
 
-   FakeCodeline(unsigned _op, const std::vector<std::tuple<int,int,int>>& _dst,
+   FakeCodeline(tgsi_opcode _op, const std::vector<std::tuple<int,int,int>>& _dst,
                 const std::vector<std::tuple<int,int,int>>& _src,
                 const std::vector<std::tuple<int,int,int>>&_to, RA with_reladdr);
 
@@ -78,7 +78,7 @@ private:
    template <typename st_reg>
    void read_reg(const st_reg& s);
 
-   unsigned op;
+   tgsi_opcode op;
    std::vector<st_dst_reg> dst;
    std::vector<st_src_reg> src;
    std::vector<st_src_reg> tex_offsets;