diff --git a/Test/baseResults/size b/Test/baseResults/size new file mode 100644 index 000000000..174f9eff4 --- /dev/null +++ b/Test/baseResults/size @@ -0,0 +1 @@ +1213440 ../build/install/bin/glslangValidator.exe diff --git a/Test/baseResults/web.basic.vert.out b/Test/baseResults/web.basic.vert.out new file mode 100644 index 000000000..cd9805bd1 --- /dev/null +++ b/Test/baseResults/web.basic.vert.out @@ -0,0 +1,65 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 38 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %outv4 %inv4 + OpSource ESSL 310 + OpName %main "main" + OpName %outv4 "outv4" + OpName %inv4 "inv4" + OpName %uBlock "uBlock" + OpMemberName %uBlock 0 "a" + OpMemberName %uBlock 1 "b" + OpMemberName %uBlock 2 "c" + OpName %uInst "uInst" + OpDecorate %outv4 Location 1 + OpDecorate %inv4 Location 2 + OpMemberDecorate %uBlock 0 Offset 0 + OpMemberDecorate %uBlock 1 Offset 16 + OpMemberDecorate %uBlock 2 Offset 32 + OpDecorate %uBlock Block + OpDecorate %uInst DescriptorSet 0 + OpDecorate %uInst Binding 3 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %outv4 = OpVariable %_ptr_Output_v4float Output +%_ptr_Input_v4float = OpTypePointer Input %v4float + %inv4 = OpVariable %_ptr_Input_v4float Input + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 + %uBlock = OpTypeStruct %v4float %v4int %v4uint +%_ptr_Uniform_uBlock = OpTypePointer Uniform %uBlock + %uInst = OpVariable %_ptr_Uniform_uBlock Uniform + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %int_1 = OpConstant %int 1 +%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int + %int_2 = OpConstant %int 2 +%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint + %main = OpFunction %void None %3 + %5 = OpLabel + %12 = OpLoad %v4float %inv4 + %13 = OpExtInst %v4float %1 Normalize %12 + %23 = OpAccessChain %_ptr_Uniform_v4float %uInst %int_0 + %24 = OpLoad %v4float %23 + %25 = OpFMul %v4float %13 %24 + %28 = OpAccessChain %_ptr_Uniform_v4int %uInst %int_1 + %29 = OpLoad %v4int %28 + %30 = OpConvertSToF %v4float %29 + %31 = OpFMul %v4float %25 %30 + %34 = OpAccessChain %_ptr_Uniform_v4uint %uInst %int_2 + %35 = OpLoad %v4uint %34 + %36 = OpConvertUToF %v4float %35 + %37 = OpFMul %v4float %31 %36 + OpStore %outv4 %37 + OpReturn + OpFunctionEnd diff --git a/Test/baseResults/web.builtins.frag.out b/Test/baseResults/web.builtins.frag.out new file mode 100644 index 000000000..2862dc152 --- /dev/null +++ b/Test/baseResults/web.builtins.frag.out @@ -0,0 +1,149 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 69 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord %gl_FragDepth %sc %s2 %sf %c1D %c2D %c4D %c3D %ic1D %ic3D %ic4D + OpExecutionMode %main OriginUpperLeft + OpExecutionMode %main DepthReplacing + OpSource ESSL 310 + OpName %main "main" + OpName %f "f" + OpName %gl_FragCoord "gl_FragCoord" + OpName %gl_FragDepth "gl_FragDepth" + OpName %sc "sc" + OpName %S2 "S2" + OpMemberName %S2 0 "c" + OpMemberName %S2 1 "f" + OpName %s2 "s2" + OpName %sf "sf" + OpName %c1D "c1D" + OpName %c2D "c2D" + OpName %c4D "c4D" + OpName %c3D "c3D" + OpName %ic1D "ic1D" + OpName %ic3D "ic3D" + OpName %ic4D "ic4D" + OpDecorate %f RelaxedPrecision + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %gl_FragDepth BuiltIn FragDepth + OpDecorate %19 RelaxedPrecision + OpDecorate %sc RelaxedPrecision + OpDecorate %sc Location 0 + OpMemberDecorate %S2 0 RelaxedPrecision + OpMemberDecorate %S2 1 RelaxedPrecision + OpDecorate %s2 Location 8 + OpDecorate %30 RelaxedPrecision + OpDecorate %sf RelaxedPrecision + OpDecorate %sf Location 1 + OpDecorate %34 RelaxedPrecision + OpDecorate %c1D RelaxedPrecision + OpDecorate %c1D Location 4 + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %c2D RelaxedPrecision + OpDecorate %c2D Location 5 + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %c4D RelaxedPrecision + OpDecorate %c4D Location 7 + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %c3D RelaxedPrecision + OpDecorate %c3D Location 6 + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %ic1D RelaxedPrecision + OpDecorate %ic1D Flat + OpDecorate %ic1D Location 1 + OpDecorate %ic3D RelaxedPrecision + OpDecorate %ic3D Flat + OpDecorate %ic3D Location 2 + OpDecorate %ic4D RelaxedPrecision + OpDecorate %ic4D Flat + OpDecorate %ic4D Location 3 + OpDecorate %68 RelaxedPrecision + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint = OpTypeInt 32 0 + %uint_1 = OpConstant %uint 1 +%_ptr_Input_float = OpTypePointer Input %float +%_ptr_Output_float = OpTypePointer Output %float +%gl_FragDepth = OpVariable %_ptr_Output_float Output + %v3float = OpTypeVector %float 3 +%_ptr_Output_v3float = OpTypePointer Output %v3float + %sc = OpVariable %_ptr_Output_v3float Output + %S2 = OpTypeStruct %v3float %float +%_ptr_Input_S2 = OpTypePointer Input %S2 + %s2 = OpVariable %_ptr_Input_S2 Input + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Input_v3float = OpTypePointer Input %v3float + %sf = OpVariable %_ptr_Output_float Output + %int_1 = OpConstant %int 1 + %c1D = OpVariable %_ptr_Input_float Input + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float + %c2D = OpVariable %_ptr_Input_v2float Input + %c4D = OpVariable %_ptr_Input_v4float Input + %c3D = OpVariable %_ptr_Input_v3float Input +%_ptr_Input_int = OpTypePointer Input %int + %ic1D = OpVariable %_ptr_Input_int Input + %v3int = OpTypeVector %int 3 +%_ptr_Input_v3int = OpTypePointer Input %v3int + %ic3D = OpVariable %_ptr_Input_v3int Input + %v4int = OpTypeVector %int 4 +%_ptr_Input_v4int = OpTypePointer Input %v4int + %ic4D = OpVariable %_ptr_Input_v4int Input + %v2int = OpTypeVector %int 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %68 = OpConstantComposite %v2int %int_2 %int_3 + %main = OpFunction %void None %3 + %5 = OpLabel + %f = OpVariable %_ptr_Function_float Function + %15 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1 + %16 = OpLoad %float %15 + OpStore %f %16 + %19 = OpLoad %float %f + OpStore %gl_FragDepth %19 + %29 = OpAccessChain %_ptr_Input_v3float %s2 %int_0 + %30 = OpLoad %v3float %29 + OpStore %sc %30 + %33 = OpAccessChain %_ptr_Input_float %s2 %int_1 + %34 = OpLoad %float %33 + OpStore %sf %34 + %36 = OpLoad %float %c1D + %37 = OpExtInst %float %1 Sinh %36 + %38 = OpLoad %float %c1D + %39 = OpExtInst %float %1 Cosh %38 + %43 = OpLoad %v2float %c2D + %44 = OpExtInst %v2float %1 Tanh %43 + %45 = OpVectorTimesScalar %v2float %44 %39 + %46 = OpCompositeConstruct %v2float %37 %37 + %47 = OpFAdd %v2float %46 %45 + %49 = OpLoad %v4float %c4D + %50 = OpExtInst %v4float %1 Asinh %49 + %51 = OpLoad %v4float %c4D + %52 = OpExtInst %v4float %1 Acosh %51 + %53 = OpFAdd %v4float %50 %52 + %55 = OpLoad %v3float %c3D + %56 = OpExtInst %v3float %1 Atanh %55 + OpReturn + OpFunctionEnd diff --git a/Test/baseResults/web.builtins.vert.out b/Test/baseResults/web.builtins.vert.out new file mode 100644 index 000000000..379035f82 --- /dev/null +++ b/Test/baseResults/web.builtins.vert.out @@ -0,0 +1,74 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 42 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %_ %ps %gl_VertexIndex %gl_InstanceIndex + OpSource ESSL 310 + OpName %main "main" + OpName %gl_PerVertex "gl_PerVertex" + OpMemberName %gl_PerVertex 0 "gl_Position" + OpMemberName %gl_PerVertex 1 "gl_PointSize" + OpName %_ "" + OpName %ps "ps" + OpName %gl_VertexIndex "gl_VertexIndex" + OpName %gl_InstanceIndex "gl_InstanceIndex" + OpMemberDecorate %gl_PerVertex 0 Invariant + OpMemberDecorate %gl_PerVertex 0 BuiltIn Position + OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize + OpDecorate %gl_PerVertex Block + OpDecorate %ps RelaxedPrecision + OpDecorate %ps Location 0 + OpDecorate %15 RelaxedPrecision + OpDecorate %gl_VertexIndex BuiltIn VertexIndex + OpDecorate %30 RelaxedPrecision + OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%gl_PerVertex = OpTypeStruct %v4float %float +%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex + %_ = OpVariable %_ptr_Output_gl_PerVertex Output + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Input_float = OpTypePointer Input %float + %ps = OpVariable %_ptr_Input_float Input +%_ptr_Output_v4float = OpTypePointer Output %v4float + %int_4 = OpConstant %int 4 +%_ptr_Input_int = OpTypePointer Input %int +%gl_VertexIndex = OpVariable %_ptr_Input_int Input + %int_1 = OpConstant %int 1 +%_ptr_Output_float = OpTypePointer Output %float + %int_5 = OpConstant %int 5 +%gl_InstanceIndex = OpVariable %_ptr_Input_int Input + %main = OpFunction %void None %3 + %5 = OpLabel + %15 = OpLoad %float %ps + %16 = OpCompositeConstruct %v4float %15 %15 %15 %15 + %18 = OpAccessChain %_ptr_Output_v4float %_ %int_0 + OpStore %18 %16 + %22 = OpLoad %int %gl_VertexIndex + %23 = OpISub %int %int_4 %22 + %24 = OpConvertSToF %float %23 + %25 = OpAccessChain %_ptr_Output_v4float %_ %int_0 + %26 = OpLoad %v4float %25 + %27 = OpVectorTimesScalar %v4float %26 %24 + %28 = OpAccessChain %_ptr_Output_v4float %_ %int_0 + OpStore %28 %27 + %30 = OpLoad %float %ps + %32 = OpAccessChain %_ptr_Output_float %_ %int_1 + OpStore %32 %30 + %35 = OpLoad %int %gl_InstanceIndex + %36 = OpISub %int %int_5 %35 + %37 = OpConvertSToF %float %36 + %38 = OpAccessChain %_ptr_Output_float %_ %int_1 + %39 = OpLoad %float %38 + %40 = OpFMul %float %39 %37 + %41 = OpAccessChain %_ptr_Output_float %_ %int_1 + OpStore %41 %40 + OpReturn + OpFunctionEnd diff --git a/Test/baseResults/web.controlFlow.frag.out b/Test/baseResults/web.controlFlow.frag.out new file mode 100644 index 000000000..ebfa5be69 --- /dev/null +++ b/Test/baseResults/web.controlFlow.frag.out @@ -0,0 +1,347 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 193 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %x %BaseColor %Count %bigColor %outColor %v4 %f_0 + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %c "c" + OpName %f "f" + OpName %x "x" + OpName %d "d" + OpName %color "color" + OpName %BaseColor "BaseColor" + OpName %i "i" + OpName %Count "Count" + OpName %bigColor "bigColor" + OpName %outColor "outColor" + OpName %sum "sum" + OpName %i_0 "i" + OpName %v4 "v4" + OpName %i_1 "i" + OpName %tv4 "tv4" + OpName %r "r" + OpName %i_2 "i" + OpName %i_3 "i" + OpName %i_4 "i" + OpName %A "A" + OpName %B "B" + OpName %C "C" + OpName %D "D" + OpName %f_0 "f" + OpDecorate %f RelaxedPrecision + OpDecorate %x Location 0 + OpDecorate %color RelaxedPrecision + OpDecorate %BaseColor RelaxedPrecision + OpDecorate %BaseColor Location 2 + OpDecorate %47 RelaxedPrecision + OpDecorate %Count Flat + OpDecorate %Count Location 4 + OpDecorate %bigColor RelaxedPrecision + OpDecorate %bigColor Location 1 + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %outColor RelaxedPrecision + OpDecorate %outColor Location 0 + OpDecorate %71 RelaxedPrecision + OpDecorate %sum RelaxedPrecision + OpDecorate %v4 Flat + OpDecorate %v4 Location 5 + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %tv4 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %f_0 RelaxedPrecision + OpDecorate %f_0 Location 3 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Private_int = OpTypePointer Private %int + %c = OpVariable %_ptr_Private_int Private + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Input_float = OpTypePointer Input %float + %x = OpVariable %_ptr_Input_float Input + %d = OpVariable %_ptr_Private_int Private + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Input_v4float = OpTypePointer Input %v4float + %BaseColor = OpVariable %_ptr_Input_v4float Input +%_ptr_Function_int = OpTypePointer Function %int + %int_0 = OpConstant %int 0 +%_ptr_Input_int = OpTypePointer Input %int + %Count = OpVariable %_ptr_Input_int Input + %bool = OpTypeBool + %bigColor = OpVariable %_ptr_Input_v4float Input + %int_1 = OpConstant %int 1 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %outColor = OpVariable %_ptr_Output_v4float Output + %float_0 = OpConstant %float 0 + %int_4 = OpConstant %int 4 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 +%_ptr_Input_v4uint = OpTypePointer Input %v4uint + %v4 = OpVariable %_ptr_Input_v4uint Input +%_ptr_Input_uint = OpTypePointer Input %uint + %uint_4 = OpConstant %uint 4 + %v3float = OpTypeVector %float 3 + %uint_3 = OpConstant %uint 3 + %int_16 = OpConstant %int 16 + %int_10 = OpConstant %int 10 + %int_2 = OpConstant %int 2 + %int_5 = OpConstant %int 5 + %int_3 = OpConstant %int 3 + %f_0 = OpVariable %_ptr_Input_float Input + %main = OpFunction %void None %3 + %5 = OpLabel + %f = OpVariable %_ptr_Function_float Function + %color = OpVariable %_ptr_Function_v4float Function + %i = OpVariable %_ptr_Function_int Function + %sum = OpVariable %_ptr_Function_float Function + %i_0 = OpVariable %_ptr_Function_int Function + %i_1 = OpVariable %_ptr_Function_int Function + %tv4 = OpVariable %_ptr_Function_v4float Function + %r = OpVariable %_ptr_Function_v4float Function + %i_2 = OpVariable %_ptr_Function_int Function + %i_3 = OpVariable %_ptr_Function_int Function + %i_4 = OpVariable %_ptr_Function_int Function + %A = OpVariable %_ptr_Function_int Function + %B = OpVariable %_ptr_Function_int Function + %C = OpVariable %_ptr_Function_int Function + %D = OpVariable %_ptr_Function_int Function + %9 = OpLoad %int %c + OpSelectionMerge %13 None + OpSwitch %9 %12 1 %10 2 %11 + %12 = OpLabel + %39 = OpLoad %float %x + %40 = OpExtInst %float %1 Tan %39 + OpStore %f %40 + OpBranch %13 + %10 = OpLabel + %19 = OpLoad %float %x + %20 = OpExtInst %float %1 Sin %19 + OpStore %f %20 + OpBranch %13 + %11 = OpLabel + %23 = OpLoad %int %d + OpSelectionMerge %26 None + OpSwitch %23 %26 1 %24 2 %25 + %24 = OpLabel + %27 = OpLoad %float %x + %28 = OpLoad %float %x + %29 = OpFMul %float %27 %28 + %30 = OpLoad %float %x + %31 = OpFMul %float %29 %30 + OpStore %f %31 + OpBranch %26 + %25 = OpLabel + %33 = OpLoad %float %x + %34 = OpLoad %float %x + %35 = OpFMul %float %33 %34 + OpStore %f %35 + OpBranch %26 + %26 = OpLabel + OpBranch %13 + %13 = OpLabel + %47 = OpLoad %v4float %BaseColor + OpStore %color %47 + OpStore %i %int_0 + OpBranch %51 + %51 = OpLabel + OpLoopMerge %53 %54 None + OpBranch %55 + %55 = OpLabel + %56 = OpLoad %int %i + %59 = OpLoad %int %Count + %61 = OpSLessThan %bool %56 %59 + OpBranchConditional %61 %52 %53 + %52 = OpLabel + %63 = OpLoad %v4float %bigColor + %64 = OpLoad %v4float %color + %65 = OpFAdd %v4float %64 %63 + OpStore %color %65 + OpBranch %54 + %54 = OpLabel + %66 = OpLoad %int %i + %68 = OpIAdd %int %66 %int_1 + OpStore %i %68 + OpBranch %51 + %53 = OpLabel + %71 = OpLoad %v4float %color + OpStore %outColor %71 + OpStore %sum %float_0 + OpStore %i_0 %int_0 + OpBranch %75 + %75 = OpLabel + OpLoopMerge %77 %78 None + OpBranch %79 + %79 = OpLabel + %80 = OpLoad %int %i_0 + %82 = OpSLessThan %bool %80 %int_4 + OpBranchConditional %82 %76 %77 + %76 = OpLabel + %87 = OpLoad %int %i_0 + %89 = OpAccessChain %_ptr_Input_uint %v4 %87 + %90 = OpLoad %uint %89 + %91 = OpConvertUToF %float %90 + %92 = OpLoad %float %sum + %93 = OpFAdd %float %92 %91 + OpStore %sum %93 + OpBranch %78 + %78 = OpLabel + %94 = OpLoad %int %i_0 + %95 = OpIAdd %int %94 %int_1 + OpStore %i_0 %95 + OpBranch %75 + %77 = OpLabel + OpStore %i_1 %int_0 + OpBranch %97 + %97 = OpLabel + OpLoopMerge %99 %100 None + OpBranch %101 + %101 = OpLabel + %102 = OpLoad %int %i_1 + %103 = OpSLessThan %bool %102 %int_4 + OpBranchConditional %103 %98 %99 + %98 = OpLabel + %105 = OpLoad %int %i_1 + %106 = OpLoad %int %i_1 + %107 = OpAccessChain %_ptr_Input_uint %v4 %106 + %108 = OpLoad %uint %107 + %110 = OpIMul %uint %108 %uint_4 + %111 = OpConvertUToF %float %110 + %112 = OpAccessChain %_ptr_Function_float %tv4 %105 + OpStore %112 %111 + OpBranch %100 + %100 = OpLabel + %113 = OpLoad %int %i_1 + %114 = OpIAdd %int %113 %int_1 + OpStore %i_1 %114 + OpBranch %97 + %99 = OpLabel + %115 = OpLoad %float %sum + %116 = OpCompositeConstruct %v4float %115 %115 %115 %115 + %117 = OpLoad %v4float %tv4 + %118 = OpFAdd %v4float %116 %117 + %119 = OpLoad %v4float %outColor + %120 = OpFAdd %v4float %119 %118 + OpStore %outColor %120 + %123 = OpLoad %v4float %BaseColor + %124 = OpVectorShuffle %v3float %123 %123 0 1 2 + %125 = OpLoad %v4float %r + %126 = OpVectorShuffle %v4float %125 %124 4 5 6 3 + OpStore %r %126 + OpStore %i_2 %int_0 + OpBranch %128 + %128 = OpLabel + OpLoopMerge %130 %131 None + OpBranch %132 + %132 = OpLabel + %133 = OpLoad %int %i_2 + %134 = OpLoad %int %Count + %135 = OpSLessThan %bool %133 %134 + OpBranchConditional %135 %129 %130 + %129 = OpLabel + %136 = OpLoad %float %f + %138 = OpAccessChain %_ptr_Function_float %r %uint_3 + OpStore %138 %136 + OpBranch %131 + %131 = OpLabel + %139 = OpLoad %int %i_2 + %140 = OpIAdd %int %139 %int_1 + OpStore %i_2 %140 + OpBranch %128 + %130 = OpLabel + %141 = OpLoad %v4float %r + %142 = OpVectorShuffle %v3float %141 %141 0 1 2 + %143 = OpLoad %v4float %outColor + %144 = OpVectorShuffle %v3float %143 %143 0 1 2 + %145 = OpFAdd %v3float %144 %142 + %146 = OpLoad %v4float %outColor + %147 = OpVectorShuffle %v4float %146 %145 4 5 6 3 + OpStore %outColor %147 + OpStore %i_3 %int_0 + OpBranch %149 + %149 = OpLabel + OpLoopMerge %151 %152 None + OpBranch %153 + %153 = OpLabel + %154 = OpLoad %int %i_3 + %156 = OpSLessThan %bool %154 %int_16 + OpBranchConditional %156 %150 %151 + %150 = OpLabel + %157 = OpLoad %float %f + %158 = OpLoad %v4float %outColor + %159 = OpVectorTimesScalar %v4float %158 %157 + OpStore %outColor %159 + OpBranch %152 + %152 = OpLabel + %160 = OpLoad %int %i_3 + %161 = OpIAdd %int %160 %int_4 + OpStore %i_3 %161 + OpBranch %149 + %151 = OpLabel + OpStore %i_4 %int_0 + OpBranch %163 + %163 = OpLabel + OpLoopMerge %165 %166 None + OpBranch %167 + %167 = OpLabel + %168 = OpLoad %int %i_4 + %170 = OpSLessThan %bool %168 %int_10 + OpBranchConditional %170 %164 %165 + %164 = OpLabel + OpStore %A %int_1 + %172 = OpLoad %int %i_4 + %174 = OpSMod %int %172 %int_2 + %175 = OpIEqual %bool %174 %int_0 + OpSelectionMerge %177 None + OpBranchConditional %175 %176 %177 + %176 = OpLabel + OpStore %B %int_2 + OpBranch %166 + %177 = OpLabel + %181 = OpLoad %int %i_4 + %183 = OpSMod %int %181 %int_5 + %184 = OpIEqual %bool %183 %int_0 + OpSelectionMerge %186 None + OpBranchConditional %184 %185 %186 + %185 = OpLabel + OpStore %B %int_2 + OpBranch %165 + %186 = OpLabel + %188 = OpLoad %int %i_4 + %189 = OpIAdd %int %188 %int_1 + OpStore %i_4 %189 + OpBranch %166 + %166 = OpLabel + OpBranch %163 + %165 = OpLabel + OpStore %D %int_3 + OpReturn + OpFunctionEnd diff --git a/Test/baseResults/web.operations.frag.out b/Test/baseResults/web.operations.frag.out new file mode 100644 index 000000000..eb0162469 --- /dev/null +++ b/Test/baseResults/web.operations.frag.out @@ -0,0 +1,321 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 207 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %f "f" + OpName %v4 "v4" + OpName %u "u" + OpName %uv4 "uv4" + OpName %iv3 "iv3" + OpName %i "i" + OpName %uv3 "uv3" + OpName %m2 "m2" + OpName %iv4 "iv4" + OpName %m4 "m4" + OpName %a "a" + OpName %S "S" + OpMemberName %S 0 "i" + OpName %s "s" + OpName %b "b" + OpName %arr "arr" + OpName %arr2 "arr2" + OpName %block "block" + OpMemberName %block 0 "f" + OpName %instanceName "instanceName" + OpDecorate %u RelaxedPrecision + OpDecorate %18 RelaxedPrecision + OpDecorate %19 RelaxedPrecision + OpDecorate %20 RelaxedPrecision + OpDecorate %uv4 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %iv3 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %i RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %uv3 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %iv4 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpMemberDecorate %S 0 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %156 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %arr RelaxedPrecision + OpDecorate %arr2 RelaxedPrecision + OpMemberDecorate %block 0 RelaxedPrecision + OpMemberDecorate %block 0 Offset 0 + OpDecorate %block Block + OpDecorate %instanceName DescriptorSet 0 + OpDecorate %instanceName Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %uint = OpTypeInt 32 0 +%_ptr_Function_uint = OpTypePointer Function %uint + %v4uint = OpTypeVector %uint 4 +%_ptr_Function_v4uint = OpTypePointer Function %v4uint + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 +%_ptr_Function_v3int = OpTypePointer Function %v3int +%_ptr_Function_int = OpTypePointer Function %int + %int_3 = OpConstant %int 3 + %v3uint = OpTypeVector %uint 3 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %uint_4 = OpConstant %uint 4 + %v2float = OpTypeVector %float 2 +%mat2v2float = OpTypeMatrix %v2float 2 +%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float + %float_1 = OpConstant %float 1 + %v4int = OpTypeVector %int 4 +%_ptr_Function_v4int = OpTypePointer Function %v4int + %int_1 = OpConstant %int 1 +%mat4v4float = OpTypeMatrix %v4float 4 +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float + %bool = OpTypeBool + %v4bool = OpTypeVector %bool 4 + %v2bool = OpTypeVector %bool 2 + %uint_5 = OpConstant %uint 5 +%_arr_float_uint_5 = OpTypeArray %float %uint_5 +%_ptr_Private__arr_float_uint_5 = OpTypePointer Private %_arr_float_uint_5 + %a = OpVariable %_ptr_Private__arr_float_uint_5 Private + %S = OpTypeStruct %int +%_ptr_Private_S = OpTypePointer Private %S + %s = OpVariable %_ptr_Private_S Private +%_ptr_Function_bool = OpTypePointer Function %bool + %uint_2 = OpConstant %uint 2 +%_arr_int_uint_2 = OpTypeArray %int %uint_2 +%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2 + %uint_3 = OpConstant %uint 3 +%_arr_int_uint_3 = OpTypeArray %int %uint_3 +%_ptr_Function__arr_int_uint_3 = OpTypePointer Function %_arr_int_uint_3 + %int_2 = OpConstant %int 2 + %block = OpTypeStruct %float +%_ptr_Uniform_block = OpTypePointer Uniform %block +%instanceName = OpVariable %_ptr_Uniform_block Uniform + %main = OpFunction %void None %3 + %5 = OpLabel + %f = OpVariable %_ptr_Function_float Function + %v4 = OpVariable %_ptr_Function_v4float Function + %u = OpVariable %_ptr_Function_uint Function + %uv4 = OpVariable %_ptr_Function_v4uint Function + %iv3 = OpVariable %_ptr_Function_v3int Function + %i = OpVariable %_ptr_Function_int Function + %uv3 = OpVariable %_ptr_Function_v3uint Function + %m2 = OpVariable %_ptr_Function_mat2v2float Function + %iv4 = OpVariable %_ptr_Function_v4int Function + %m4 = OpVariable %_ptr_Function_mat4v4float Function + %b = OpVariable %_ptr_Function_bool Function + %arr = OpVariable %_ptr_Function__arr_int_uint_2 Function + %arr2 = OpVariable %_ptr_Function__arr_int_uint_3 Function + %9 = OpLoad %float %f + %13 = OpLoad %v4float %v4 + %14 = OpVectorTimesScalar %v4float %13 %9 + %18 = OpLoad %uint %u + %19 = OpLoad %uint %u + %20 = OpIAdd %uint %18 %19 + %24 = OpLoad %v4uint %uv4 + %25 = OpLoad %uint %u + %26 = OpCompositeConstruct %v4uint %25 %25 %25 %25 + %27 = OpUDiv %v4uint %24 %26 + %32 = OpLoad %v3int %iv3 + %33 = OpLoad %v3int %iv3 + %34 = OpISub %v3int %33 %32 + OpStore %iv3 %34 + %38 = OpLoad %int %i + %39 = OpSMod %int %38 %int_3 + OpStore %i %39 + %43 = OpLoad %v3uint %uv3 + %45 = OpCompositeConstruct %v3uint %uint_4 %uint_4 %uint_4 + %46 = OpUMod %v3uint %43 %45 + %51 = OpLoad %mat2v2float %m2 + %53 = OpCompositeConstruct %v2float %float_1 %float_1 + %54 = OpCompositeExtract %v2float %51 0 + %55 = OpFSub %v2float %54 %53 + %56 = OpCompositeExtract %v2float %51 1 + %57 = OpFSub %v2float %56 %53 + %58 = OpCompositeConstruct %mat2v2float %55 %57 + OpStore %m2 %58 + %62 = OpLoad %v4int %iv4 + %64 = OpCompositeConstruct %v4int %int_1 %int_1 %int_1 %int_1 + %65 = OpIAdd %v4int %62 %64 + OpStore %iv4 %65 + %69 = OpLoad %mat4v4float %m4 + %70 = OpLoad %mat4v4float %m4 + %72 = OpCompositeExtract %v4float %69 0 + %73 = OpCompositeExtract %v4float %70 0 + %75 = OpFOrdNotEqual %v4bool %72 %73 + %76 = OpAny %bool %75 + %77 = OpCompositeExtract %v4float %69 1 + %78 = OpCompositeExtract %v4float %70 1 + %79 = OpFOrdNotEqual %v4bool %77 %78 + %80 = OpAny %bool %79 + %81 = OpLogicalOr %bool %76 %80 + %82 = OpCompositeExtract %v4float %69 2 + %83 = OpCompositeExtract %v4float %70 2 + %84 = OpFOrdNotEqual %v4bool %82 %83 + %85 = OpAny %bool %84 + %86 = OpLogicalOr %bool %81 %85 + %87 = OpCompositeExtract %v4float %69 3 + %88 = OpCompositeExtract %v4float %70 3 + %89 = OpFOrdNotEqual %v4bool %87 %88 + %90 = OpAny %bool %89 + %91 = OpLogicalOr %bool %86 %90 + %92 = OpLoad %mat2v2float %m2 + %93 = OpLoad %mat2v2float %m2 + %94 = OpCompositeExtract %v2float %92 0 + %95 = OpCompositeExtract %v2float %93 0 + %97 = OpFOrdEqual %v2bool %94 %95 + %98 = OpAll %bool %97 + %99 = OpCompositeExtract %v2float %92 1 + %100 = OpCompositeExtract %v2float %93 1 + %101 = OpFOrdEqual %v2bool %99 %100 + %102 = OpAll %bool %101 + %103 = OpLogicalAnd %bool %98 %102 + %104 = OpLoad %int %i + %105 = OpLoad %int %i + %106 = OpSLessThanEqual %bool %104 %105 + %111 = OpLoad %_arr_float_uint_5 %a + %112 = OpLoad %_arr_float_uint_5 %a + %113 = OpCompositeExtract %float %111 0 + %114 = OpCompositeExtract %float %112 0 + %115 = OpFOrdEqual %bool %113 %114 + %116 = OpCompositeExtract %float %111 1 + %117 = OpCompositeExtract %float %112 1 + %118 = OpFOrdEqual %bool %116 %117 + %119 = OpLogicalAnd %bool %115 %118 + %120 = OpCompositeExtract %float %111 2 + %121 = OpCompositeExtract %float %112 2 + %122 = OpFOrdEqual %bool %120 %121 + %123 = OpLogicalAnd %bool %119 %122 + %124 = OpCompositeExtract %float %111 3 + %125 = OpCompositeExtract %float %112 3 + %126 = OpFOrdEqual %bool %124 %125 + %127 = OpLogicalAnd %bool %123 %126 + %128 = OpCompositeExtract %float %111 4 + %129 = OpCompositeExtract %float %112 4 + %130 = OpFOrdEqual %bool %128 %129 + %131 = OpLogicalAnd %bool %127 %130 + %135 = OpLoad %S %s + %136 = OpLoad %S %s + %137 = OpCompositeExtract %int %135 0 + %138 = OpCompositeExtract %int %136 0 + %139 = OpINotEqual %bool %137 %138 + %142 = OpLoad %bool %b + %143 = OpLoad %bool %b + %144 = OpLogicalAnd %bool %142 %143 + %145 = OpLoad %bool %b + %146 = OpLoad %bool %b + %147 = OpLogicalOr %bool %145 %146 + %148 = OpLoad %bool %b + %149 = OpLoad %bool %b + %150 = OpLogicalNotEqual %bool %148 %149 + %151 = OpLoad %bool %b + %152 = OpLogicalNot %bool %151 + %153 = OpLoad %int %i + %154 = OpNot %int %153 + %155 = OpLoad %uint %u + %156 = OpNot %uint %155 + %157 = OpLoad %v3uint %uv3 + %158 = OpNot %v3uint %157 + %159 = OpLoad %v3int %iv3 + %160 = OpNot %v3int %159 + %161 = OpLoad %int %i + %162 = OpLoad %v3uint %uv3 + %163 = OpCompositeConstruct %v3int %161 %161 %161 + %164 = OpShiftLeftLogical %v3uint %162 %163 + OpStore %uv3 %164 + %165 = OpLoad %int %i + %166 = OpLoad %int %i + %167 = OpShiftRightArithmetic %int %165 %166 + %168 = OpLoad %uint %u + %169 = OpLoad %uint %u + %170 = OpShiftLeftLogical %uint %168 %169 + %171 = OpLoad %v3int %iv3 + %172 = OpLoad %v3int %iv3 + %173 = OpShiftRightArithmetic %v3int %171 %172 + %174 = OpLoad %int %i + %175 = OpLoad %int %i + %176 = OpBitwiseAnd %int %174 %175 + %177 = OpLoad %uint %u + %178 = OpLoad %uint %u + %179 = OpBitwiseOr %uint %177 %178 + %180 = OpLoad %v3int %iv3 + %181 = OpLoad %v3int %iv3 + %182 = OpBitwiseXor %v3int %180 %181 + %183 = OpLoad %uint %u + %184 = OpLoad %v3uint %uv3 + %185 = OpCompositeConstruct %v3uint %183 %183 %183 + %186 = OpBitwiseAnd %v3uint %185 %184 + %187 = OpLoad %v3uint %uv3 + %188 = OpLoad %uint %u + %189 = OpCompositeConstruct %v3uint %188 %188 %188 + %190 = OpBitwiseOr %v3uint %187 %189 + %191 = OpLoad %uint %u + %192 = OpLoad %v3uint %uv3 + %193 = OpCompositeConstruct %v3uint %191 %191 %191 + %194 = OpBitwiseAnd %v3uint %192 %193 + OpStore %uv3 %194 + OpReturn + OpFunctionEnd diff --git a/Test/baseResults/web.texture.frag.out b/Test/baseResults/web.texture.frag.out new file mode 100644 index 000000000..6fbebb4d1 --- /dev/null +++ b/Test/baseResults/web.texture.frag.out @@ -0,0 +1,396 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 189 +; Schema: 0 + OpCapability Shader + OpCapability ImageQuery + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %c2D %c4D %c3D %ic3D %ic1D %c1D %ic4D %s2 %sc %sf + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %v "v" + OpName %s2D "s2D" + OpName %c2D "c2D" + OpName %s3D "s3D" + OpName %c4D "c4D" + OpName %s2DArray "s2DArray" + OpName %c3D "c3D" + OpName %ic3D "ic3D" + OpName %ic1D "ic1D" + OpName %f "f" + OpName %s2DShadow "s2DShadow" + OpName %c1D "c1D" + OpName %sCube "sCube" + OpName %s2DArrayShadow "s2DArrayShadow" + OpName %iv "iv" + OpName %is2D "is2D" + OpName %is3D "is3D" + OpName %isCube "isCube" + OpName %is2DArray "is2DArray" + OpName %sCubeShadow "sCubeShadow" + OpName %us2D "us2D" + OpName %us3D "us3D" + OpName %usCube "usCube" + OpName %us2DArray "us2DArray" + OpName %ic4D "ic4D" + OpName %S2 "S2" + OpMemberName %S2 0 "c" + OpMemberName %S2 1 "f" + OpName %s2 "s2" + OpName %sc "sc" + OpName %sf "sf" + OpName %arrayedSampler "arrayedSampler" + OpDecorate %v RelaxedPrecision + OpDecorate %s2D RelaxedPrecision + OpDecorate %s2D DescriptorSet 0 + OpDecorate %s2D Binding 1 + OpDecorate %14 RelaxedPrecision + OpDecorate %c2D RelaxedPrecision + OpDecorate %c2D Location 5 + OpDecorate %18 RelaxedPrecision + OpDecorate %19 RelaxedPrecision + OpDecorate %s3D RelaxedPrecision + OpDecorate %s3D DescriptorSet 0 + OpDecorate %s3D Binding 2 + OpDecorate %24 RelaxedPrecision + OpDecorate %c4D RelaxedPrecision + OpDecorate %c4D Location 7 + OpDecorate %27 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %s2DArray RelaxedPrecision + OpDecorate %s2DArray DescriptorSet 0 + OpDecorate %s2DArray Binding 6 + OpDecorate %33 RelaxedPrecision + OpDecorate %c3D RelaxedPrecision + OpDecorate %c3D Location 6 + OpDecorate %37 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %ic3D RelaxedPrecision + OpDecorate %ic3D Flat + OpDecorate %ic3D Location 2 + OpDecorate %45 RelaxedPrecision + OpDecorate %ic1D RelaxedPrecision + OpDecorate %ic1D Flat + OpDecorate %ic1D Location 1 + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %f RelaxedPrecision + OpDecorate %s2DShadow RelaxedPrecision + OpDecorate %s2DShadow DescriptorSet 0 + OpDecorate %s2DShadow Binding 5 + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %c1D RelaxedPrecision + OpDecorate %c1D Location 4 + OpDecorate %61 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %sCube RelaxedPrecision + OpDecorate %sCube DescriptorSet 0 + OpDecorate %sCube Binding 3 + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %s2DArrayShadow RelaxedPrecision + OpDecorate %s2DArrayShadow DescriptorSet 0 + OpDecorate %s2DArrayShadow Binding 7 + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %iv RelaxedPrecision + OpDecorate %is2D RelaxedPrecision + OpDecorate %is2D DescriptorSet 0 + OpDecorate %is2D Binding 8 + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %is3D RelaxedPrecision + OpDecorate %is3D DescriptorSet 0 + OpDecorate %is3D Binding 9 + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %isCube RelaxedPrecision + OpDecorate %isCube DescriptorSet 0 + OpDecorate %isCube Binding 10 + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %is2DArray RelaxedPrecision + OpDecorate %is2DArray DescriptorSet 0 + OpDecorate %is2DArray Binding 11 + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %sCubeShadow RelaxedPrecision + OpDecorate %sCubeShadow DescriptorSet 0 + OpDecorate %sCubeShadow Binding 4 + OpDecorate %154 RelaxedPrecision + OpDecorate %us2D RelaxedPrecision + OpDecorate %us2D DescriptorSet 0 + OpDecorate %us2D Binding 12 + OpDecorate %us3D RelaxedPrecision + OpDecorate %us3D DescriptorSet 0 + OpDecorate %us3D Binding 13 + OpDecorate %usCube RelaxedPrecision + OpDecorate %usCube DescriptorSet 0 + OpDecorate %usCube Binding 14 + OpDecorate %us2DArray RelaxedPrecision + OpDecorate %us2DArray DescriptorSet 0 + OpDecorate %us2DArray Binding 15 + OpDecorate %ic4D RelaxedPrecision + OpDecorate %ic4D Flat + OpDecorate %ic4D Location 3 + OpDecorate %65 RelaxedPrecision + OpMemberDecorate %S2 0 RelaxedPrecision + OpMemberDecorate %S2 1 RelaxedPrecision + OpDecorate %s2 Location 8 + OpDecorate %sc RelaxedPrecision + OpDecorate %sc Location 0 + OpDecorate %sf RelaxedPrecision + OpDecorate %sf Location 1 + OpDecorate %arrayedSampler RelaxedPrecision + OpDecorate %arrayedSampler DescriptorSet 0 + OpDecorate %arrayedSampler Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %10 = OpTypeImage %float 2D 0 0 0 1 Unknown + %11 = OpTypeSampledImage %10 +%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11 + %s2D = OpVariable %_ptr_UniformConstant_11 UniformConstant + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float + %c2D = OpVariable %_ptr_Input_v2float Input + %20 = OpTypeImage %float 3D 0 0 0 1 Unknown + %21 = OpTypeSampledImage %20 +%_ptr_UniformConstant_21 = OpTypePointer UniformConstant %21 + %s3D = OpVariable %_ptr_UniformConstant_21 UniformConstant +%_ptr_Input_v4float = OpTypePointer Input %v4float + %c4D = OpVariable %_ptr_Input_v4float Input + %29 = OpTypeImage %float 2D 0 1 0 1 Unknown + %30 = OpTypeSampledImage %29 +%_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 + %s2DArray = OpVariable %_ptr_UniformConstant_30 UniformConstant + %v3float = OpTypeVector %float 3 +%_ptr_Input_v3float = OpTypePointer Input %v3float + %c3D = OpVariable %_ptr_Input_v3float Input +%float_1_20000005 = OpConstant %float 1.20000005 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 +%_ptr_Input_v3int = OpTypePointer Input %v3int + %ic3D = OpVariable %_ptr_Input_v3int Input +%_ptr_Input_int = OpTypePointer Input %int + %ic1D = OpVariable %_ptr_Input_int Input +%_ptr_Function_float = OpTypePointer Function %float + %53 = OpTypeImage %float 2D 1 0 0 1 Unknown + %54 = OpTypeSampledImage %53 +%_ptr_UniformConstant_54 = OpTypePointer UniformConstant %54 + %s2DShadow = OpVariable %_ptr_UniformConstant_54 UniformConstant +%_ptr_Input_float = OpTypePointer Input %float + %c1D = OpVariable %_ptr_Input_float Input + %v2int = OpTypeVector %int 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %65 = OpConstantComposite %v2int %int_2 %int_3 + %72 = OpTypeImage %float Cube 0 0 0 1 Unknown + %73 = OpTypeSampledImage %72 +%_ptr_UniformConstant_73 = OpTypePointer UniformConstant %73 + %sCube = OpVariable %_ptr_UniformConstant_73 UniformConstant + %81 = OpTypeImage %float 2D 1 1 0 1 Unknown + %82 = OpTypeSampledImage %81 +%_ptr_UniformConstant_82 = OpTypePointer UniformConstant %82 +%s2DArrayShadow = OpVariable %_ptr_UniformConstant_82 UniformConstant + %v4int = OpTypeVector %int 4 +%_ptr_Function_v4int = OpTypePointer Function %v4int + %104 = OpTypeImage %int 2D 0 0 0 1 Unknown + %105 = OpTypeSampledImage %104 +%_ptr_UniformConstant_105 = OpTypePointer UniformConstant %105 + %is2D = OpVariable %_ptr_UniformConstant_105 UniformConstant + %125 = OpTypeImage %int 3D 0 0 0 1 Unknown + %126 = OpTypeSampledImage %125 +%_ptr_UniformConstant_126 = OpTypePointer UniformConstant %126 + %is3D = OpVariable %_ptr_UniformConstant_126 UniformConstant +%float_4_19999981 = OpConstant %float 4.19999981 + %133 = OpTypeImage %int Cube 0 0 0 1 Unknown + %134 = OpTypeSampledImage %133 +%_ptr_UniformConstant_134 = OpTypePointer UniformConstant %134 + %isCube = OpVariable %_ptr_UniformConstant_134 UniformConstant + %141 = OpTypeImage %int 2D 0 1 0 1 Unknown + %142 = OpTypeSampledImage %141 +%_ptr_UniformConstant_142 = OpTypePointer UniformConstant %142 + %is2DArray = OpVariable %_ptr_UniformConstant_142 UniformConstant + %150 = OpTypeImage %float Cube 1 0 0 1 Unknown + %151 = OpTypeSampledImage %150 +%_ptr_UniformConstant_151 = OpTypePointer UniformConstant %151 +%sCubeShadow = OpVariable %_ptr_UniformConstant_151 UniformConstant + %uint = OpTypeInt 32 0 + %160 = OpTypeImage %uint 2D 0 0 0 1 Unknown + %161 = OpTypeSampledImage %160 +%_ptr_UniformConstant_161 = OpTypePointer UniformConstant %161 + %us2D = OpVariable %_ptr_UniformConstant_161 UniformConstant + %164 = OpTypeImage %uint 3D 0 0 0 1 Unknown + %165 = OpTypeSampledImage %164 +%_ptr_UniformConstant_165 = OpTypePointer UniformConstant %165 + %us3D = OpVariable %_ptr_UniformConstant_165 UniformConstant + %168 = OpTypeImage %uint Cube 0 0 0 1 Unknown + %169 = OpTypeSampledImage %168 +%_ptr_UniformConstant_169 = OpTypePointer UniformConstant %169 + %usCube = OpVariable %_ptr_UniformConstant_169 UniformConstant + %172 = OpTypeImage %uint 2D 0 1 0 1 Unknown + %173 = OpTypeSampledImage %172 +%_ptr_UniformConstant_173 = OpTypePointer UniformConstant %173 + %us2DArray = OpVariable %_ptr_UniformConstant_173 UniformConstant +%_ptr_Input_v4int = OpTypePointer Input %v4int + %ic4D = OpVariable %_ptr_Input_v4int Input + %S2 = OpTypeStruct %v3float %float +%_ptr_Input_S2 = OpTypePointer Input %S2 + %s2 = OpVariable %_ptr_Input_S2 Input +%_ptr_Output_v3float = OpTypePointer Output %v3float + %sc = OpVariable %_ptr_Output_v3float Output +%_ptr_Output_float = OpTypePointer Output %float + %sf = OpVariable %_ptr_Output_float Output + %uint_5 = OpConstant %uint 5 +%_arr_11_uint_5 = OpTypeArray %11 %uint_5 +%_ptr_UniformConstant__arr_11_uint_5 = OpTypePointer UniformConstant %_arr_11_uint_5 +%arrayedSampler = OpVariable %_ptr_UniformConstant__arr_11_uint_5 UniformConstant + %main = OpFunction %void None %3 + %5 = OpLabel + %v = OpVariable %_ptr_Function_v4float Function + %f = OpVariable %_ptr_Function_float Function + %iv = OpVariable %_ptr_Function_v4int Function + %14 = OpLoad %11 %s2D + %18 = OpLoad %v2float %c2D + %19 = OpImageSampleImplicitLod %v4float %14 %18 + OpStore %v %19 + %24 = OpLoad %21 %s3D + %27 = OpLoad %v4float %c4D + %28 = OpImageSampleProjImplicitLod %v4float %24 %27 + OpStore %v %28 + %33 = OpLoad %30 %s2DArray + %37 = OpLoad %v3float %c3D + %39 = OpImageSampleExplicitLod %v4float %33 %37 Lod %float_1_20000005 + OpStore %v %39 + %40 = OpLoad %21 %s3D + %45 = OpLoad %v3int %ic3D + %48 = OpLoad %int %ic1D + %49 = OpImage %20 %40 + %50 = OpImageFetch %v4float %49 %45 Lod %48 + OpStore %v %50 + %57 = OpLoad %54 %s2DShadow + %58 = OpLoad %v3float %c3D + %61 = OpLoad %float %c1D + %66 = OpCompositeExtract %float %58 2 + %67 = OpImageSampleDrefExplicitLod %float %57 %58 %66 Lod|ConstOffset %61 %65 + OpStore %f %67 + %68 = OpLoad %11 %s2D + %69 = OpLoad %v3float %c3D + %70 = OpLoad %float %c1D + %71 = OpImageSampleProjExplicitLod %v4float %68 %69 Lod|ConstOffset %70 %65 + OpStore %v %71 + %76 = OpLoad %73 %sCube + %77 = OpLoad %v3float %c3D + %78 = OpLoad %v3float %c3D + %79 = OpLoad %v3float %c3D + %80 = OpImageSampleExplicitLod %v4float %76 %77 Grad %78 %79 + OpStore %v %80 + %85 = OpLoad %82 %s2DArrayShadow + %86 = OpLoad %v4float %c4D + %87 = OpLoad %v2float %c2D + %88 = OpLoad %v2float %c2D + %89 = OpCompositeExtract %float %86 3 + %90 = OpImageSampleDrefExplicitLod %float %85 %86 %89 Grad|ConstOffset %87 %88 %65 + OpStore %f %90 + %91 = OpLoad %21 %s3D + %92 = OpLoad %v4float %c4D + %93 = OpLoad %v3float %c3D + %94 = OpLoad %v3float %c3D + %95 = OpImageSampleProjExplicitLod %v4float %91 %92 Grad %93 %94 + OpStore %v %95 + %96 = OpLoad %11 %s2D + %97 = OpLoad %v3float %c3D + %98 = OpLoad %v2float %c2D + %99 = OpLoad %v2float %c2D + %100 = OpImageSampleProjExplicitLod %v4float %96 %97 Grad|ConstOffset %98 %99 %65 + OpStore %v %100 + %108 = OpLoad %105 %is2D + %109 = OpLoad %v2float %c2D + %110 = OpImageSampleImplicitLod %v4int %108 %109 + OpStore %iv %110 + %111 = OpLoad %105 %is2D + %112 = OpLoad %v4float %c4D + %113 = OpCompositeExtract %float %112 3 + %114 = OpCompositeInsert %v4float %113 %112 2 + %115 = OpImageSampleProjImplicitLod %v4int %111 %114 ConstOffset %65 + OpStore %iv %115 + %116 = OpLoad %105 %is2D + %117 = OpLoad %v3float %c3D + %118 = OpLoad %float %c1D + %119 = OpImageSampleProjExplicitLod %v4int %116 %117 Lod %118 + OpStore %iv %119 + %120 = OpLoad %105 %is2D + %121 = OpLoad %v3float %c3D + %122 = OpLoad %v2float %c2D + %123 = OpLoad %v2float %c2D + %124 = OpImageSampleProjExplicitLod %v4int %120 %121 Grad %122 %123 + OpStore %iv %124 + %129 = OpLoad %126 %is3D + %130 = OpLoad %v3float %c3D + %132 = OpImageSampleImplicitLod %v4int %129 %130 Bias %float_4_19999981 + OpStore %iv %132 + %137 = OpLoad %134 %isCube + %138 = OpLoad %v3float %c3D + %139 = OpLoad %float %c1D + %140 = OpImageSampleExplicitLod %v4int %137 %138 Lod %139 + OpStore %iv %140 + %145 = OpLoad %142 %is2DArray + %146 = OpLoad %v3int %ic3D + %147 = OpLoad %int %ic1D + %148 = OpImage %141 %145 + %149 = OpImageFetch %v4int %148 %146 Lod %147 + OpStore %iv %149 + %154 = OpLoad %151 %sCubeShadow + %155 = OpImage %150 %154 + %156 = OpImageQuerySizeLod %v2int %155 %int_2 + %157 = OpLoad %v4int %iv + %158 = OpVectorShuffle %v4int %157 %156 4 5 2 3 + OpStore %iv %158 + OpReturn + OpFunctionEnd diff --git a/Test/web.basic.vert b/Test/web.basic.vert new file mode 100644 index 000000000..9bc4c30fc --- /dev/null +++ b/Test/web.basic.vert @@ -0,0 +1,15 @@ +#version 310 es + +layout(location = 2) in vec4 inv4; +layout(location = 1) out vec4 outv4; + +layout(binding = 3) uniform uBlock { + vec4 a; + ivec4 b; + uvec4 c; +} uInst; + +void main() +{ + outv4 = normalize(inv4) * uInst.a * vec4(uInst.b) * vec4(uInst.c); +} diff --git a/Test/web.builtins.frag b/Test/web.builtins.frag new file mode 100644 index 000000000..5ede9a915 --- /dev/null +++ b/Test/web.builtins.frag @@ -0,0 +1,58 @@ +#version 310 es + +precision lowp float; +layout(location = 4) in float c1D; +layout(location = 5) in vec2 c2D; +layout(location = 6) in vec3 c3D; +layout(location = 7) in smooth vec4 c4D; + +layout(location = 1) flat in int ic1D; +layout(location = 2) flat in ivec3 ic3D; +layout(location = 3) flat in ivec4 ic4D; + +const ivec2 ic2D = ivec2(2, 3); + +struct s { + int i; + sampler2D s; +}; + +struct S2 { + vec3 c; + float f; +}; + +layout(location = 8) in S2 s2; + +layout(location = 0) out vec3 sc; +layout(location = 1) out float sf; + +void main() +{ + float f = gl_FragCoord.y; + gl_FragDepth = f; + + sc = s2.c; + sf = s2.f; + + sinh(c1D) + + cosh(c1D) * tanh(c2D); + asinh(c4D) + acosh(c4D); + atanh(c3D); +} + +void foo324(void) +{ + float p = pow(3.2, 4.6); + p += sin(0.4); + p += distance(vec2(10.0, 11.0), vec2(13.0, 15.0)); // 5 + p += dot(vec3(2,3,5), vec3(-2,-1,4)); // 13 + vec3 c3 = cross(vec3(3,-3,1), vec3(4,9,2)); // (-15, -2, 39) + c3 += faceforward(vec3(1,2,3), vec3(2,3,5), vec3(-2,-1,4)); // (-1,-2,-3) + c3 += faceforward(vec3(1,2,3), vec3(-2,-3,-5), vec3(-2,-1,4)); // (1,2,3) + vec2 c2 = reflect(vec2(1,3), vec2(0,1)); // (1,-3) + c2 += refract(vec2(1,3), vec2(0,1), 1.0); // (1,-3) + c2 += refract(vec2(1,3), vec2(0,1), 3.0); + c2 += refract(vec2(1,0.1), vec2(0,1), 5.0); // (0,0) + mat3x2 m32 = outerProduct(vec2(2,3), vec3(5,7,11));// rows: (10, 14, 22), (15, 21, 33) +} diff --git a/Test/web.builtins.vert b/Test/web.builtins.vert new file mode 100644 index 000000000..f27b12b25 --- /dev/null +++ b/Test/web.builtins.vert @@ -0,0 +1,14 @@ +#version 310 es + +layout(location = 0) in mediump float ps; + +invariant gl_Position; + +void main() +{ + gl_Position = vec4(ps); + gl_Position *= float(4 - gl_VertexIndex); + + gl_PointSize = ps; + gl_PointSize *= float(5 - gl_InstanceIndex); +} diff --git a/Test/web.controlFlow.frag b/Test/web.controlFlow.frag new file mode 100644 index 000000000..89f7e68dc --- /dev/null +++ b/Test/web.controlFlow.frag @@ -0,0 +1,91 @@ +#version 310 es + +precision mediump float; +precision highp int; + +int c, d; +layout(location = 0) in highp float x; +layout(location = 1) in vec4 bigColor; +layout(location = 2) in vec4 BaseColor; +layout(location = 3) in float f; + +layout(location = 4) flat in int Count; +layout(location = 5) flat in uvec4 v4; + +layout(location = 0) out vec4 outColor; + +void main() +{ + float f; + int a[2]; + + switch(c) + { + } + + switch (c) { // a no-error normal switch + case 1: + f = sin(x); + break; + case 2: + switch (d) { + case 1: + f = x * x * x; + break; + case 2: + f = x * x; + break; + } + break; + default: + f = tan(x); + } + + vec4 color = BaseColor; + + for (int i = 0; i < Count; ++i) { + color += bigColor; + } + + outColor = color; + + float sum = 0.0; + for (int i = 0; i < 4; ++i) + sum += float(v4[i]); + + vec4 tv4; + + for (int i = 0; i < 4; ++i) + tv4[i] = float(v4[i] * 4u); + + outColor += vec4(sum) + tv4; + + vec4 r; + r.xyz = BaseColor.xyz; + + for (int i = 0; i < Count; ++i) + r.w = f; + + outColor.xyz += r.xyz; + + for (int i = 0; i < 16; i += 4) + outColor *= f; + + int i = 0; + int A, B, C, D; + while (i<10) { + A = 1; + if (i%2 == 0) { + B = 2; + continue; + C = 2; + } + if (i%5 == 0) { + B = 2; + break; + C = 2; + } + i++; + } + D = 3; +} diff --git a/Test/web.operations.frag b/Test/web.operations.frag new file mode 100644 index 000000000..589ae6fd9 --- /dev/null +++ b/Test/web.operations.frag @@ -0,0 +1,73 @@ +#version 310 es + +precision highp float; + +layout(binding = 0) uniform block { + mediump float f; +} instanceName; + +struct S { + int i; +} s; + +float a[5]; + +void main() +{ + bool b; + float f; + int i; + uint u; + bvec3 b3; + vec3 v3; + ivec3 iv3; + uvec3 uv3; + vec4 v4; + ivec4 iv4; + uvec4 uv4; + mat2 m2; + mat4 m4; + + f * v4; + u + u; + uv4 / u; + iv3 -= iv3; + + i %= 3; + uv3 % 4u; + --m2; + iv4++; + + m4 != m4; + m2 == m2; + i <= i; + a == a; + s != s; + + b && b; + b || b; + b ^^ b; + + !b, uv3; + + ~i; + ~u; + ~uv3; + ~iv3; + + uv3 <<= i; + i >> i; + u << u; + iv3 >> iv3; + + i & i; + u | u; + iv3 ^ iv3; + u & uv3; + uv3 | u; + uv3 &= u; + int arr[0x222 & 0xf]; + arr[1]; // size 2 + int arr2[(uvec2(0, 0x2) | 0x1u).y]; + arr2[2]; // size 3 +} diff --git a/Test/web.runtests b/Test/web.runtests new file mode 100755 index 000000000..3283dd833 --- /dev/null +++ b/Test/web.runtests @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +TESTLIST=web.testlist +TARGETDIR=localResults +BASEDIR=baseResults +EXE=../build/install/bin/glslangValidator.exe +HASERROR=0 +mkdir -p $TARGETDIR + +if [ -a $TESTLIST ] + then + while read t; do + echo Running $t... + b=`basename $t` + $EXE -V -o webtest.spv $t + spirv-dis webtest.spv > $TARGETDIR/$b.out + rm -f webtest.spv + diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1 + done < $TESTLIST +else + echo $TESTLIST is missing +fi + +wc --bytes $EXE > $TARGETDIR/size +echo "base size was" `cat $BASEDIR/size` +echo "new size is" `cat $TARGETDIR/size` + +# +# Final checking +# +if [ $HASERROR -eq 0 ] +then + echo Tests Succeeded. +else + echo Tests Failed. +fi + +exit $HASERROR diff --git a/Test/web.testlist b/Test/web.testlist new file mode 100644 index 000000000..b2d147415 --- /dev/null +++ b/Test/web.testlist @@ -0,0 +1,6 @@ +web.builtins.vert +web.builtins.frag +web.basic.vert +web.controlFlow.frag +web.operations.frag +web.texture.frag diff --git a/Test/web.texture.frag b/Test/web.texture.frag new file mode 100644 index 000000000..5bfd96206 --- /dev/null +++ b/Test/web.texture.frag @@ -0,0 +1,77 @@ +#version 310 es +layout(binding = 1) uniform sampler2D s2D; +layout(binding = 2) uniform lowp sampler3D s3D; +layout(binding = 3) uniform samplerCube sCube; +layout(binding = 4) uniform lowp samplerCubeShadow sCubeShadow; +layout(binding = 5) uniform lowp sampler2DShadow s2DShadow; +layout(binding = 6) uniform lowp sampler2DArray s2DArray; +layout(binding = 7) uniform lowp sampler2DArrayShadow s2DArrayShadow; +layout(binding = 8) uniform lowp isampler2D is2D; +layout(binding = 9) uniform lowp isampler3D is3D; +layout(binding = 10) uniform lowp isamplerCube isCube; +layout(binding = 11) uniform lowp isampler2DArray is2DArray; +layout(binding = 12) uniform lowp usampler2D us2D; +layout(binding = 13) uniform lowp usampler3D us3D; +layout(binding = 14) uniform lowp usamplerCube usCube; +layout(binding = 15) uniform lowp usampler2DArray us2DArray; + +precision lowp float; +layout(location = 4) in float c1D; +layout(location = 5) in vec2 c2D; +layout(location = 6) in vec3 c3D; +layout(location = 7) in smooth vec4 c4D; + +layout(location = 1) flat in int ic1D; +layout(location = 2) flat in ivec3 ic3D; +layout(location = 3) flat in ivec4 ic4D; + +const ivec2 ic2D = ivec2(2, 3); + +struct s { + int i; + sampler2D s; +}; + +struct S2 { + vec3 c; + float f; +}; + +layout(location = 8) in S2 s2; + +layout(location = 0) out vec3 sc; +layout(location = 1) out float sf; + +layout(binding = 0) uniform sampler2D arrayedSampler[5]; + +void main() +{ + float f; + vec4 v; + v = texture(s2D, c2D); + v = textureProj(s3D, c4D); + v = textureLod(s2DArray, c3D, 1.2); + v = texelFetch(s3D, ic3D, ic1D); + f = textureLodOffset(s2DShadow, c3D, c1D, ic2D); + v = textureProjLodOffset(s2D, c3D, c1D, ic2D); + v = textureGrad(sCube, c3D, c3D, c3D); + f = textureGradOffset(s2DArrayShadow, c4D, c2D, c2D, ic2D); + v = textureProjGrad(s3D, c4D, c3D, c3D); + v = textureProjGradOffset(s2D, c3D, c2D, c2D, ic2D); + + ivec4 iv; + iv = texture(is2D, c2D); + iv = textureProjOffset(is2D, c4D, ic2D); + iv = textureProjLod(is2D, c3D, c1D); + iv = textureProjGrad(is2D, c3D, c2D, c2D); + iv = texture(is3D, c3D, 4.2); + iv = textureLod(isCube, c3D, c1D); + iv = texelFetch(is2DArray, ic3D, ic1D); + + iv.xy = textureSize(sCubeShadow, 2); +} + +void foo23() +{ + textureOffset(s2DShadow, c3D, ivec2(-8, 7), c1D); +}