Commit Graph

2 Commits

Author SHA1 Message Date
John Stiles
57a996b4c5 Disallow empty interface blocks in SkSL.
The GLSL grammar appears to require at least one member-declaration in the member-list:
https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.html#interface-blocks

Change-Id: Ic67469272b3d59e7b8764333899f204e95584778
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284418
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-21 20:36:54 +00:00
John Stiles
0ebc69c9ef Fix modulo-by-zero crash during SPIR-V conversion.
Array-stride calculation did not check for zero-sized objects before
performing a modulo. This would lead to undefined behavior (crash)
while attempting to build the AST.

Change-Id: I84b4662978955d49a3ca28f6bb577d15c87cccb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284354
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-18 13:41:40 +00:00