[Bf-blender-cvs] [a55bbedc063] tmp-vulkan: Merge branch 'master' into tmp-vulkan
Jeroen Bakker
noreply at git.blender.org
Tue Jun 29 09:59:40 CEST 2021
Commit: a55bbedc063a13b8e3c0c2f161b6f1e7030d18b2
Author: Jeroen Bakker
Date: Tue Jun 29 09:59:34 2021 +0200
Branches: tmp-vulkan
https://developer.blender.org/rBa55bbedc063a13b8e3c0c2f161b6f1e7030d18b2
Merge branch 'master' into tmp-vulkan
===================================================================
===================================================================
diff --cc source/blender/gpu/vulkan/vk_shader_log.cc
index 4a5e752a0cb,00000000000..2958adef903
mode 100644,000000..100644
--- a/source/blender/gpu/vulkan/vk_shader_log.cc
+++ b/source/blender/gpu/vulkan/vk_shader_log.cc
@@@ -1,65 -1,0 +1,65 @@@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2021 Blender Foundation.
+ * All rights reserved.
+ */
+
+/** \file
+ * \ingroup gpu
+ */
+
+#include "vk_shader.hh"
+
+#include "GPU_platform.h"
+
+namespace blender::gpu {
+
+char *VKLogParser::parse_line(char *log_line, GPULogItem &log_item)
+{
+ log_line = skip_name_and_stage(log_line);
- log_line = skip_separator(log_line, ':');
++ log_line = skip_separators(log_line, ":");
+
+ /* Parse error line & char numbers. */
- if (log_line[0] >= '0' && log_line[0] <= '9') {
++ if (at_number(log_line)) {
+ char *error_line_number_end;
- log_item.cursor.row = (int)strtol(log_line, &error_line_number_end, 10);
++ log_item.cursor.row = parse_number(log_line, &error_line_number_end);
+ log_line = error_line_number_end;
+ }
- log_line = skip_separators(log_line, ':', ' ');
++ log_line = skip_separators(log_line, ": ");
+
+ /* Skip to message. Avoid redundant info. */
+ log_line = skip_severity_keyword(log_line, log_item);
- log_line = skip_separators(log_line, ':', ' ');
++ log_line = skip_separators(log_line, ": ");
+
+ return log_line;
+}
+
+char *VKLogParser::skip_name_and_stage(char *log_line)
+{
+ char *name_skip = skip_until(log_line, '.');
+ if (name_skip == log_line) {
+ return log_line;
+ }
+
+ return skip_until(name_skip, ':');
+}
+
+char *VKLogParser::skip_severity_keyword(char *log_line, GPULogItem &log_item)
+{
+ return skip_severity(log_line, log_item, "error", "warning");
+}
+
+} // namespace blender::gpu
More information about the Bf-blender-cvs
mailing list