diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2023-01-12 12:39:20 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2023-01-13 15:38:00 -0800 |
| commit | c681d96d468eb63e8b322226c634eb72cdc10d01 (patch) | |
| tree | aeb664bf1a5b5c18106bffe7efdadf47c9fd58da /Source/Core/VideoCommon/VertexLoaderBase.cpp | |
| parent | 92b6446da1211ad02571161849f4855134aca1a5 (diff) | |
VertexLoaderTester: Use asserts instead of logs
Logs don't show up in unit tests, and since this is debugging functionality (though not enabled for tests by default) it's better to do it this way.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderBase.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderBase.cpp b/Source/Core/VideoCommon/VertexLoaderBase.cpp index dae75ddd6a..e8b38ba345 100644 --- a/Source/Core/VideoCommon/VertexLoaderBase.cpp +++ b/Source/Core/VideoCommon/VertexLoaderBase.cpp @@ -64,22 +64,16 @@ public: int count_a = a->RunVertices(src, buffer_a.data(), count); int count_b = b->RunVertices(src, buffer_b.data(), count); - if (count_a != count_b) - { - ERROR_LOG_FMT( - VIDEO, - "The two vertex loaders have loaded a different amount of vertices (a: {}, b: {}).", - count_a, count_b); - } - - if (memcmp(buffer_a.data(), buffer_b.data(), - std::min(count_a, count_b) * m_native_vtx_decl.stride)) - { - ERROR_LOG_FMT(VIDEO, - "The two vertex loaders have loaded different data. Configuration:" - "\nVertex desc:\n{}\n\nVertex attr:\n{}", - m_VtxDesc, m_VtxAttr); - } + ASSERT_MSG(VIDEO, count_a == count_b, + "The two vertex loaders have loaded a different amount of vertices (a: {}, b: {}).", + count_a, count_b); + + ASSERT_MSG(VIDEO, + memcmp(buffer_a.data(), buffer_b.data(), + std::min(count_a, count_b) * m_native_vtx_decl.stride) == 0, + "The two vertex loaders have loaded different data. Configuration:" + "\nVertex desc:\n{}\n\nVertex attr:\n{}", + m_VtxDesc, m_VtxAttr); memcpy(dst, buffer_a.data(), count_a * m_native_vtx_decl.stride); m_numLoadedVertices += count; |
