| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Google spiregg; 0 |
| 4 |
; Bound: 42 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpMemoryModel Logical GLSL450 |
| 8 |
OpEntryPoint GLCompute %cs_test "main" %gl_GlobalInvocationID %gl_LocalInvocationIndex |
| 9 |
OpExecutionMode %cs_test LocalSize 8 8 1 |
| 10 |
OpSource HLSL 600 |
| 11 |
OpName %type_2d_image "type.2d.image" |
| 12 |
OpName %outImageTexture "outImageTexture" |
| 13 |
OpName %cs_test "cs_test" |
| 14 |
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId |
| 15 |
OpDecorate %gl_LocalInvocationIndex BuiltIn LocalInvocationIndex |
| 16 |
OpDecorate %outImageTexture DescriptorSet 0 |
| 17 |
OpDecorate %outImageTexture Binding 1 |
| 18 |
%float = OpTypeFloat 32 |
| 19 |
%float_5 = OpConstant %float 5 |
| 20 |
%float_1 = OpConstant %float 1 |
| 21 |
%int = OpTypeInt 32 1 |
| 22 |
%int_7 = OpConstant %int 7 |
| 23 |
%int_0 = OpConstant %int 0 |
| 24 |
%int_1 = OpConstant %int 1 |
| 25 |
%type_2d_image = OpTypeImage %float 2D 2 0 0 2 Rgba32f |
| 26 |
%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image |
| 27 |
%uint = OpTypeInt 32 0 |
| 28 |
%v3uint = OpTypeVector %uint 3 |
| 29 |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| 30 |
%_ptr_Input_uint = OpTypePointer Input %uint |
| 31 |
%void = OpTypeVoid |
| 32 |
%19 = OpTypeFunction %void |
| 33 |
%v2uint = OpTypeVector %uint 2 |
| 34 |
%v4float = OpTypeVector %float 4 |
| 35 |
%bool = OpTypeBool |
| 36 |
%outImageTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant |
| 37 |
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input |
| 38 |
%gl_LocalInvocationIndex = OpVariable %_ptr_Input_uint Input |
| 39 |
%cs_test = OpFunction %void None %19 |
| 40 |
%23 = OpLabel |
| 41 |
%24 = OpLoad %v3uint %gl_GlobalInvocationID |
| 42 |
%25 = OpVectorShuffle %v2uint %24 %24 0 1 |
| 43 |
OpBranch %26 |
| 44 |
%26 = OpLabel |
| 45 |
%27 = OpPhi %int %int_7 %23 %28 %29 |
| 46 |
%30 = OpPhi %int %int_7 %23 %27 %29 |
| 47 |
%31 = OpSGreaterThanEqual %bool %27 %int_0 |
| 48 |
OpLoopMerge %32 %29 None |
| 49 |
OpBranchConditional %31 %33 %32 |
| 50 |
%33 = OpLabel |
| 51 |
%34 = OpConvertSToF %float %27 |
| 52 |
%35 = OpFOrdGreaterThan %bool %float_5 %34 |
| 53 |
OpSelectionMerge %29 None |
| 54 |
OpBranchConditional %35 %36 %29 |
| 55 |
%36 = OpLabel |
| 56 |
OpBranch %32 |
| 57 |
%29 = OpLabel |
| 58 |
%28 = OpISub %int %27 %int_1 |
| 59 |
OpBranch %26 |
| 60 |
%32 = OpLabel |
| 61 |
%37 = OpISub %int %30 %int_1 |
| 62 |
%38 = OpConvertSToF %float %37 |
| 63 |
%39 = OpConvertSToF %float %30 |
| 64 |
%40 = OpCompositeConstruct %v4float %38 %39 %float_1 %float_1 |
| 65 |
%41 = OpLoad %type_2d_image %outImageTexture |
| 66 |
OpImageWrite %41 %25 %40 None |
| 67 |
OpReturn |
| 68 |
OpFunctionEnd |