summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Position.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-02-08 15:22:10 -0800
committerPokechu22 <Pokechu022@gmail.com>2021-03-06 19:27:08 -0800
commitf749fcfa9f42cda679ff7f4288c8418d2b56b08d (patch)
tree5bcc8c255eae974638c20f1a4e76a22fcaee69e4 /Source/Core/VideoCommon/VertexLoader_Position.cpp
parentc27efb3f1fefa49db7962532865fbbe483f248f1 (diff)
Convert CPMemory to BitField and enum class
Additionally, VCacheEnhance has been added to UVAT_group1. According to YAGCD, this field is always 1. TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value. This change was made in a way that should be backwards-compatible.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp
index 9808c76e65..6bdbb39d35 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp
@@ -200,12 +200,15 @@ constexpr u32 s_table_read_position_vertex_size[4][8][2] = {
};
} // Anonymous namespace
-u32 VertexLoader_Position::GetSize(u64 type, u32 format, u32 elements)
+u32 VertexLoader_Position::GetSize(VertexComponentFormat type, ComponentFormat format,
+ CoordComponentCount elements)
{
- return s_table_read_position_vertex_size[type][format][elements];
+ return s_table_read_position_vertex_size[u32(type)][u32(format)][u32(elements)];
}
-TPipelineFunction VertexLoader_Position::GetFunction(u64 type, u32 format, u32 elements)
+TPipelineFunction VertexLoader_Position::GetFunction(VertexComponentFormat type,
+ ComponentFormat format,
+ CoordComponentCount elements)
{
- return s_table_read_position[type][format][elements];
+ return s_table_read_position[u32(type)][u32(format)][u32(elements)];
}