Merge pull request #3580 from daniellimws/common-fmt

common: Migrate logging macros
This commit is contained in:
Weiyi Wang 2018-04-06 12:38:08 +03:00 committed by GitHub
commit a9544ca015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 132 additions and 134 deletions

View file

@ -265,7 +265,7 @@ struct FramebufferRegs {
return 4;
}
ASSERT_MSG(false, "Unknown depth format %u", static_cast<u32>(format));
ASSERT_MSG(false, "Unknown depth format {}", static_cast<u32>(format));
}
// Returns the number of bits per depth component of the specified depth format
@ -278,7 +278,7 @@ struct FramebufferRegs {
return 24;
}
ASSERT_MSG(false, "Unknown depth format %u", static_cast<u32>(format));
ASSERT_MSG(false, "Unknown depth format {}", static_cast<u32>(format));
}
INSERT_PADDING_WORDS(0x10); // Gas related registers

View file

@ -1308,7 +1308,7 @@ void RasterizerOpenGL::SetShader() {
glGetActiveUniformBlockiv(current_shader->shader.handle, block_index,
GL_UNIFORM_BLOCK_DATA_SIZE, &block_size);
ASSERT_MSG(block_size == sizeof(UniformData),
"Uniform block size did not match! Got %d, expected %zu",
"Uniform block size did not match! Got {}, expected {}",
static_cast<int>(block_size), sizeof(UniformData));
glUniformBlockBinding(current_shader->shader.handle, block_index, 0);
}

View file

@ -2,7 +2,6 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include <cmath>
#include <cstring>
#include "common/bit_set.h"
@ -30,7 +29,7 @@ void OutputVertex::ValidateSemantics(const RasterizerRegs& regs) {
for (size_t comp = 0; comp < 4; ++comp) {
u32 semantic = (output_register_map >> (8 * comp)) & 0x1F;
ASSERT_MSG(semantic < 24 || semantic == RasterizerRegs::VSOutputAttributes::INVALID,
"Invalid/unknown semantic id: %" PRIu32, semantic);
"Invalid/unknown semantic id: {}", semantic);
}
}
}