summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-12-31 21:50:17 +0000
committerMarcin Koƛcielnicki <koriakin@0x04.net>2016-12-31 21:50:17 +0000
commit9f261c4a1a4158629eff2e373cc7b108697785dd (patch)
tree7d66494841de229308b748a571dfddbbc70ea62f
parentc44c662648f87bb3d4be49e3f352c51c36590687 (diff)
hwtest/pgraph: Fix surf2d and surfswz format on Rankine.
-rw-r--r--hwtest/pgraph_class_surf.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/hwtest/pgraph_class_surf.cc b/hwtest/pgraph_class_surf.cc
index 1206e4fc..816aa258 100644
--- a/hwtest/pgraph_class_surf.cc
+++ b/hwtest/pgraph_class_surf.cc
@@ -102,6 +102,8 @@ class MthdSurfPitch : public SingleMthdTest {
class MthdSurf2DFormat : public SingleMthdTest {
bool is_valid_val() override {
+ if (cls & 0xff00)
+ return val != 0 && val < 0xf;
return val != 0 && val < 0xe;
}
void adjust_orig_mthd() override {
@@ -146,6 +148,18 @@ class MthdSurf2DFormat : public SingleMthdTest {
case 0x0b:
fmt = 0xd;
break;
+ case 0x0c:
+ if (cls & 0xff00)
+ fmt = 0x13;
+ break;
+ case 0x0d:
+ if (cls & 0xff00)
+ fmt = 0x14;
+ break;
+ case 0x0e:
+ if (cls & 0xff00)
+ fmt = 0x15;
+ break;
}
pgraph_set_surf_format(&exp, 0, fmt);
pgraph_set_surf_format(&exp, 1, fmt);
@@ -162,7 +176,7 @@ class MthdSurf2DFormatAlt : public MthdSurf2DFormat {
class MthdSurfSwzFormat : public SingleMthdTest {
bool is_valid_val() override {
int fmt = extr(val, 0, 16);
- if (fmt == 0 || fmt > 0xd)
+ if (fmt == 0 || fmt > (cls & 0xff00 ? 0xe : 0xd))
return false;
int swzx = extr(val, 16, 8);
int swzy = extr(val, 24, 8);
@@ -218,6 +232,18 @@ class MthdSurfSwzFormat : public SingleMthdTest {
case 0x0b:
fmt = 0xd;
break;
+ case 0x0c:
+ if (cls & 0xff00)
+ fmt = 0x13;
+ break;
+ case 0x0d:
+ if (cls & 0xff00)
+ fmt = 0x14;
+ break;
+ case 0x0e:
+ if (cls & 0xff00)
+ fmt = 0x15;
+ break;
}
int swzx = extr(val, 16, 4);
int swzy = extr(val, 24, 4);