summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-12-31 02:56:59 +0000
committerMarcin Koƛcielnicki <koriakin@0x04.net>2016-12-31 02:56:59 +0000
commit69ca0c53ce810d21d5dac5023c2ce67a017c4deb (patch)
tree5e482e9382c28b70041c70244e7172db0745bf7a
parent3a8cd6d329de2c24c28e0a9eef72ffc1766efb7e (diff)
hwtest/pgraph: Nailed down flip method enable on Kelvin.
-rw-r--r--hwtest/pgraph_mthd.h2
-rw-r--r--hwtest/pgraph_mthd_misc.cc12
2 files changed, 14 insertions, 0 deletions
diff --git a/hwtest/pgraph_mthd.h b/hwtest/pgraph_mthd.h
index 126643f7..a5b5ff5a 100644
--- a/hwtest/pgraph_mthd.h
+++ b/hwtest/pgraph_mthd.h
@@ -559,6 +559,7 @@ class MthdFlipSet : public SingleMthdTest {
bool is_valid_val() override {
return val < 8;
}
+ bool is_valid_mthd() override;
void emulate_mthd() override;
public:
MthdFlipSet(hwtest::TestOptions &opt, uint32_t seed, const std::string &name, int trapbit, uint32_t cls, uint32_t mthd, int which_set, int which)
@@ -567,6 +568,7 @@ public:
class MthdFlipBumpWrite : public SingleMthdTest {
int which_set;
+ bool is_valid_mthd() override;
void emulate_mthd() override;
public:
MthdFlipBumpWrite(hwtest::TestOptions &opt, uint32_t seed, const std::string &name, int trapbit, uint32_t cls, uint32_t mthd, int which_set)
diff --git a/hwtest/pgraph_mthd_misc.cc b/hwtest/pgraph_mthd_misc.cc
index ea03190c..c3cf1420 100644
--- a/hwtest/pgraph_mthd_misc.cc
+++ b/hwtest/pgraph_mthd_misc.cc
@@ -266,10 +266,22 @@ void MthdNotify::emulate_mthd() {
}
}
+bool MthdFlipSet::is_valid_mthd() {
+ if ((cls & 0xff) == 0x97)
+ return extr(exp.debug[3], 25, 1);
+ return true;
+}
+
void MthdFlipSet::emulate_mthd() {
insrt(exp.surf_type, 8+12*which_set+4*which, 3, val);
}
+bool MthdFlipBumpWrite::is_valid_mthd() {
+ if ((cls & 0xff) == 0x97)
+ return extr(exp.debug[3], 25, 1);
+ return true;
+}
+
void MthdFlipBumpWrite::emulate_mthd() {
int cur = extr(exp.surf_type, 8+12*which_set, 3);
int mod = extr(exp.surf_type, 16+12*which_set, 3);