GPU: GLSL preprocess: Remove invalidly processed header
Add assert in the preprocessor that these file don't get processed.
This commit is contained in:
@@ -605,7 +605,6 @@ set(GLSL_SRC
|
||||
intern/shaders/draw_command_generate_comp.glsl
|
||||
intern/shaders/draw_debug_draw_display_frag.glsl
|
||||
intern/shaders/draw_debug_draw_display_vert.glsl
|
||||
intern/shaders/draw_debug_info.hh
|
||||
intern/shaders/draw_debug_print_display_frag.glsl
|
||||
intern/shaders/draw_debug_print_display_vert.glsl
|
||||
intern/shaders/draw_intersect_lib.glsl
|
||||
|
||||
@@ -58,6 +58,14 @@ int main(int argc, char **argv)
|
||||
error++;
|
||||
};
|
||||
|
||||
const bool is_info = std::string(output_file_name).find("info.hh") != std::string::npos;
|
||||
|
||||
if (is_info) {
|
||||
std::cerr << "File " << output_file_name
|
||||
<< " is a create info file and should not be processed as glsl" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
blender::gpu::shader::Preprocessor processor;
|
||||
|
||||
output_file << processor.process(buffer.str(), report_error);
|
||||
|
||||
Reference in New Issue
Block a user