[require] SPIRV YES GLSL >= 4.50 [vertex shader passthrough] [fragment shader spirv] ; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 7 ; Bound: 41 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" %compat_fragcolor OpExecutionMode %main OriginLowerLeft OpSource GLSL 450 OpDecorate %i Location 0 OpDecorate %i DescriptorSet 0 OpDecorate %i Binding 0 OpDecorate %compat_fragcolor Location 0 %void = OpTypeVoid %3 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 %uint = OpTypeInt 32 0 %uint_130 = OpConstant %uint 130 %_arr_v4float_uint_130 = OpTypeArray %v4float %uint_130 %_ptr_Function__arr_v4float_uint_130 = OpTypePointer Function %_arr_v4float_uint_130 %int = OpTypeInt 32 1 %int_20 = OpConstant %int 20 %float_0 = OpConstant %float 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float %_ptr_UniformConstant_uint = OpTypePointer UniformConstant %uint %i = OpVariable %_ptr_UniformConstant_uint UniformConstant %float_37 = OpConstant %float 37 %float_1 = OpConstant %float 1 %uint_0 = OpConstant %uint 0 %_ptr_Output_v4float = OpTypePointer Output %v4float %compat_fragcolor = OpVariable %_ptr_Output_v4float Output %v3float = OpTypeVector %float 3 %31 = OpConstantComposite %v3float %float_0 %float_0 %float_1 %bool = OpTypeBool %_ptr_Output_float = OpTypePointer Output %float %main = OpFunction %void None %3 %5 = OpLabel %A = OpVariable %_ptr_Function__arr_v4float_uint_130 Function %18 = OpAccessChain %_ptr_Function_float %A %int_20 %uint_1 OpStore %18 %float_0 %21 = OpLoad %uint %i %23 = OpAccessChain %_ptr_Function_float %A %21 %uint_1 OpStore %23 %float_37 %24 = OpLoad %uint %i %27 = OpAccessChain %_ptr_Function_float %A %24 %uint_0 OpStore %27 %float_1 %32 = OpLoad %v4float %compat_fragcolor %33 = OpVectorShuffle %v4float %32 %31 4 1 5 6 OpStore %compat_fragcolor %33 %34 = OpAccessChain %_ptr_Function_float %A %int_20 %uint_1 %35 = OpLoad %float %34 %37 = OpFOrdEqual %bool %35 %float_37 %38 = OpSelect %float %37 %float_1 %float_0 %40 = OpAccessChain %_ptr_Output_float %compat_fragcolor %uint_1 OpStore %40 %38 OpReturn OpFunctionEnd [fragment shader] uniform uint i; void main() { vec4 A[130]; A[20].g = 0; A[i].g = 37; A[i].r = 1; gl_FragColor.rba = vec3(0.0, 0.0, 1.0); gl_FragColor.g = float(A[20].g == 37); } [test] clear color 1.0 0.0 0.0 1.0 clear uniform uint 0 19 draw rect -1 -1 2 2 probe all rgba 0.0 0.0 0.0 1.0 clear uniform uint 0 20 draw rect -1 -1 2 2 probe all rgba 0.0 1.0 0.0 1.0