Skip to content

spirv: Fix stride calculation when lowering Workgroup to offsets

Caio Oliveira requested to merge cmarcelo/mesa:r/spirv-workgroup-fix into master

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"

Edited by Caio Oliveira

Merge request reports