From abd852a9aaf21b997fcf3befd97a024de00ce9ca Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Sat, 25 Apr 2020 14:17:38 -0700 Subject: [PATCH] Improve matinfo output --- libs/matdbg/src/TextWriter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/matdbg/src/TextWriter.cpp b/libs/matdbg/src/TextWriter.cpp index 933d1cf83b..a63760922e 100644 --- a/libs/matdbg/src/TextWriter.cpp +++ b/libs/matdbg/src/TextWriter.cpp @@ -38,7 +38,8 @@ using namespace utils; namespace filament { namespace matdbg { -static const int alignment = 24; +constexpr int alignment = 32; +constexpr int shortAlignment = 12; static string arraySizeToString(uint64_t size) { if (size > 1) { @@ -207,9 +208,9 @@ static bool printParametersInfo(ostream& text, const ChunkContainer& container) text << " " << setw(alignment) << fieldName.c_str() - << setw(alignment) << toString(UniformType(fieldType)) + << setw(shortAlignment) << toString(UniformType(fieldType)) << arraySizeToString(fieldSize) - << setw(10) << toString(Precision(fieldPrecision)) + << setw(shortAlignment) << toString(Precision(fieldPrecision)) << endl; } @@ -241,8 +242,8 @@ static bool printParametersInfo(ostream& text, const ChunkContainer& container) text << " " << setw(alignment) << fieldName.c_str() - << setw(alignment) << toString(SamplerType(fieldType)) - << setw(10) << toString(Precision(fieldPrecision)) + << setw(shortAlignment) << toString(SamplerType(fieldType)) + << setw(shortAlignment) << toString(Precision(fieldPrecision)) << toString(SamplerFormat(fieldFormat)) << endl; }