[Bf-blender-cvs] [75cb4850f0] master: Cycles: Use 1-based line number for #line directives

Sergey Sharybin noreply at git.blender.org
Wed Mar 8 12:45:48 CET 2017


Commit: 75cb4850f098cb5a1306d661477f67bca3dcd4b0
Author: Sergey Sharybin
Date:   Wed Mar 8 12:45:18 2017 +0100
Branches: master
https://developer.blender.org/rB75cb4850f098cb5a1306d661477f67bca3dcd4b0

Cycles: Use 1-based line number for #line directives

AMD CPU platform was complaining about #line 0 directives in the code.

===================================================================

M	intern/cycles/util/util_path.cpp

===================================================================

diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 5df262fcbb..1b2e8aace5 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -814,7 +814,7 @@ string path_source_replace_includes(const string& source,
 						/* Use line directives for better error messages. */
 						line = line_directive(filepath, 1)
 						     + token.replace(0, n_end + 1, "\n" + text + "\n")
-						     + line_directive(path_join(path, source_filename), i);
+						     + line_directive(path_join(path, source_filename), i + 1);
 					}
 				}
 			}




More information about the Bf-blender-cvs mailing list