video-core: Migrate logging macros (#3878)

* video-core: Migrate logging macros

* video-core: Fixed missed clang format

* video-core: Migrated LOG_GENERIC macro
This commit is contained in:
NarcolepticK 2018-06-28 17:13:30 -04:00 committed by Weiyi Wang
parent 3cf5c1a5b4
commit 9ae70e733f
22 changed files with 156 additions and 149 deletions

View file

@ -37,9 +37,10 @@ void VertexLoader::Setup(const PipelineRegs& regs) {
// TODO: What happens if a loader overwrites a previous one's data?
for (unsigned component = 0; component < loader_config.component_count; ++component) {
if (component >= 12) {
LOG_ERROR(HW_GPU,
"Overflow in the vertex attribute loader %u trying to load component %u",
loader, component);
NGLOG_ERROR(
HW_GPU,
"Overflow in the vertex attribute loader {} trying to load component {}",
loader, component);
continue;
}
@ -136,20 +137,21 @@ void VertexLoader::LoadVertex(u32 base_address, int index, int vertex,
comp == 3 ? float24::FromFloat32(1.0f) : float24::FromFloat32(0.0f);
}
LOG_TRACE(HW_GPU,
"Loaded %d components of attribute %x for vertex %x (index %x) from "
"0x%08x + 0x%08x + 0x%04x: %f %f %f %f",
vertex_attribute_elements[i], i, vertex, index, base_address,
vertex_attribute_sources[i], vertex_attribute_strides[i] * vertex,
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
NGLOG_TRACE(HW_GPU,
"Loaded {} components of attribute {:x} for vertex {:x} (index {:x}) from "
"0x{:08x} + 0x{:08x} + 0x{:04x}: {} {} {} {}",
vertex_attribute_elements[i], i, vertex, index, base_address,
vertex_attribute_sources[i], vertex_attribute_strides[i] * vertex,
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
} else if (vertex_attribute_is_default[i]) {
// Load the default attribute if we're configured to do so
input.attr[i] = g_state.input_default_attributes.attr[i];
LOG_TRACE(HW_GPU,
"Loaded default attribute %x for vertex %x (index %x): (%f, %f, %f, %f)", i,
vertex, index, input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
NGLOG_TRACE(
HW_GPU,
"Loaded default attribute {:x} for vertex {:x} (index {:x}): ({}, {}, {}, {})", i,
vertex, index, input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
} else {
// TODO(yuriks): In this case, no data gets loaded and the vertex
// remains with the last value it had. This isn't currently maintained