Skip to content
Commit 6ba4ce97 authored by Caio Oliveira's avatar Caio Oliveira Committed by Juan A. Suarez Romero
Browse files

spirv: Fix stride calculation when lowering Workgroup to offsets



Use alignment to calculate the stride associated with the pointer
types.  That stride is used when the pointers are casted to arrays.

Note that size alone is not sufficient, e.g. struct { vec2 a; vec1 b;
} will have element an element size of 12 bytes, but the stride needs
to be 16 bytes to respect the 8 byte alignment.

Fixes: 050eb638 "spirv: Ignore ArrayStride in OpPtrAccessChain for Workgroup"
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 026cfa10)
parent f2450742
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment