mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-09 06:35:54 +00:00
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 <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
ab204c9d3d
commit
d67544797e
@ -150,7 +150,7 @@ void initRender() {
|
|||||||
|
|
||||||
void initSim() {
|
void initSim() {
|
||||||
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
|
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
[[block]] struct Particle {
|
struct Particle {
|
||||||
[[offset(0)]] pos : vec2<f32>;
|
[[offset(0)]] pos : vec2<f32>;
|
||||||
[[offset(8)]] vel : vec2<f32>;
|
[[offset(8)]] vel : vec2<f32>;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user