diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp index 1967bf7f83..c19a07f6e1 100644 --- a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp +++ b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp @@ -385,7 +385,7 @@ u64 FifoDataFile::WriteMemoryUpdates(const std::vector& memUpdates dstUpdate.dataOffset = dataOffset; dstUpdate.dataSize = static_cast(srcUpdate.data.size()); dstUpdate.fifoPosition = srcUpdate.fifoPosition; - dstUpdate.type = srcUpdate.type; + dstUpdate.type = static_cast(srcUpdate.type); u64 updateOffset = updateListOffset + (i * sizeof(FileMemoryUpdate)); file.Seek(updateOffset, File::SeekOrigin::Begin); diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.h b/Source/Core/Core/FifoPlayer/FifoDataFile.h index 236f82e8b9..64167a75b6 100644 --- a/Source/Core/Core/FifoPlayer/FifoDataFile.h +++ b/Source/Core/Core/FifoPlayer/FifoDataFile.h @@ -18,11 +18,11 @@ class IOFile; struct MemoryUpdate { - enum Type + enum class Type : u8 { - TEXTURE_MAP = 0x01, - XF_DATA = 0x02, - VERTEX_STREAM = 0x04, + TextureMap = 0x01, + XFData = 0x02, + VertexStream = 0x04, TMEM = 0x08, }; diff --git a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp index 7cedf8299b..e24ef2a9af 100644 --- a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp +++ b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp @@ -69,7 +69,7 @@ void FifoRecorder::FifoRecordAnalyzer::OnIndexedLoad(CPArray array, u32 index, u { const u32 load_address = m_cpmem.array_bases[array] + m_cpmem.array_strides[array] * index; - m_owner->UseMemory(load_address, size * sizeof(u32), MemoryUpdate::XF_DATA); + m_owner->UseMemory(load_address, size * sizeof(u32), MemoryUpdate::Type::XFData); } // TODO: The following code is copied with modifications from VertexLoaderBase. @@ -210,7 +210,7 @@ void FifoRecorder::FifoRecordAnalyzer::ProcessVertexComponent( const u32 array_start = m_cpmem.array_bases[array_index] + byte_offset; const u32 array_size = m_cpmem.array_strides[array_index] * max_index + component_size; - m_owner->UseMemory(array_start, array_size, MemoryUpdate::VERTEX_STREAM); + m_owner->UseMemory(array_start, array_size, MemoryUpdate::Type::VertexStream); } static FifoRecorder instance; diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index ca1dea09ed..0beb464eae 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -397,7 +397,7 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, memory.CopyFromEmu(texMem + tlutTMemAddr, addr, tlutXferCount); if (OpcodeDecoder::g_record_fifo_data) - FifoRecorder::GetInstance().UseMemory(addr, tlutXferCount, MemoryUpdate::TMEM); + FifoRecorder::GetInstance().UseMemory(addr, tlutXferCount, MemoryUpdate::Type::TMEM); TMEM::InvalidateAll(); @@ -615,7 +615,7 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, } if (OpcodeDecoder::g_record_fifo_data) - FifoRecorder::GetInstance().UseMemory(src_addr, bytes_read, MemoryUpdate::TMEM); + FifoRecorder::GetInstance().UseMemory(src_addr, bytes_read, MemoryUpdate::Type::TMEM); TMEM::InvalidateAll(); } diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 37dadba967..8d7a9f875d 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1379,8 +1379,9 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp // its own memory modification tracking independent of the texture hashing below. if (OpcodeDecoder::g_record_fifo_data && !texture_info.IsFromTmem()) { - FifoRecorder::GetInstance().UseMemory( - texture_info.GetRawAddress(), texture_info.GetFullLevelSize(), MemoryUpdate::TEXTURE_MAP); + FifoRecorder::GetInstance().UseMemory(texture_info.GetRawAddress(), + texture_info.GetFullLevelSize(), + MemoryUpdate::Type::TextureMap); } // TODO: This doesn't hash GB tiles for preloaded RGBA8 textures (instead, it's hashing more data @@ -2541,7 +2542,7 @@ void TextureCacheBase::CopyRenderTargetToTexture( u32 address = dstAddr; for (u32 i = 0; i < num_blocks_y; i++) { - FifoRecorder::GetInstance().UseMemory(address, bytes_per_row, MemoryUpdate::TEXTURE_MAP, + FifoRecorder::GetInstance().UseMemory(address, bytes_per_row, MemoryUpdate::Type::TextureMap, true); address += dstStride; }