| 1 |
; SPIR-V |
| 2 |
; Version: 1.4 |
| 3 |
; Generator: Khronos SPIR-V Tools Assembler; 0 |
| 4 |
; Bound: 97 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpCapability IntegerFunctions2INTEL |
| 8 |
OpExtension "SPV_INTEL_shader_integer_functions2" |
| 9 |
%1 = OpExtInstImport "GLSL.std.450" |
| 10 |
OpMemoryModel Logical GLSL450 |
| 11 |
OpEntryPoint GLCompute %main "main" |
| 12 |
OpExecutionMode %main LocalSize 1 1 1 |
| 13 |
OpName %main "main" |
| 14 |
OpName %foo "foo" |
| 15 |
OpMemberName %foo 0 "a" |
| 16 |
OpMemberName %foo 1 "b" |
| 17 |
OpMemberName %foo 2 "c" |
| 18 |
OpMemberName %foo 3 "d" |
| 19 |
OpName %_ "" |
| 20 |
OpMemberDecorate %foo 0 Offset 0 |
| 21 |
OpMemberDecorate %foo 1 Offset 4 |
| 22 |
OpMemberDecorate %foo 2 Offset 8 |
| 23 |
OpMemberDecorate %foo 3 Offset 12 |
| 24 |
OpDecorate %foo Block |
| 25 |
OpDecorate %_ DescriptorSet 0 |
| 26 |
OpDecorate %_ Binding 0 |
| 27 |
%void = OpTypeVoid |
| 28 |
%6 = OpTypeFunction %void |
| 29 |
%uint = OpTypeInt 32 0 |
| 30 |
%int = OpTypeInt 32 1 |
| 31 |
%foo = OpTypeStruct %uint %uint %int %int |
| 32 |
%_ptr_StorageBuffer_foo = OpTypePointer StorageBuffer %foo |
| 33 |
%_ = OpVariable %_ptr_StorageBuffer_foo StorageBuffer |
| 34 |
%int_0 = OpConstant %int 0 |
| 35 |
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| 36 |
%int_1 = OpConstant %int 1 |
| 37 |
%int_2 = OpConstant %int 2 |
| 38 |
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| 39 |
%int_3 = OpConstant %int 3 |
| 40 |
%main = OpFunction %void None %6 |
| 41 |
%15 = OpLabel |
| 42 |
%16 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 43 |
%17 = OpLoad %uint %16 |
| 44 |
%18 = OpUCountLeadingZerosINTEL %uint %17 |
| 45 |
%19 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 46 |
OpStore %19 %18 |
| 47 |
%20 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 48 |
%21 = OpLoad %uint %20 |
| 49 |
%22 = OpUCountTrailingZerosINTEL %uint %21 |
| 50 |
%23 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 51 |
OpStore %23 %22 |
| 52 |
%24 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 53 |
%25 = OpLoad %int %24 |
| 54 |
%26 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 55 |
%27 = OpLoad %int %26 |
| 56 |
%28 = OpAbsISubINTEL %uint %25 %27 |
| 57 |
%29 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 58 |
OpStore %29 %28 |
| 59 |
%30 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 60 |
%31 = OpLoad %uint %30 |
| 61 |
%32 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 62 |
%33 = OpLoad %uint %32 |
| 63 |
%34 = OpAbsUSubINTEL %uint %31 %33 |
| 64 |
%35 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 65 |
OpStore %35 %34 |
| 66 |
%37 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 67 |
%38 = OpLoad %int %37 |
| 68 |
%39 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 69 |
%40 = OpLoad %int %39 |
| 70 |
%41 = OpIAddSatINTEL %int %38 %40 |
| 71 |
%42 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 72 |
OpStore %42 %41 |
| 73 |
%43 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 74 |
%44 = OpLoad %uint %43 |
| 75 |
%45 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 76 |
%46 = OpLoad %uint %45 |
| 77 |
%47 = OpUAddSatINTEL %uint %44 %46 |
| 78 |
%48 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 79 |
OpStore %48 %47 |
| 80 |
%49 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 81 |
%50 = OpLoad %int %49 |
| 82 |
%51 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 83 |
%52 = OpLoad %int %51 |
| 84 |
%53 = OpIAverageINTEL %int %50 %52 |
| 85 |
%54 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 86 |
OpStore %54 %53 |
| 87 |
%55 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 88 |
%56 = OpLoad %uint %55 |
| 89 |
%57 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 90 |
%58 = OpLoad %uint %57 |
| 91 |
%59 = OpUAverageINTEL %uint %56 %58 |
| 92 |
%60 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 93 |
OpStore %60 %59 |
| 94 |
%61 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 95 |
%62 = OpLoad %int %61 |
| 96 |
%63 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 97 |
%64 = OpLoad %int %63 |
| 98 |
%65 = OpIAverageRoundedINTEL %int %62 %64 |
| 99 |
%66 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 100 |
OpStore %66 %65 |
| 101 |
%67 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 102 |
%68 = OpLoad %uint %67 |
| 103 |
%69 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 104 |
%70 = OpLoad %uint %69 |
| 105 |
%71 = OpUAverageRoundedINTEL %uint %68 %70 |
| 106 |
%72 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 107 |
OpStore %72 %71 |
| 108 |
%73 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 109 |
%74 = OpLoad %int %73 |
| 110 |
%75 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 111 |
%76 = OpLoad %int %75 |
| 112 |
%77 = OpISubSatINTEL %int %74 %76 |
| 113 |
%78 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 114 |
OpStore %78 %77 |
| 115 |
%79 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 116 |
%80 = OpLoad %uint %79 |
| 117 |
%81 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 118 |
%82 = OpLoad %uint %81 |
| 119 |
%83 = OpUSubSatINTEL %uint %80 %82 |
| 120 |
%84 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 121 |
OpStore %84 %83 |
| 122 |
%85 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 123 |
%86 = OpLoad %int %85 |
| 124 |
%87 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_3 |
| 125 |
%88 = OpLoad %int %87 |
| 126 |
%89 = OpIMul32x16INTEL %int %86 %88 |
| 127 |
%90 = OpAccessChain %_ptr_StorageBuffer_int %_ %int_2 |
| 128 |
OpStore %90 %89 |
| 129 |
%91 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 130 |
%92 = OpLoad %uint %91 |
| 131 |
%93 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_1 |
| 132 |
%94 = OpLoad %uint %93 |
| 133 |
%95 = OpUMul32x16INTEL %uint %92 %94 |
| 134 |
%96 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 |
| 135 |
OpStore %96 %95 |
| 136 |
OpReturn |
| 137 |
OpFunctionEnd |