GPU: GLSL preprocess: Remove invalidly processed header

Add assert in the preprocessor that these file don't get
processed.
This commit is contained in:
Clément Foucault
2024-10-12 13:46:26 +02:00
parent 1bc3c24f45
commit d9aad850b0
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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);