skia2/resources/sksl/spirv
Brian Osman 2a4c0fbdca Improve memory layout handling in SPIRV generator
Added asserts that verify we don't try to emit the same struct or array
with two different memory layout rules. Some code paths were failing to
inspect the associated variable, leading to incorrect errors about the
attached offsets of members.

Added a test case that triggered that error, and also triggers the new
asserts.

Then, fixed the underlying cause: writing out the struct definition as a
side effect of accessing a member in getLValue().

Bug: skia:11205
Change-Id: I6e5fb76ea918ec9ff10425f2d519ddbc54404b27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357436
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-01-22 22:16:48 +00:00
..
ConstantVectorFromVector.sksl
InterfaceBlockPushConstant.sksl
LayoutMultipleOf4.sksl
LayoutOutOfOrder.sksl
OpaqueTypeInArray.sksl