Refactor: Cycles: Use logging system for GPU error print

Pull Request: https://projects.blender.org/blender/blender/pulls/142257
This commit is contained in:
Brecht Van Lommel
2025-07-17 21:14:30 +02:00
committed by Brecht Van Lommel
parent 6f8eb2a1af
commit df6d6c0932
3 changed files with 6 additions and 9 deletions

View File

@@ -49,9 +49,8 @@ void CUDADevice::set_error(const string &error)
Device::set_error(error);
if (first_error) {
fprintf(stderr, "\nRefer to the Cycles GPU rendering documentation for possible solutions:\n");
fprintf(stderr,
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n\n");
LOG_ERROR << "Refer to the Cycles GPU rendering documentation for possible solutions:\n"
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n";
first_error = false;
}
}

View File

@@ -48,9 +48,8 @@ void HIPDevice::set_error(const string &error)
Device::set_error(error);
if (first_error) {
fprintf(stderr, "\nRefer to the Cycles GPU rendering documentation for possible solutions:\n");
fprintf(stderr,
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n\n");
LOG_ERROR << "Refer to the Cycles GPU rendering documentation for possible solutions:\n"
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n";
first_error = false;
}
}

View File

@@ -60,9 +60,8 @@ void MetalDevice::set_error(const string &error)
Device::set_error(error);
if (!has_error) {
fprintf(stderr, "\nRefer to the Cycles GPU rendering documentation for possible solutions:\n");
fprintf(stderr,
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n\n");
LOG_ERROR << "Refer to the Cycles GPU rendering documentation for possible solutions:\n"
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n";
has_error = true;
}
}