Closed Crisspl closed 3 years ago
I see a problem that
if (isDummyObjectForCacheAliasing) return;
is used an an "early out" on all
convertToDummyObject
Now because the call is recursive (goes through children) and whether a child is converted depends on its mutability state... this means that just because it was called before on an asset, won't guarantee that a second call is not going to produce side-effects.
This logic was broken even before mutability concerns, when we first introduced the recursion depth parameter.
this if
doesn't concern mutability at all. However I see your point.. for example at first I call converttodummy(0) and after that converttodummy (2). And levels 1 and 2 won't be converted then
TODO:
nullptr
etc.assert(false)
const_cast
in CPU2GPU converter (so that const getters can be used)All done
I see a problem that
is used an an "early out" on all
convertToDummyObject
Now because the call is recursive (goes through children) and whether a child is converted depends on its mutability state... this means that just because it was called before on an asset, won't guarantee that a second call is not going to produce side-effects.
This logic was broken even before mutability concerns, when we first introduced the recursion depth parameter.