diff --git a/source/blender/gpu/glsl_preprocess/glsl_preprocess.hh b/source/blender/gpu/glsl_preprocess/glsl_preprocess.hh index 0f37b377b20..da8cc5bfc58 100644 --- a/source/blender/gpu/glsl_preprocess/glsl_preprocess.hh +++ b/source/blender/gpu/glsl_preprocess/glsl_preprocess.hh @@ -212,6 +212,9 @@ class Preprocessor { } str = remove_comments(str, report_error); threadgroup_variables_parsing(str); + if (language == BLENDER_GLSL || language == CPP) { + str = disabled_code_mutation(str, report_error); + } parse_builtins(str, filename); if (language == BLENDER_GLSL || language == CPP) { if (do_parse_function) { @@ -221,7 +224,6 @@ class Preprocessor { pragma_runtime_generated_parsing(str); pragma_once_linting(str, filename, report_error); } - str = disabled_code_mutation(str, report_error); str = include_parse_and_remove(str, report_error); str = pragmas_mutation(str, report_error); str = swizzle_function_mutation(str, report_error);