From d67544797e54d3866f378c2a7c05181db552f125 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Tue, 23 Feb 2021 20:30:39 +0000 Subject: [PATCH] Fix the ComputeBoids sample on the OpenGL backend. Having the [[block]] decorator on the nested Particle struct causes SPIRV-Cross to not emit it (see bug). Removing the decorator from the Particle while leaving it on the top-level struct works fine. This fixes the issue, but validation should be added to Tint to catch the problem (this work is tracked in https://bugs.chromium.org/p/tint/issues/detail?id=320). Bug: dawn:611 Change-Id: I8bef811e314ed758f805247977f8b129477abd39 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42300 Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Stephen White --- examples/ComputeBoids.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ComputeBoids.cpp b/examples/ComputeBoids.cpp index c8f4f9d55f..cb437d9911 100644 --- a/examples/ComputeBoids.cpp +++ b/examples/ComputeBoids.cpp @@ -150,7 +150,7 @@ void initRender() { void initSim() { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( - [[block]] struct Particle { + struct Particle { [[offset(0)]] pos : vec2; [[offset(8)]] vel : vec2; };