diff options
Diffstat (limited to 'src/video_core/debug_utils')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index d24c0f11e..fc9faffc3 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -85,7 +85,7 @@ void GeometryDumper::AddTriangle(Vertex& v0, Vertex& v1, Vertex& v2) { | |||
| 85 | vertices.push_back(v1); | 85 | vertices.push_back(v1); |
| 86 | vertices.push_back(v2); | 86 | vertices.push_back(v2); |
| 87 | 87 | ||
| 88 | int num_vertices = vertices.size(); | 88 | size_t num_vertices = vertices.size(); |
| 89 | faces.push_back({ num_vertices-3, num_vertices-2, num_vertices-1 }); | 89 | faces.push_back({ num_vertices-3, num_vertices-2, num_vertices-1 }); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| @@ -241,8 +241,8 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data | |||
| 241 | 241 | ||
| 242 | dvle.main_offset_words = main_offset; | 242 | dvle.main_offset_words = main_offset; |
| 243 | dvle.output_register_table_offset = write_offset - dvlb.dvle_offset; | 243 | dvle.output_register_table_offset = write_offset - dvlb.dvle_offset; |
| 244 | dvle.output_register_table_size = output_info_table.size(); | 244 | dvle.output_register_table_size = static_cast<uint32_t>(output_info_table.size()); |
| 245 | QueueForWriting((u8*)output_info_table.data(), output_info_table.size() * sizeof(OutputRegisterInfo)); | 245 | QueueForWriting((u8*)output_info_table.data(), static_cast<u32>(output_info_table.size() * sizeof(OutputRegisterInfo))); |
| 246 | 246 | ||
| 247 | // TODO: Create a label table for "main" | 247 | // TODO: Create a label table for "main" |
| 248 | 248 | ||
| @@ -497,31 +497,31 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture | |||
| 497 | // Lookup base value | 497 | // Lookup base value |
| 498 | Math::Vec3<int> ret; | 498 | Math::Vec3<int> ret; |
| 499 | if (differential_mode) { | 499 | if (differential_mode) { |
| 500 | ret.r() = differential.r; | 500 | ret.r() = static_cast<int>(differential.r); |
| 501 | ret.g() = differential.g; | 501 | ret.g() = static_cast<int>(differential.g); |
| 502 | ret.b() = differential.b; | 502 | ret.b() = static_cast<int>(differential.b); |
| 503 | if (x >= 2) { | 503 | if (x >= 2) { |
| 504 | ret.r() += differential.dr; | 504 | ret.r() += static_cast<int>(differential.dr); |
| 505 | ret.g() += differential.dg; | 505 | ret.g() += static_cast<int>(differential.dg); |
| 506 | ret.b() += differential.db; | 506 | ret.b() += static_cast<int>(differential.db); |
| 507 | } | 507 | } |
| 508 | ret.r() = Color::Convert5To8(ret.r()); | 508 | ret.r() = Color::Convert5To8(ret.r()); |
| 509 | ret.g() = Color::Convert5To8(ret.g()); | 509 | ret.g() = Color::Convert5To8(ret.g()); |
| 510 | ret.b() = Color::Convert5To8(ret.b()); | 510 | ret.b() = Color::Convert5To8(ret.b()); |
| 511 | } else { | 511 | } else { |
| 512 | if (x < 2) { | 512 | if (x < 2) { |
| 513 | ret.r() = Color::Convert4To8(separate.r1); | 513 | ret.r() = Color::Convert4To8(static_cast<u8>(separate.r1)); |
| 514 | ret.g() = Color::Convert4To8(separate.g1); | 514 | ret.g() = Color::Convert4To8(static_cast<u8>(separate.g1)); |
| 515 | ret.b() = Color::Convert4To8(separate.b1); | 515 | ret.b() = Color::Convert4To8(static_cast<u8>(separate.b1)); |
| 516 | } else { | 516 | } else { |
| 517 | ret.r() = Color::Convert4To8(separate.r2); | 517 | ret.r() = Color::Convert4To8(static_cast<u8>(separate.r2)); |
| 518 | ret.g() = Color::Convert4To8(separate.g2); | 518 | ret.g() = Color::Convert4To8(static_cast<u8>(separate.g2)); |
| 519 | ret.b() = Color::Convert4To8(separate.b2); | 519 | ret.b() = Color::Convert4To8(static_cast<u8>(separate.b2)); |
| 520 | } | 520 | } |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | // Add modifier | 523 | // Add modifier |
| 524 | unsigned table_index = (x < 2) ? table_index_1.Value() : table_index_2.Value(); | 524 | unsigned table_index = static_cast<int>((x < 2) ? table_index_1.Value() : table_index_2.Value()); |
| 525 | 525 | ||
| 526 | static const std::array<std::array<u8, 2>, 8> etc1_modifier_table = {{ | 526 | static const std::array<std::array<u8, 2>, 8> etc1_modifier_table = {{ |
| 527 | { 2, 8 }, { 5, 17 }, { 9, 29 }, { 13, 42 }, | 527 | { 2, 8 }, { 5, 17 }, { 9, 29 }, { 13, 42 }, |