From 5bd3a3639f783e3fb677ec3cace14766aaa78006 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Tue, 8 Nov 2022 19:30:47 -0800 Subject: [PATCH] Fix precedence issue Note that this is evidence in favor of https://github.com/gfx-rs/naga/issues/2098 - my code is actually wrong, and it was caught by trying to port it to run in Chrome Canary. --- piet-wgsl/shader/shared/pathtag.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piet-wgsl/shader/shared/pathtag.wgsl b/piet-wgsl/shader/shared/pathtag.wgsl index fed16fd..8e46979 100644 --- a/piet-wgsl/shader/shared/pathtag.wgsl +++ b/piet-wgsl/shader/shared/pathtag.wgsl @@ -63,7 +63,7 @@ fn reduce_tag(tag_word: u32) -> TagMonoid { a += a >> 16u; c.pathseg_offset = a & 0xffu; #ifdef full - c.path_ix = countOneBits(tag_word & (PATH_TAG_PATH) * 0x1010101u); + c.path_ix = countOneBits(tag_word & (PATH_TAG_PATH * 0x1010101u)); c.linewidth_ix = countOneBits(tag_word & (PATH_TAG_LINEWIDTH * 0x1010101u)); #endif return c;