From a0b31e04e80a8d28d72d2e6deab622603d68ced1 Mon Sep 17 00:00:00 2001 From: James Price Date: Mon, 28 Jun 2021 08:38:28 +0000 Subject: [PATCH] Add missing structure padding to test WGSL specifies that the size of a host-shareable structure is a multiple of the largest alignment of any member in that structure. While SPIR-V cross doesn't generate this trailing padding, Tint does, and so we need to pad the host structure to match to avoid validation errors. Bug: dawn:571 Change-Id: Id5de89125a74c0469ae69d6e86b4c570bbdb31ab Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56120 Commit-Queue: Corentin Wallez Auto-Submit: James Price Reviewed-by: Corentin Wallez --- src/tests/end2end/GpuMemorySynchronizationTests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index 4989ce1baf..d125857e4e 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -668,6 +668,7 @@ TEST_P(MultipleWriteThenMultipleReadTests, OneBuffer) { float color0; char padding2[256 - sizeof(float)]; float color1; + char padding3[256 - sizeof(float)]; }; wgpu::Buffer buffer = CreateZeroedBuffer( sizeof(Data), wgpu::BufferUsage::Vertex | wgpu::BufferUsage::Index |