Support lazy initialization on the buffers bound into a bind group

BUG=dawn:414

Change-Id: Ice592d6427747941406431709999d08778f0f221
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao
2020-07-30 08:20:17 +00:00
committed by Commit Bot service account
parent 03cf7c3eae
commit a36a91a445
5 changed files with 193 additions and 21 deletions

View File

@@ -462,6 +462,10 @@ namespace dawn_native { namespace opengl {
texture->EnsureSubresourceContentInitialized(texture->GetAllSubresources());
}
}
for (BufferBase* bufferBase : usages.buffers) {
ToBackend(bufferBase)->EnsureDataInitialized();
}
};
const std::vector<PassResourceUsage>& passResourceUsages = GetResourceUsages().perPass;