mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
Implement buffer lazy initialization before CopyBufferToTexture()
This patch adds the check and implementations of buffer lazy initialization before CopyBufferToTexture(). The support of buffer lazy initialization before CopyTextureToBuffer() is much more complicated than what we do for CopyBufferToTexture(), so we decide to put it in another CL instead of writing them together with CopyBufferToTexture(). BUG=dawn:414 TEST=dawn_end2end_tests Change-Id: I45fdcdde2c9a0dafff23623815fc35c877990ef1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25140 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
1233b66c90
commit
d0dd661f18
@@ -518,6 +518,8 @@ namespace dawn_native { namespace opengl {
|
||||
GLenum target = texture->GetGLTarget();
|
||||
const GLFormat& format = texture->GetGLFormat();
|
||||
|
||||
buffer->EnsureDataInitialized();
|
||||
|
||||
ASSERT(texture->GetDimension() == wgpu::TextureDimension::e2D);
|
||||
SubresourceRange subresources = {dst.mipLevel, 1, dst.origin.z,
|
||||
copy->copySize.depth};
|
||||
|
||||
Reference in New Issue
Block a user