Page MenuHome

Cleanup: remove code duplication in cycles light sampling
ClosedPublic

Authored by Weizhen Huang (weizhen) on Dec 8 2022, 1:12 PM.

Details

Summary

There has been an attempt to reorganize this part, however, it seems that didn't compile on HIP, and is reverted in
rBc2dc65dfa4ae60fa5d2c3b0cfe86f99dcb5bf16f. This is another attempt of refactoring. as I have no idea why some things don't work on HIP, it's
best to check whether this compiles on other platforms.
The main changes are creating a new struct named MeshLight that is shared between KernelLightDistribution and KernelLightTreeEmitter,
and a bit of renaming, so that light sampling with or without light tree could call the same function.
Also, I noticed a patch D16714 referring to HIP compilation error. Not sure if it's related, but browsing
https://builder.blender.org/admin/#/builders/30/builds/7826/steps/7/logs/stdio, it didn't work on gfx1102, not gfx9*.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 24976
Build 24976: arc lint + arc unit

Event Timeline

Weizhen Huang (weizhen) requested review of this revision.Dec 8 2022, 1:12 PM
Weizhen Huang (weizhen) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Dec 12 2022, 6:50 PM

Unfortunately this still has the same problem.

This revision now requires changes to proceed.Dec 12 2022, 6:50 PM

I was mistaken, the build actually completes.

This revision is now accepted and ready to land.Dec 12 2022, 9:07 PM