summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/XFStructs.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-06-20 13:47:57 -0700
committerPokechu22 <Pokechu022@gmail.com>2021-12-18 12:51:56 -0800
commit1914087998bc296208355dc4b1b2553430b081b2 (patch)
treebae5ecbd974582819f38c01fbff2aa762a812761 /Source/Core/VideoCommon/XFStructs.cpp
parent3aaeb2b9ef3f6b9cde69c77ecdf96e8defc996d5 (diff)
Create and use CPArray enum class
Diffstat (limited to 'Source/Core/VideoCommon/XFStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/XFStructs.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp
index ebf9e8efab..c31b8cbb54 100644
--- a/Source/Core/VideoCommon/XFStructs.cpp
+++ b/Source/Core/VideoCommon/XFStructs.cpp
@@ -274,7 +274,7 @@ constexpr std::tuple<u32, u32, u32> ExtractIndexedXF(u32 val)
}
// TODO - verify that it is correct. Seems to work, though.
-void LoadIndexedXF(u32 val, int refarray)
+void LoadIndexedXF(CPArray array, u32 val)
{
const auto [index, address, size] = ExtractIndexedXF(val);
// load stuff from array to address in xf mem
@@ -287,8 +287,8 @@ void LoadIndexedXF(u32 val, int refarray)
}
else
{
- newData = (u32*)Memory::GetPointer(g_main_cp_state.array_bases[refarray] +
- g_main_cp_state.array_strides[refarray] * index);
+ newData = (u32*)Memory::GetPointer(g_main_cp_state.array_bases[array] +
+ g_main_cp_state.array_strides[array] * index);
}
bool changed = false;
for (u32 i = 0; i < size; ++i)
@@ -307,12 +307,12 @@ void LoadIndexedXF(u32 val, int refarray)
}
}
-void PreprocessIndexedXF(u32 val, int refarray)
+void PreprocessIndexedXF(CPArray array, u32 val)
{
const auto [index, address, size] = ExtractIndexedXF(val);
- const u8* new_data = Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
- g_preprocess_cp_state.array_strides[refarray] * index);
+ const u8* new_data = Memory::GetPointer(g_preprocess_cp_state.array_bases[array] +
+ g_preprocess_cp_state.array_strides[array] * index);
const size_t buf_size = size * sizeof(u32);
Fifo::PushFifoAuxBuffer(new_data, buf_size);
@@ -655,7 +655,7 @@ std::pair<std::string, std::string> GetXFTransferInfo(const u8* data)
return std::make_pair(fmt::to_string(name), fmt::to_string(desc));
}
-std::pair<std::string, std::string> GetXFIndexedLoadInfo(u8 array, u32 value)
+std::pair<std::string, std::string> GetXFIndexedLoadInfo(CPArray array, u32 value)
{
const auto [index, address, size] = ExtractIndexedXF(value);