From 1cc06ea3e7f0cce37e4d684396b3f10424d7dba3 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 13 Jul 2019 22:18:06 +0300 Subject: [PATCH] [GPU] VGT major mode info, swap IsPrimitiveTwoFaced arguments --- src/xenia/gpu/xenos.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/xenos.h b/src/xenia/gpu/xenos.h index db795569c..a43b807e0 100644 --- a/src/xenia/gpu/xenos.h +++ b/src/xenia/gpu/xenos.h @@ -36,6 +36,15 @@ enum class PrimitiveType : uint32_t { kQuadList = 0x0D, kQuadStrip = 0x0E, kPolygon = 0x0F, + + // Starting with this primitive mode, registers like VGT_OUTPUT_PATH_CNTL have + // effect (deduced from R6xx/R7xx registers, and Halo 3 also doesn't reset + // VGT_OUTPUT_PATH_CNTL after the first draw with tessellation). + // TODO(Triang3l): Find out if VGT_DRAW_INITIATOR (0x21FC on Adreno 2xx, but + // not seen being used in games) specifies the major mode (or if it's set + // somewhere else). + kExplicitMajorModeForceStart = 0x10, + k2DCopyRectListV0 = 0x10, k2DCopyRectListV1 = 0x11, k2DCopyRectListV2 = 0x12, @@ -43,6 +52,7 @@ enum class PrimitiveType : uint32_t { k2DFillRectList = 0x14, k2DLineStrip = 0x15, k2DTriStrip = 0x16, + // Tessellation patches (D3DTPT) when VGT_OUTPUT_PATH_CNTL & 3 is // VGT_OUTPATH_TESS_EN (1). kLinePatch = 0x10, @@ -50,7 +60,7 @@ enum class PrimitiveType : uint32_t { kQuadPatch = 0x12, }; -inline bool IsPrimitiveTwoFaced(PrimitiveType type, bool tessellated) { +inline bool IsPrimitiveTwoFaced(bool tessellated, PrimitiveType type) { if (tessellated) { return type == PrimitiveType::kTrianglePatch || type == PrimitiveType::kQuadPatch;