Cycles HIP RT glass BSDF artifacts #109418
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: AMD Radeon RX 7900 XTX ATI Technologies Inc. 4.5.0 Core Profile Context 22.214.171.124523
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash:
Exact steps for others to reproduce the error
Simply open the blender file here and render it with HIP RT.
I can confirm this behavior with an RX 6800 XT.
After further testing, I found that the Glass BSDF shader is broken. Replacing the glass shader with a Principled BSDF fixes the issue with some minor visual changes.
Does it work correctly with this driver? https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-40-51-06-blender-3-6-beta
The driver does not fix the issue
It also didn't fix the issue in #109421
Our QA did some bisection, it looks like the issue cropped up after this change: https://projects.blender.org/blender/blender/commit/4e104d77c701 @LukasStockner tagging you here as well. Do you have any insight?
So we need to figure out if there is some AMD side compiler issue or what with that.
Looking at this commit, I don't see anything new that should cause this. Since it works on other GPUs, if it's a bug in the Cycles code I would expect an uninitialized variable or other undefined behavior, or maybe some difference in math functions or other HIP abstraction. But it's not clear to me where that would happen in this commit, I could not find a likely cause.
So I suspect a compiler bug, but it's difficult to be sure.
To pinpoint the exact cause, I think the next step is to "bisect" the code changes in this commit, to identify exactly which ones cause this.
TLDR: Kernels were not being updated when the code changed. #110073 fixes this. Use the nightly or 4.0 alpha build
We did some testing and here's what we found:
3.6 release build from Blender.org - ARTIFACTS
3.6.1 build from blender.org - FINE
4.0 alpha build from blender.org - FINE
Local builds, 3.6 or 4.0 branch - FINE
It seemed like there was a bad kernel being built, either from a SDK mismatch or something else. @brecht figured out that the kernels were not being marked as "dirty" and rebuilt when the source for them changed. See #110073. So what happened here is @LukasStockner changed the kernel code but the HIPRT kernels were not rebuilt (not his fault at all), so they mismatched Blender.
At any rate thanks everyone for helping find this. You can use a nightly build of 3.6 or 4.0 alpha and should fix the issue.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?