Add column to location logs

This option can be enabled using the new --error-column option to the command line utility.
It can also be enabled programatically.
This commit is contained in:
Antoine 2024-07-20 00:37:58 +02:00 committed by GitHub
parent 52f68dc6b2
commit dc9f6f61ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 77 additions and 11 deletions

View file

@ -110,6 +110,7 @@ enum TOptions : uint64_t {
EOptionInvertY = (1ull << 30),
EOptionDumpBareVersion = (1ull << 31),
EOptionCompileOnly = (1ull << 32),
EOptionDisplayErrorColumn = (1ull << 33),
};
bool targetHlslFunctionality1 = false;
bool SpvToolsDisassembler = false;
@ -898,6 +899,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
Options |= EOptionDumpVersions;
} else if (lowerword == "no-link") {
Options |= EOptionCompileOnly;
} else if (lowerword == "error-column") {
Options |= EOptionDisplayErrorColumn;
} else if (lowerword == "help") {
usage();
break;
@ -1164,6 +1167,8 @@ void SetMessageOptions(EShMessages& messages)
messages = (EShMessages)(messages | EShMsgEnhanced);
if (AbsolutePath)
messages = (EShMessages)(messages | EShMsgAbsolutePath);
if (Options & EOptionDisplayErrorColumn)
messages = (EShMessages)(messages | EShMsgDisplayErrorColumn);
}
//
@ -2024,6 +2029,7 @@ void usage()
" shaders compatible with DirectX\n"
" --invert-y | --iy invert position.Y output in vertex shader\n"
" --enhanced-msgs print more readable error messages (GLSL only)\n"
" --error-column display the column of the error along the line\n"
" --keep-uncalled | --ku don't eliminate uncalled functions\n"
" --nan-clamp favor non-NaN operand in min, max, and clamp\n"
" --no-storage-format | --nsf use Unknown image format\n"