Add memory synchronization tests - multiple write then multiple read

The change adds multiple write then multiple read tests for gpu memory
synchronization test. It covers all common usages: write into storage
buffers, then read the data as vertices, indices, and uniforms.

The different usages are done via separate buffers, and one mixed buffer
via two tests.

I added two uniform buffers/usages in these two tests. I will replace one
uniform buffer by readonly storage buffer later. Then all readonly usages
will be covered. So it is also useful to verify the upcoming implementation
on backend for readonly storage buffer.

BUG=dawn:275

Change-Id: Ifbe086f55064e7b26cfc42ebc9c56edaf7e9d5a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13940
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Yunchao He
2019-11-28 18:55:45 +00:00
committed by Commit Bot service account
parent 0625ae2167
commit 40b10e4d65
2 changed files with 310 additions and 4 deletions

View File

@@ -108,8 +108,8 @@ namespace utils {
BindingInitializationHelper(uint32_t binding, const wgpu::TextureView& textureView);
BindingInitializationHelper(uint32_t binding,
const wgpu::Buffer& buffer,
uint64_t offset,
uint64_t size);
uint64_t offset = 0,
uint64_t size = wgpu::kWholeSize);
wgpu::BindGroupBinding GetAsBinding() const;