blob: e06c2d67420166ca3e0eaf928591e45d634038e8 [file] [log] [blame]
John Stiles0de76f72021-01-29 09:19:39 -05001### Compilation failed:
2
3error: SPIR-V validation error: Uniform OpVariable <id> '10[%colorWhite]' has illegal type.
4From Vulkan spec, section 14.5.2:
5Variables identified with the Uniform storage class are used to access transparent buffer backed resources. Such variables must be typed as OpTypeStruct, or an array of this type
6 %colorWhite = OpVariable %_ptr_Uniform_v4float Uniform
7
John Stilesdac139a2021-01-26 11:06:42 -05008OpCapability Shader
9%1 = OpExtInstImport "GLSL.std.450"
10OpMemoryModel Logical GLSL450
John Stiles4d6310a2021-01-26 19:58:22 -050011OpEntryPoint Fragment %_entrypoint "_entrypoint" %sk_FragColor %sk_Clockwise
12OpExecutionMode %_entrypoint OriginUpperLeft
13OpName %sk_FragColor "sk_FragColor"
John Stilesdac139a2021-01-26 11:06:42 -050014OpName %sk_Clockwise "sk_Clockwise"
John Stiles0de76f72021-01-29 09:19:39 -050015OpName %colorWhite "colorWhite"
John Stiles4d6310a2021-01-26 19:58:22 -050016OpName %_entrypoint "_entrypoint"
John Stilesdac139a2021-01-26 11:06:42 -050017OpName %main "main"
18OpName %x "x"
19OpName %r "r"
20OpName %b "b"
John Stiles4d6310a2021-01-26 19:58:22 -050021OpDecorate %sk_FragColor RelaxedPrecision
22OpDecorate %sk_FragColor Location 0
23OpDecorate %sk_FragColor Index 0
John Stilesdac139a2021-01-26 11:06:42 -050024OpDecorate %sk_Clockwise RelaxedPrecision
25OpDecorate %sk_Clockwise BuiltIn FrontFacing
John Stiles0de76f72021-01-29 09:19:39 -050026OpDecorate %colorWhite RelaxedPrecision
27OpDecorate %colorWhite DescriptorSet 0
28OpDecorate %21 RelaxedPrecision
29OpDecorate %30 RelaxedPrecision
30OpDecorate %34 RelaxedPrecision
31OpDecorate %40 RelaxedPrecision
32OpDecorate %45 RelaxedPrecision
33OpDecorate %46 RelaxedPrecision
34OpDecorate %53 RelaxedPrecision
35OpDecorate %55 RelaxedPrecision
John Stilesdac139a2021-01-26 11:06:42 -050036OpDecorate %58 RelaxedPrecision
John Stiles0de76f72021-01-29 09:19:39 -050037OpDecorate %65 RelaxedPrecision
38OpDecorate %66 RelaxedPrecision
39OpDecorate %67 RelaxedPrecision
John Stiles4d6310a2021-01-26 19:58:22 -050040%float = OpTypeFloat 32
41%v4float = OpTypeVector %float 4
42%_ptr_Output_v4float = OpTypePointer Output %v4float
43%sk_FragColor = OpVariable %_ptr_Output_v4float Output
John Stilesdac139a2021-01-26 11:06:42 -050044%bool = OpTypeBool
45%_ptr_Input_bool = OpTypePointer Input %bool
46%sk_Clockwise = OpVariable %_ptr_Input_bool Input
John Stilesacba3042021-01-28 15:11:39 -050047%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
John Stiles0de76f72021-01-29 09:19:39 -050048%colorWhite = OpVariable %_ptr_Uniform_v4float Uniform
49%void = OpTypeVoid
50%14 = OpTypeFunction %void
51%17 = OpTypeFunction %v4float
52%_ptr_Function_v4float = OpTypePointer Function %v4float
John Stilesdac139a2021-01-26 11:06:42 -050053%_ptr_Function_float = OpTypePointer Function %float
54%float_n5 = OpConstant %float -5
55%float_5 = OpConstant %float 5
John Stilesdac139a2021-01-26 11:06:42 -050056%float_0 = OpConstant %float 0
John Stilesb41d5bb2021-01-26 16:28:12 -050057%float_1 = OpConstant %float 1
John Stiles0de76f72021-01-29 09:19:39 -050058%int = OpTypeInt 32 1
59%int_0 = OpConstant %int 0
John Stilesdac139a2021-01-26 11:06:42 -050060%int_2 = OpConstant %int 2
61%int_1 = OpConstant %int 1
John Stiles0de76f72021-01-29 09:19:39 -050062%_entrypoint = OpFunction %void None %14
63%15 = OpLabel
64%16 = OpFunctionCall %v4float %main
65OpStore %sk_FragColor %16
John Stiles4d6310a2021-01-26 19:58:22 -050066OpReturn
67OpFunctionEnd
John Stiles0de76f72021-01-29 09:19:39 -050068%main = OpFunction %v4float None %17
69%18 = OpLabel
John Stilesdac139a2021-01-26 11:06:42 -050070%x = OpVariable %_ptr_Function_v4float Function
71%r = OpVariable %_ptr_Function_float Function
72%b = OpVariable %_ptr_Function_float Function
John Stiles0de76f72021-01-29 09:19:39 -050073%21 = OpLoad %v4float %colorWhite
74OpStore %x %21
John Stilesdac139a2021-01-26 11:06:42 -050075OpStore %r %float_n5
John Stiles0de76f72021-01-29 09:19:39 -050076OpBranch %25
77%25 = OpLabel
78OpLoopMerge %29 %28 None
79OpBranch %26
80%26 = OpLabel
81%30 = OpLoad %float %r
82%32 = OpFOrdLessThan %bool %30 %float_5
83OpBranchConditional %32 %27 %29
84%27 = OpLabel
85%34 = OpLoad %float %r
86%33 = OpExtInst %float %1 FClamp %34 %float_0 %float_1
87%37 = OpAccessChain %_ptr_Function_float %x %int_0
88OpStore %37 %33
89%40 = OpLoad %v4float %x
90%41 = OpCompositeExtract %float %40 0
91%42 = OpFOrdEqual %bool %41 %float_0
92OpSelectionMerge %44 None
93OpBranchConditional %42 %43 %44
94%43 = OpLabel
95OpBranch %29
96%44 = OpLabel
97OpBranch %28
98%28 = OpLabel
99%45 = OpLoad %float %r
100%46 = OpFAdd %float %45 %float_1
101OpStore %r %46
102OpBranch %25
103%29 = OpLabel
John Stiles4d6310a2021-01-26 19:58:22 -0500104OpStore %b %float_5
John Stiles0de76f72021-01-29 09:19:39 -0500105OpBranch %48
106%48 = OpLabel
107OpLoopMerge %52 %51 None
108OpBranch %49
109%49 = OpLabel
110%53 = OpLoad %float %b
111%54 = OpFOrdGreaterThanEqual %bool %53 %float_0
112OpBranchConditional %54 %50 %52
113%50 = OpLabel
114%55 = OpLoad %float %b
115%56 = OpAccessChain %_ptr_Function_float %x %int_2
116OpStore %56 %55
117%58 = OpLoad %v4float %x
118%59 = OpCompositeExtract %float %58 3
119%60 = OpFOrdEqual %bool %59 %float_1
120OpSelectionMerge %62 None
121OpBranchConditional %60 %61 %62
122%61 = OpLabel
123OpBranch %51
124%62 = OpLabel
125%63 = OpAccessChain %_ptr_Function_float %x %int_1
126OpStore %63 %float_0
John Stiles4d6310a2021-01-26 19:58:22 -0500127OpBranch %51
128%51 = OpLabel
John Stiles0de76f72021-01-29 09:19:39 -0500129%65 = OpLoad %float %b
130%66 = OpFSub %float %65 %float_1
131OpStore %b %66
132OpBranch %48
John Stiles4d6310a2021-01-26 19:58:22 -0500133%52 = OpLabel
John Stiles0de76f72021-01-29 09:19:39 -0500134%67 = OpLoad %v4float %x
135OpReturnValue %67
John Stilesdac139a2021-01-26 11:06:42 -0500136OpFunctionEnd
John Stiles0de76f72021-01-29 09:19:39 -0500137
1381 error