From 8fb6b514104c8f075c49e52779413d3ff71077ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cle=CC=81ment=20Foucault?= Date: Tue, 16 May 2023 12:54:19 +0200 Subject: [PATCH] GPU: Fix false positive include of debug_draw This created unfulfilled resources binds that would trigger an assert when running with Metal Backend. --- source/blender/gpu/intern/gpu_shader_dependency.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index 8c8189f5460..5c870730810 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -111,6 +111,8 @@ struct GPUSource { string_preprocess(); } if ((source.find("drw_debug_") != StringRef::not_found) && + /* Avoid this file as it is a false positive match (matches "drw_debug_print_buf"). */ + filename != "draw_debug_print_display_vert.glsl" && /* Avoid these two files where it makes no sense to add the dependency. */ !ELEM(filename, "common_debug_draw_lib.glsl", "draw_debug_draw_display_vert.glsl")) {