Geometry Nodes: better devirtualization for sliced virtual arrays
Under some circumstances that can lead to more than a 2x performance increase, because math nodes can better optimize for the case when the slice is a single value or span.
This commit is contained in:
parent
2cda65a35a
commit
6b5e1cfaca
Notes:
blender-bot
2023-02-14 08:42:53 +01:00
Referenced by commit 63342861e7
, Fix: error in previous commit
Referenced by issue #91944, Switching in and out of local view in rendered mode in Cycles can cause a crash in heavy scenes
|
@ -496,6 +496,24 @@ class GVArrayImpl_For_SlicedGVArray : public GVArrayImpl {
|
|||
{
|
||||
varray_.get_to_uninitialized(index + offset_, r_value);
|
||||
}
|
||||
|
||||
bool is_span() const override
|
||||
{
|
||||
return varray_.is_span();
|
||||
}
|
||||
GSpan get_internal_span() const override
|
||||
{
|
||||
return varray_.get_internal_span();
|
||||
}
|
||||
|
||||
bool is_single() const override
|
||||
{
|
||||
return varray_.is_single();
|
||||
}
|
||||
void get_internal_single(void *r_value) const override
|
||||
{
|
||||
varray_.get_internal_single(r_value);
|
||||
}
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue