summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorPokechu22 <pokechu022@gmail.com>2022-05-19 13:13:53 -0700
committerGitHub <noreply@github.com>2022-05-19 13:13:53 -0700
commit2aa0ae097b54ccb582e33ed7fa129031f381a21c (patch)
tree6828bc205972d44e575c2c3002e43c15f7a9d9ad /Source/Core/VideoCommon
parent8baeb75bd26f69c9239691c058a488082ad54870 (diff)
parent8df55b492c52401f88393295479d6fbeba92ad9b (diff)
Merge pull request #10672 from Pokechu22/xf-invtxspec
Show panic alerts if the CP configuration doesn't match the XF configuration
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/CPMemory.h11
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderARM64.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderBase.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp88
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.cpp66
-rw-r--r--Source/Core/VideoCommon/XFMemory.h42
8 files changed, 152 insertions, 63 deletions
diff --git a/Source/Core/VideoCommon/CPMemory.h b/Source/Core/VideoCommon/CPMemory.h
index 167f667c42..7ce56c05cd 100644
--- a/Source/Core/VideoCommon/CPMemory.h
+++ b/Source/Core/VideoCommon/CPMemory.h
@@ -162,12 +162,12 @@ struct fmt::formatter<CoordComponentCount> : EnumFormatter<CoordComponentCount::
enum class NormalComponentCount
{
N = 0,
- NBT = 1,
+ NTB = 1,
};
template <>
-struct fmt::formatter<NormalComponentCount> : EnumFormatter<NormalComponentCount::NBT>
+struct fmt::formatter<NormalComponentCount> : EnumFormatter<NormalComponentCount::NTB>
{
- constexpr formatter() : EnumFormatter({"1 (n)", "3 (n, b, t)"}) {}
+ constexpr formatter() : EnumFormatter({"1 (normal)", "3 (normal, tangent, binormal)"}) {}
};
enum class ColorComponentCount
@@ -348,8 +348,9 @@ struct fmt::formatter<UVAT_group0>
{
static constexpr std::array<const char*, 2> byte_dequant = {
"shift does not apply to u8/s8 components", "shift applies to u8/s8 components"};
- static constexpr std::array<const char*, 2> normalindex3 = {"single index per normal",
- "triple-index per nine-normal"};
+ static constexpr std::array<const char*, 2> normalindex3 = {
+ "single index shared by normal, tangent, and binormal",
+ "three indices, one each for normal, tangent, and binormal"};
return fmt::format_to(ctx.out(),
"Position elements: {}\n"
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index 751778dd24..8176027b45 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -129,7 +129,7 @@ void VertexLoader::CompileVertexTranslator()
}
WriteCall(pFunc);
- for (int i = 0; i < (m_VtxAttr.g0.NormalElements == NormalComponentCount::NBT ? 3 : 1); i++)
+ for (int i = 0; i < (m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1); i++)
{
m_native_vtx_decl.normals[i].components = 3;
m_native_vtx_decl.normals[i].enable = true;
diff --git a/Source/Core/VideoCommon/VertexLoaderARM64.cpp b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
index eff8a29993..9388c21a7b 100644
--- a/Source/Core/VideoCommon/VertexLoaderARM64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
@@ -472,7 +472,7 @@ void VertexLoaderARM64::GenerateVertexLoader()
{
static const u8 map[8] = {7, 6, 15, 14};
const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())];
- const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NBT ? 3 : 1;
+ const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
s32 offset = -1;
for (int i = 0; i < limit; i++)
diff --git a/Source/Core/VideoCommon/VertexLoaderBase.cpp b/Source/Core/VideoCommon/VertexLoaderBase.cpp
index 2b6c3cdd21..678246783d 100644
--- a/Source/Core/VideoCommon/VertexLoaderBase.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderBase.cpp
@@ -152,7 +152,7 @@ u32 VertexLoaderBase::GetVertexComponents(const TVtxDesc& vtx_desc, const VAT& v
if (vtx_desc.low.Normal != VertexComponentFormat::NotPresent)
{
components |= VB_HAS_NORMAL;
- if (vtx_attr.g0.NormalElements == NormalComponentCount::NBT)
+ if (vtx_attr.g0.NormalElements == NormalComponentCount::NTB)
components |= VB_HAS_TANGENT | VB_HAS_BINORMAL;
}
for (u32 i = 0; i < vtx_desc.low.Color.Size(); i++)
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index 7710b7cc20..f3fc4d9e7e 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -16,6 +16,7 @@
#include "Common/EnumMap.h"
#include "Common/Logging/Log.h"
+#include "Core/DolphinAnalytics.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/BPMemory.h"
@@ -28,6 +29,7 @@
#include "VideoCommon/VertexLoaderBase.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VertexShaderManager.h"
+#include "VideoCommon/XFMemory.h"
namespace VertexLoaderManager
{
@@ -249,6 +251,90 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
return loader;
}
+static void CheckCPConfiguration(int vtx_attr_group)
+{
+ // Validate that the XF input configuration matches the CP configuration
+ u32 num_cp_colors = std::count_if(
+ g_main_cp_state.vtx_desc.low.Color.begin(), g_main_cp_state.vtx_desc.low.Color.end(),
+ [](auto format) { return format != VertexComponentFormat::NotPresent; });
+ u32 num_cp_tex_coords = std::count_if(
+ g_main_cp_state.vtx_desc.high.TexCoord.begin(), g_main_cp_state.vtx_desc.high.TexCoord.end(),
+ [](auto format) { return format != VertexComponentFormat::NotPresent; });
+
+ u32 num_cp_normals;
+ if (g_main_cp_state.vtx_desc.low.Normal == VertexComponentFormat::NotPresent)
+ num_cp_normals = 0;
+ else if (g_main_cp_state.vtx_attr[vtx_attr_group].g0.NormalElements == NormalComponentCount::NTB)
+ num_cp_normals = 3;
+ else
+ num_cp_normals = 1;
+
+ std::optional<u32> num_xf_normals;
+ switch (xfmem.invtxspec.numnormals)
+ {
+ case NormalCount::None:
+ num_xf_normals = 0;
+ break;
+ case NormalCount::Normal:
+ num_xf_normals = 1;
+ break;
+ case NormalCount::NormalTangentBinormal:
+ num_xf_normals = 3;
+ break;
+ default:
+ PanicAlertFmt("xfmem.invtxspec.numnormals is invalid: {}", xfmem.invtxspec.numnormals);
+ break;
+ }
+
+ if (num_cp_colors != xfmem.invtxspec.numcolors || num_cp_normals != num_xf_normals ||
+ num_cp_tex_coords != xfmem.invtxspec.numtextures)
+ {
+ PanicAlertFmt("Mismatched configuration between CP and XF stages - {}/{} colors, {}/{} "
+ "normals, {}/{} texture coordinates. Please report on the issue tracker.\n\n"
+ "VCD: {:08x} {:08x}\nVAT {}: {:08x} {:08x} {:08x}\nXF vertex spec: {:08x}",
+ num_cp_colors, xfmem.invtxspec.numcolors, num_cp_normals,
+ num_xf_normals.has_value() ? fmt::to_string(num_xf_normals.value()) : "invalid",
+ num_cp_tex_coords, xfmem.invtxspec.numtextures, g_main_cp_state.vtx_desc.low.Hex,
+ g_main_cp_state.vtx_desc.high.Hex, vtx_attr_group,
+ g_main_cp_state.vtx_attr[vtx_attr_group].g0.Hex,
+ g_main_cp_state.vtx_attr[vtx_attr_group].g1.Hex,
+ g_main_cp_state.vtx_attr[vtx_attr_group].g2.Hex, xfmem.invtxspec.hex);
+
+ // Analytics reporting so we can discover which games have this problem, that way when we
+ // eventually simulate the behavior we have test cases for it.
+ if (num_cp_colors != xfmem.invtxspec.numcolors)
+ {
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_COLORS_BETWEEN_CP_AND_XF);
+ }
+ if (num_cp_normals != num_xf_normals)
+ {
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_NORMALS_BETWEEN_CP_AND_XF);
+ }
+ if (num_cp_tex_coords != xfmem.invtxspec.numtextures)
+ {
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_TEX_COORDS_BETWEEN_CP_AND_XF);
+ }
+
+ // Don't bail out, though; we can still render something successfully
+ // (real hardware seems to hang in this case, though)
+ }
+
+ if (g_main_cp_state.matrix_index_a.Hex != xfmem.MatrixIndexA.Hex ||
+ g_main_cp_state.matrix_index_b.Hex != xfmem.MatrixIndexB.Hex)
+ {
+ PanicAlertFmt("Mismatched matrix index configuration between CP and XF stages - "
+ "index A: {:08x}/{:08x}, index B {:08x}/{:08x}. "
+ "Please report on the issue tracker.",
+ g_main_cp_state.matrix_index_a.Hex, xfmem.MatrixIndexA.Hex,
+ g_main_cp_state.matrix_index_b.Hex, xfmem.MatrixIndexB.Hex);
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_MATRIX_INDICES_BETWEEN_CP_AND_XF);
+ }
+}
+
int RunVertices(int vtx_attr_group, OpcodeDecoder::Primitive primitive, int count, DataReader src,
bool is_preprocess)
{
@@ -265,6 +351,8 @@ int RunVertices(int vtx_attr_group, OpcodeDecoder::Primitive primitive, int coun
if (is_preprocess)
return size;
+ CheckCPConfiguration(vtx_attr_group);
+
// If the native vertex format changed, force a flush.
if (loader->m_native_vertex_format != s_current_vtx_fmt ||
loader->m_native_components != g_current_components)
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index aebba7680d..63752429aa 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -461,7 +461,7 @@ void VertexLoaderX64::GenerateVertexLoader()
{
static const u8 map[8] = {7, 6, 15, 14};
const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())];
- const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NBT ? 3 : 1;
+ const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
for (int i = 0; i < limit; i++)
{
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
index db955639d7..6813e4128c 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -123,7 +123,7 @@ struct Set
using Common::EnumMap;
using Formats = EnumMap<Set, ComponentFormat::Float>;
-using Elements = EnumMap<Formats, NormalComponentCount::NBT>;
+using Elements = EnumMap<Formats, NormalComponentCount::NTB>;
using Indices = std::array<Elements, 2>;
using Types = EnumMap<Indices, VertexComponentFormat::Index16>;
@@ -140,11 +140,11 @@ constexpr Types InitializeTable()
table[VCF::Direct][false][NCC::N][FMT::UShort] = Normal_Direct<u16, 1>();
table[VCF::Direct][false][NCC::N][FMT::Short] = Normal_Direct<s16, 1>();
table[VCF::Direct][false][NCC::N][FMT::Float] = Normal_Direct<float, 1>();
- table[VCF::Direct][false][NCC::NBT][FMT::UByte] = Normal_Direct<u8, 3>();
- table[VCF::Direct][false][NCC::NBT][FMT::Byte] = Normal_Direct<s8, 3>();
- table[VCF::Direct][false][NCC::NBT][FMT::UShort] = Normal_Direct<u16, 3>();
- table[VCF::Direct][false][NCC::NBT][FMT::Short] = Normal_Direct<s16, 3>();
- table[VCF::Direct][false][NCC::NBT][FMT::Float] = Normal_Direct<float, 3>();
+ table[VCF::Direct][false][NCC::NTB][FMT::UByte] = Normal_Direct<u8, 3>();
+ table[VCF::Direct][false][NCC::NTB][FMT::Byte] = Normal_Direct<s8, 3>();
+ table[VCF::Direct][false][NCC::NTB][FMT::UShort] = Normal_Direct<u16, 3>();
+ table[VCF::Direct][false][NCC::NTB][FMT::Short] = Normal_Direct<s16, 3>();
+ table[VCF::Direct][false][NCC::NTB][FMT::Float] = Normal_Direct<float, 3>();
// Same as above, since there are no indices
table[VCF::Direct][true][NCC::N][FMT::UByte] = Normal_Direct<u8, 1>();
@@ -152,57 +152,57 @@ constexpr Types InitializeTable()
table[VCF::Direct][true][NCC::N][FMT::UShort] = Normal_Direct<u16, 1>();
table[VCF::Direct][true][NCC::N][FMT::Short] = Normal_Direct<s16, 1>();
table[VCF::Direct][true][NCC::N][FMT::Float] = Normal_Direct<float, 1>();
- table[VCF::Direct][true][NCC::NBT][FMT::UByte] = Normal_Direct<u8, 3>();
- table[VCF::Direct][true][NCC::NBT][FMT::Byte] = Normal_Direct<s8, 3>();
- table[VCF::Direct][true][NCC::NBT][FMT::UShort] = Normal_Direct<u16, 3>();
- table[VCF::Direct][true][NCC::NBT][FMT::Short] = Normal_Direct<s16, 3>();
- table[VCF::Direct][true][NCC::NBT][FMT::Float] = Normal_Direct<float, 3>();
+ table[VCF::Direct][true][NCC::NTB][FMT::UByte] = Normal_Direct<u8, 3>();
+ table[VCF::Direct][true][NCC::NTB][FMT::Byte] = Normal_Direct<s8, 3>();
+ table[VCF::Direct][true][NCC::NTB][FMT::UShort] = Normal_Direct<u16, 3>();
+ table[VCF::Direct][true][NCC::NTB][FMT::Short] = Normal_Direct<s16, 3>();
+ table[VCF::Direct][true][NCC::NTB][FMT::Float] = Normal_Direct<float, 3>();
table[VCF::Index8][false][NCC::N][FMT::UByte] = Normal_Index<u8, u8, 1>();
table[VCF::Index8][false][NCC::N][FMT::Byte] = Normal_Index<u8, s8, 1>();
table[VCF::Index8][false][NCC::N][FMT::UShort] = Normal_Index<u8, u16, 1>();
table[VCF::Index8][false][NCC::N][FMT::Short] = Normal_Index<u8, s16, 1>();
table[VCF::Index8][false][NCC::N][FMT::Float] = Normal_Index<u8, float, 1>();
- table[VCF::Index8][false][NCC::NBT][FMT::UByte] = Normal_Index<u8, u8, 3>();
- table[VCF::Index8][false][NCC::NBT][FMT::Byte] = Normal_Index<u8, s8, 3>();
- table[VCF::Index8][false][NCC::NBT][FMT::UShort] = Normal_Index<u8, u16, 3>();
- table[VCF::Index8][false][NCC::NBT][FMT::Short] = Normal_Index<u8, s16, 3>();
- table[VCF::Index8][false][NCC::NBT][FMT::Float] = Normal_Index<u8, float, 3>();
+ table[VCF::Index8][false][NCC::NTB][FMT::UByte] = Normal_Index<u8, u8, 3>();
+ table[VCF::Index8][false][NCC::NTB][FMT::Byte] = Normal_Index<u8, s8, 3>();
+ table[VCF::Index8][false][NCC::NTB][FMT::UShort] = Normal_Index<u8, u16, 3>();
+ table[VCF::Index8][false][NCC::NTB][FMT::Short] = Normal_Index<u8, s16, 3>();
+ table[VCF::Index8][false][NCC::NTB][FMT::Float] = Normal_Index<u8, float, 3>();
- // Same for NormalComponentCount::N; differs for NBT
+ // Same for NormalComponentCount::N; differs for NTB
table[VCF::Index8][true][NCC::N][FMT::UByte] = Normal_Index<u8, u8, 1>();
table[VCF::Index8][true][NCC::N][FMT::Byte] = Normal_Index<u8, s8, 1>();
table[VCF::Index8][true][NCC::N][FMT::UShort] = Normal_Index<u8, u16, 1>();
table[VCF::Index8][true][NCC::N][FMT::Short] = Normal_Index<u8, s16, 1>();
table[VCF::Index8][true][NCC::N][FMT::Float] = Normal_Index<u8, float, 1>();
- table[VCF::Index8][true][NCC::NBT][FMT::UByte] = Normal_Index_Indices3<u8, u8>();
- table[VCF::Index8][true][NCC::NBT][FMT::Byte] = Normal_Index_Indices3<u8, s8>();
- table[VCF::Index8][true][NCC::NBT][FMT::UShort] = Normal_Index_Indices3<u8, u16>();
- table[VCF::Index8][true][NCC::NBT][FMT::Short] = Normal_Index_Indices3<u8, s16>();
- table[VCF::Index8][true][NCC::NBT][FMT::Float] = Normal_Index_Indices3<u8, float>();
+ table[VCF::Index8][true][NCC::NTB][FMT::UByte] = Normal_Index_Indices3<u8, u8>();
+ table[VCF::Index8][true][NCC::NTB][FMT::Byte] = Normal_Index_Indices3<u8, s8>();
+ table[VCF::Index8][true][NCC::NTB][FMT::UShort] = Normal_Index_Indices3<u8, u16>();
+ table[VCF::Index8][true][NCC::NTB][FMT::Short] = Normal_Index_Indices3<u8, s16>();
+ table[VCF::Index8][true][NCC::NTB][FMT::Float] = Normal_Index_Indices3<u8, float>();
table[VCF::Index16][false][NCC::N][FMT::UByte] = Normal_Index<u16, u8, 1>();
table[VCF::Index16][false][NCC::N][FMT::Byte] = Normal_Index<u16, s8, 1>();
table[VCF::Index16][false][NCC::N][FMT::UShort] = Normal_Index<u16, u16, 1>();
table[VCF::Index16][false][NCC::N][FMT::Short] = Normal_Index<u16, s16, 1>();
table[VCF::Index16][false][NCC::N][FMT::Float] = Normal_Index<u16, float, 1>();
- table[VCF::Index16][false][NCC::NBT][FMT::UByte] = Normal_Index<u16, u8, 3>();
- table[VCF::Index16][false][NCC::NBT][FMT::Byte] = Normal_Index<u16, s8, 3>();
- table[VCF::Index16][false][NCC::NBT][FMT::UShort] = Normal_Index<u16, u16, 3>();
- table[VCF::Index16][false][NCC::NBT][FMT::Short] = Normal_Index<u16, s16, 3>();
- table[VCF::Index16][false][NCC::NBT][FMT::Float] = Normal_Index<u16, float, 3>();
+ table[VCF::Index16][false][NCC::NTB][FMT::UByte] = Normal_Index<u16, u8, 3>();
+ table[VCF::Index16][false][NCC::NTB][FMT::Byte] = Normal_Index<u16, s8, 3>();
+ table[VCF::Index16][false][NCC::NTB][FMT::UShort] = Normal_Index<u16, u16, 3>();
+ table[VCF::Index16][false][NCC::NTB][FMT::Short] = Normal_Index<u16, s16, 3>();
+ table[VCF::Index16][false][NCC::NTB][FMT::Float] = Normal_Index<u16, float, 3>();
- // Same for NormalComponentCount::N; differs for NBT
+ // Same for NormalComponentCount::N; differs for NTB
table[VCF::Index16][true][NCC::N][FMT::UByte] = Normal_Index<u16, u8, 1>();
table[VCF::Index16][true][NCC::N][FMT::Byte] = Normal_Index<u16, s8, 1>();
table[VCF::Index16][true][NCC::N][FMT::UShort] = Normal_Index<u16, u16, 1>();
table[VCF::Index16][true][NCC::N][FMT::Short] = Normal_Index<u16, s16, 1>();
table[VCF::Index16][true][NCC::N][FMT::Float] = Normal_Index<u16, float, 1>();
- table[VCF::Index16][true][NCC::NBT][FMT::UByte] = Normal_Index_Indices3<u16, u8>();
- table[VCF::Index16][true][NCC::NBT][FMT::Byte] = Normal_Index_Indices3<u16, s8>();
- table[VCF::Index16][true][NCC::NBT][FMT::UShort] = Normal_Index_Indices3<u16, u16>();
- table[VCF::Index16][true][NCC::NBT][FMT::Short] = Normal_Index_Indices3<u16, s16>();
- table[VCF::Index16][true][NCC::NBT][FMT::Float] = Normal_Index_Indices3<u16, float>();
+ table[VCF::Index16][true][NCC::NTB][FMT::UByte] = Normal_Index_Indices3<u16, u8>();
+ table[VCF::Index16][true][NCC::NTB][FMT::Byte] = Normal_Index_Indices3<u16, s8>();
+ table[VCF::Index16][true][NCC::NTB][FMT::UShort] = Normal_Index_Indices3<u16, u16>();
+ table[VCF::Index16][true][NCC::NTB][FMT::Short] = Normal_Index_Indices3<u16, s16>();
+ table[VCF::Index16][true][NCC::NTB][FMT::Float] = Normal_Index_Indices3<u16, float>();
return table;
}
diff --git a/Source/Core/VideoCommon/XFMemory.h b/Source/Core/VideoCommon/XFMemory.h
index 836f221e47..aa8a28a608 100644
--- a/Source/Core/VideoCommon/XFMemory.h
+++ b/Source/Core/VideoCommon/XFMemory.h
@@ -44,13 +44,13 @@ struct fmt::formatter<TexInputForm> : EnumFormatter<TexInputForm::ABC1>
enum class NormalCount : u32
{
None = 0,
- Normals = 1,
- NormalsBinormals = 2
+ Normal = 1,
+ NormalTangentBinormal = 2
};
template <>
-struct fmt::formatter<NormalCount> : EnumFormatter<NormalCount::NormalsBinormals>
+struct fmt::formatter<NormalCount> : EnumFormatter<NormalCount::NormalTangentBinormal>
{
- constexpr formatter() : EnumFormatter({"None", "Normals only", "Normals and binormals"}) {}
+ constexpr formatter() : EnumFormatter({"None", "Normal only", "Normal, tangent, and binormal"}) {}
};
// Texture generation type
@@ -416,23 +416,23 @@ struct Projection
struct XFMemory
{
- float posMatrices[256]; // 0x0000 - 0x00ff
- u32 unk0[768]; // 0x0100 - 0x03ff
- float normalMatrices[96]; // 0x0400 - 0x045f
- u32 unk1[160]; // 0x0460 - 0x04ff
- float postMatrices[256]; // 0x0500 - 0x05ff
- Light lights[8]; // 0x0600 - 0x067f
- u32 unk2[2432]; // 0x0680 - 0x0fff
- u32 error; // 0x1000
- u32 diag; // 0x1001
- u32 state0; // 0x1002
- u32 state1; // 0x1003
- u32 xfClock; // 0x1004
- ClipDisable clipDisable; // 0x1005
- u32 perf0; // 0x1006
- u32 perf1; // 0x1007
- INVTXSPEC hostinfo; // 0x1008 number of textures,colors,normals from vertex input
- NumColorChannel numChan; // 0x1009
+ float posMatrices[256]; // 0x0000 - 0x00ff
+ u32 unk0[768]; // 0x0100 - 0x03ff
+ float normalMatrices[96]; // 0x0400 - 0x045f
+ u32 unk1[160]; // 0x0460 - 0x04ff
+ float postMatrices[256]; // 0x0500 - 0x05ff
+ Light lights[8]; // 0x0600 - 0x067f
+ u32 unk2[2432]; // 0x0680 - 0x0fff
+ u32 error; // 0x1000
+ u32 diag; // 0x1001
+ u32 state0; // 0x1002
+ u32 state1; // 0x1003
+ u32 xfClock; // 0x1004
+ ClipDisable clipDisable; // 0x1005
+ u32 perf0; // 0x1006
+ u32 perf1; // 0x1007
+ INVTXSPEC invtxspec; // 0x1008
+ NumColorChannel numChan; // 0x1009
u32 ambColor[NUM_XF_COLOR_CHANNELS]; // 0x100a, 0x100b
u32 matColor[NUM_XF_COLOR_CHANNELS]; // 0x100c, 0x100d
LitChannel color[NUM_XF_COLOR_CHANNELS]; // 0x100e, 0x100f