clover/spirv: fix vec3 alignment
authorKarol Herbst <kherbst@redhat.com>
Mon, 31 Aug 2020 19:21:02 +0000 (21:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 18:47:30 +0000 (18:47 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

src/gallium/frontends/clover/spirv/invocation.cpp

index 489bb62dde92a00d856eb74c7161f0755b3eecfb..c3404f38b802cce9ee8d68e07665c8dfb10ac5cc 100644 (file)
@@ -257,7 +257,8 @@ namespace {
             const auto elem_size = types_iter->second.size;
             const auto elem_nbs = get<uint32_t>(inst, 3);
             const auto size = elem_size * elem_nbs;
-            types[id] = { module::argument::scalar, size, size, size,
+            const auto align = elem_size * util_next_power_of_two(elem_nbs);
+            types[id] = { module::argument::scalar, size, size, align,
                           module::argument::zero_ext };
             break;
          }