dawn-cmake/src/dawn_native/null
Jiawei Shao 80f927d763 Implement buffer lazy initialization before writeBuffer
This patch implements buffer lazy initialization before writeBuffer():
if the buffer is not initialized and writeBuffer() doesn't cover the
whole buffer, the buffer will be cleared to 0, otherwise the buffer
shouldn't be cleared.

This patch also introduces a toggle LazyClearBufferOnFirstUse for the
development of buffer lazy initialization: before buffer lazy
initialization being completely supported, all the related code will
only be enabled behind this toggle to prevent the buffers with valid
content being unexpectedly cleared.

BUG=dawn:414
TEST=dawn_end2end_tests

Change-Id: I99a2aa98ca4b9b21d69c6b32080afb525e2c4ad3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24041
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-07-06 08:24:30 +00:00
..
DeviceNull.cpp Implement buffer lazy initialization before writeBuffer 2020-07-06 08:24:30 +00:00
DeviceNull.h Null: Make Increment/DecrementMemoryUsage use uint64_t. 2020-06-29 20:03:16 +00:00
NullBackend.cpp Make dawn_native public headers and dawn_wsi use webgpu.h 2019-10-24 23:55:37 +00:00