|
@@ -1351,7 +1351,13 @@ Error ShaderCompilerRD::compile(RS::ShaderMode p_mode, const String &p_code, Ide
|
|
if (err != OK) {
|
|
if (err != OK) {
|
|
Vector<String> shader = p_code.split("\n");
|
|
Vector<String> shader = p_code.split("\n");
|
|
for (int i = 0; i < shader.size(); i++) {
|
|
for (int i = 0; i < shader.size(); i++) {
|
|
- print_line(itos(i + 1) + " " + shader[i]);
|
|
|
|
|
|
+ if (i + 1 == parser.get_error_line()) {
|
|
|
|
+ // Mark the error line to be visible without having to look at
|
|
|
|
+ // the trace at the end.
|
|
|
|
+ print_line(vformat("E%4d-> %s", i + 1, shader[i]));
|
|
|
|
+ } else {
|
|
|
|
+ print_line(vformat("%5d | %s", i + 1, shader[i]));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
_err_print_error(nullptr, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);
|
|
_err_print_error(nullptr, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);
|