skia2/tests/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.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
InterfaceBlockPushConstant.asm.frag Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
LayoutMultipleOf4.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
LayoutOutOfOrder.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
OpaqueTypeInArray.asm.frag Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00