Page MenuHome

Fix T95644: Cycles doesn't update modified object attributes on GPU
ClosedPublic

Authored by Lukas Stockner (lukasstockner97) on Apr 30 2022, 10:23 PM.

Details

Summary

From what I can tell, device_update_preprocess is supposed to detect modified attributes and flag the device_vector for a copy through device_update_flags.

However, since object attributes are only created in device_update_attributes afterwards, they can't be included in that check.

Therefore, I've changed the function that actually updates the device_vector to tag it as modified as soon as its content gets updated.

This fixes the issue, but I'm submitting this as a patch just to make sure that I'm not missing a larger design consideration here.
Also, I feel like with this change, we can actually get rid of the device_update_flags modification tracking altogether?

Diff Detail

Repository
rB Blender
Branch
fix-T95644 (branched from master)
Build Status
Buildable 21915
Build 21915: arc lint + arc unit

Event Timeline

Lukas Stockner (lukasstockner97) created this revision.

As far as I can tell we can indeed use this indeed of modification tracking in device_update_flags.

Can you try removing that code and see if things still work?

This revision is now accepted and ready to land.May 2 2022, 3:07 PM

The code seems reasonable, although not really something where I know every detail.
Getting rid of device_update_flags sounds great, although can/should happen outside of this fix it feels.