diff --git a/filament/src/ds/DescriptorSet.cpp b/filament/src/ds/DescriptorSet.cpp index 9d41b20a33f..caa433ad46c 100644 --- a/filament/src/ds/DescriptorSet.cpp +++ b/filament/src/ds/DescriptorSet.cpp @@ -149,7 +149,7 @@ void DescriptorSet::setSampler( DescriptorSet DescriptorSet::duplicate(DescriptorSetLayout const& layout) const noexcept { DescriptorSet set{layout}; - memcpy(set.mDescriptors.data(), mDescriptors.data(), mDescriptors.size() * sizeof(Desc)); + set.mDescriptors = mDescriptors; // Use the vector's assignment operator set.mDirty = mDirty; set.mValid = mValid; return set;