diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc index ad6ad7c84c4..cab6f60225f 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.cc +++ b/source/blender/gpu/intern/gpu_shader_create_info.cc @@ -12,6 +12,8 @@ #include "BLI_set.hh" #include "BLI_string_ref.hh" +#include "BKE_global.hh" + #include "GPU_capabilities.h" #include "GPU_context.h" #include "GPU_platform.h" @@ -270,7 +272,16 @@ std::string ShaderCreateInfo::check_error() const } } -#ifndef NDEBUG + if ((G.debug & G_DEBUG_GPU) == 0) { + return error; + } + + /* + * The next check has been disabled. 'eevee_legacy_surface_common_iface' is known to fail. + * The check was added to validate if shader would be able to compile on Vulkan. + * TODO(jbakker): Enable the check after EEVEE is replaced by EEVEE-Next. + */ +#if 0 if (bool(this->builtins_ & (BuiltinBits::BARYCENTRIC_COORD | BuiltinBits::VIEWPORT_INDEX | BuiltinBits::LAYER))) { @@ -282,6 +293,7 @@ std::string ShaderCreateInfo::check_error() const } } } +#endif if (!this->is_vulkan_compatible()) { error += this->name_ + @@ -298,7 +310,6 @@ std::string ShaderCreateInfo::check_error() const } } } -#endif return error; }