xref: /aosp_15_r20/external/skia/tests/sksl/spirv/Ossfuzz65538.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1### Compilation failed:
2
3error: SPIR-V validation error: Variables can not have a function[7] storage class outside of a function
4  %4 = OpVariable %_ptr_Function_InterfaceBlockA Function
5
6               OpCapability Shader
7          %1 = OpExtInstImport "GLSL.std.450"
8               OpMemoryModel Logical GLSL450
9               OpEntryPoint Fragment %main "main" %sk_FragCoord
10               OpExecutionMode %main OriginUpperLeft
11               OpName %InterfaceBlockA "InterfaceBlockA"
12               OpMemberName %InterfaceBlockA 0 "a"
13               OpMemberName %InterfaceBlockA 1 "u_skRTFlip"
14               OpName %InterfaceBlockB "InterfaceBlockB"
15               OpMemberName %InterfaceBlockB 0 "b"
16               OpName %sk_FragCoord "sk_FragCoord"
17               OpName %main "main"
18               OpMemberDecorate %InterfaceBlockA 0 Offset 0
19               OpMemberDecorate %InterfaceBlockA 1 Offset 16384
20               OpDecorate %InterfaceBlockA Block
21               OpMemberDecorate %InterfaceBlockB 0 Offset 0
22               OpDecorate %InterfaceBlockB Block
23               OpDecorate %sk_FragCoord BuiltIn FragCoord
24        %int = OpTypeInt 32 1
25      %float = OpTypeFloat 32
26    %v2float = OpTypeVector %float 2
27%InterfaceBlockA = OpTypeStruct %int %v2float
28%_ptr_Function_InterfaceBlockA = OpTypePointer Function %InterfaceBlockA
29          %4 = OpVariable %_ptr_Function_InterfaceBlockA Function
30%InterfaceBlockB = OpTypeStruct %int
31%_ptr_Function_InterfaceBlockB = OpTypePointer Function %InterfaceBlockB
32         %10 = OpVariable %_ptr_Function_InterfaceBlockB Function
33    %v4float = OpTypeVector %float 4
34%_ptr_Input_v4float = OpTypePointer Input %v4float
35%sk_FragCoord = OpVariable %_ptr_Input_v4float Input
36       %void = OpTypeVoid
37         %17 = OpTypeFunction %void
38       %main = OpFunction %void None %17
39         %18 = OpLabel
40               OpReturn
41               OpFunctionEnd
42
431 error
44