• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1### Compilation failed:
2
3error: SPIR-V validation error: Uniform id '5' is missing Block or BufferBlock decoration.
4From Vulkan spec, section 14.5.2:
5Such variables must be identified with a Block or BufferBlock decoration
6  %testBlock = OpTypeStruct %float
7
8OpCapability Shader
9%1 = OpExtInstImport "GLSL.std.450"
10OpMemoryModel Logical GLSL450
11OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
12OpExecutionMode %main OriginUpperLeft
13OpName %testBlock "testBlock"
14OpMemberName %testBlock 0 "x"
15OpName %sk_FragColor "sk_FragColor"
16OpName %sk_Clockwise "sk_Clockwise"
17OpName %main "main"
18OpMemberDecorate %testBlock 0 Offset 0
19OpDecorate %_arr_testBlock_int_2 ArrayStride 16
20OpDecorate %_arr_testBlock_int_2 Block
21OpDecorate %3 Binding 123
22OpDecorate %3 DescriptorSet 0
23OpDecorate %sk_FragColor RelaxedPrecision
24OpDecorate %sk_FragColor Location 0
25OpDecorate %sk_FragColor Index 0
26OpDecorate %sk_Clockwise BuiltIn FrontFacing
27OpDecorate %24 RelaxedPrecision
28%float = OpTypeFloat 32
29%testBlock = OpTypeStruct %float
30%int = OpTypeInt 32 1
31%int_2 = OpConstant %int 2
32%_arr_testBlock_int_2 = OpTypeArray %testBlock %int_2
33%_ptr_Uniform__arr_testBlock_int_2 = OpTypePointer Uniform %_arr_testBlock_int_2
34%3 = OpVariable %_ptr_Uniform__arr_testBlock_int_2 Uniform
35%v4float = OpTypeVector %float 4
36%_ptr_Output_v4float = OpTypePointer Output %v4float
37%sk_FragColor = OpVariable %_ptr_Output_v4float Output
38%bool = OpTypeBool
39%_ptr_Input_bool = OpTypePointer Input %bool
40%sk_Clockwise = OpVariable %_ptr_Input_bool Input
41%void = OpTypeVoid
42%17 = OpTypeFunction %void
43%int_1 = OpConstant %int 1
44%int_0 = OpConstant %int 0
45%_ptr_Uniform_float = OpTypePointer Uniform %float
46%main = OpFunction %void None %17
47%18 = OpLabel
48%21 = OpAccessChain %_ptr_Uniform_float %3 %int_1 %int_0
49%23 = OpLoad %float %21
50%24 = OpCompositeConstruct %v4float %23 %23 %23 %23
51OpStore %sk_FragColor %24
52OpReturn
53OpFunctionEnd
54
551 error
56