Cycles HIP RT glass BSDF artifacts #109418

Closed
opened 2023-06-27 20:37:49 +02:00 by Philipp-Munkes · 8 comments

System Information
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 23.5.2.230523

Blender Version
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb
Worked: Unknown

Short description of error
Rendering Pavillon Barcelona with HIP RT causes the water surface to be rendered incorrectly:
grafik
It renders correctly with HIP:
grafik

Exact steps for others to reproduce the error

Simply open the blender file here and render it with HIP RT.

**System Information** 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 23.5.2.230523 **Blender Version** Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: `c7fc78b81ecb` Worked: Unknown **Short description of error** Rendering Pavillon Barcelona with HIP RT causes the water surface to be rendered incorrectly: ![grafik](/attachments/5c9df395-bb96-47bf-9f95-5360533c4492) It renders correctly with HIP: ![grafik](/attachments/ebc2e9d8-41bd-4f5f-a798-8ca12dfa81c9) **Exact steps for others to reproduce the error** Simply open the blender file [here](https://download.blender.org/demo/test/pabellon_barcelona_v1.scene_.zip) and render it with HIP RT.
Philipp-Munkes added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-06-27 20:37:50 +02:00

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.

HIP RT with Glass BSDF Shader
pavilion_barcelona_rt_glass.jpg

HIP RT with Principled BSDF Shader and the same roughness, IOR and color
pavilion_barcelona_rt_principled.jpg

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. HIP RT with Glass BSDF Shader [![pavilion_barcelona_rt_glass.jpg](/attachments/842798af-088b-4cec-980d-b398ddc632c6)](url) HIP RT with Principled BSDF Shader and the same roughness, IOR and color [![pavilion_barcelona_rt_principled.jpg](/attachments/6fb97876-f299-4a8d-a51a-a2444e49cd4e)](url)
Brecht Van Lommel changed title from Render Issue with HIP RT in Pavillon Barcelona to Cycles HIP RT glass BSDF artifacts 2023-07-04 14:05:03 +02:00
CC @BrianSavery @salipour.
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

image

The driver does not fix the issue It also didn't fix the issue in #109421 ![image](/attachments/6c86452a-25fb-4b08-9ef4-76f8a534bc76)
1.9 MiB

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.

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.
Brian Savery (AMD) self-assigned this 2023-07-10 04:06:38 +02:00

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.

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

Long version:
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.

TLDR: Kernels were not being updated when the code changed. https://projects.blender.org/blender/blender/pulls/110073 fixes this. Use the nightly or 4.0 alpha build Long version: 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 https://projects.blender.org/blender/blender/pulls/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.

Indeed, thanks everyone for investigating this.

Indeed, thanks everyone for investigating this.
Blender Bot added
Status
Archived
and removed
Status
Needs Info from Developers
labels 2023-07-13 23:15:02 +02:00
Brecht Van Lommel added
Status
Resolved
and removed
Status
Archived
labels 2023-07-13 23:15:10 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109418
No description provided.