Vulkan: Detect Vulkan Incompatibility When Running OpenGL/MTL
Now that all shaders have been converted to be Vulkan Compatible it is safe to test for incompatibility when running in OpenGL or MTL. This detection is only done when blender is compiled in debug mode.
This commit is contained in:
@@ -232,6 +232,14 @@ std::string ShaderCreateInfo::check_error() const
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!this->is_vulkan_compatible()) {
|
||||
error += this->name_ +
|
||||
" contains a stage interface using an instance name and mixed interpolation modes. "
|
||||
"This is not compatible with Vulkan and need to be adjusted.\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -663,11 +663,6 @@ bool VKShader::finalize(const shader::ShaderCreateInfo *info)
|
||||
if (compilation_failed_) {
|
||||
return false;
|
||||
}
|
||||
#if DEBUG
|
||||
if (!info->is_vulkan_compatible()) {
|
||||
std::cout << "'" << info->name_ << "' stage interfaces are not compatible with Vulkan.\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
VKShaderInterface *vk_interface = new VKShaderInterface();
|
||||
vk_interface->init(*info);
|
||||
|
||||
Reference in New Issue
Block a user