| 1 |
; SPIR-V |
| 2 |
; Version: 1.3 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 7 |
| 4 |
; Bound: 63 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpCapability ImageBuffer |
| 8 |
%1 = OpExtInstImport "GLSL.std.450" |
| 9 |
OpMemoryModel Logical GLSL450 |
| 10 |
OpEntryPoint GLCompute %main "main" %group_id %group_index |
| 11 |
OpExecutionMode %main LocalSize 32 1 1 |
| 12 |
OpSource HLSL 500 |
| 13 |
OpName %main "main" |
| 14 |
OpName %cb "cb" |
| 15 |
OpMemberName %cb 0 "value" |
| 16 |
OpName %_ "" |
| 17 |
OpName %buffer "buffer" |
| 18 |
OpName %group_id "group_id" |
| 19 |
OpName %group_index "group_index" |
| 20 |
OpMemberDecorate %cb 0 Offset 0 |
| 21 |
OpDecorate %cb Block |
| 22 |
OpDecorate %_ DescriptorSet 0 |
| 23 |
OpDecorate %_ Binding 7 |
| 24 |
OpDecorate %buffer DescriptorSet 0 |
| 25 |
OpDecorate %buffer Binding 0 |
| 26 |
OpDecorate %group_id BuiltIn WorkgroupId |
| 27 |
OpDecorate %group_index BuiltIn LocalInvocationIndex |
| 28 |
%void = OpTypeVoid |
| 29 |
%3 = OpTypeFunction %void |
| 30 |
%uint = OpTypeInt 32 0 |
| 31 |
%v3uint = OpTypeVector %uint 3 |
| 32 |
%uint_32 = OpConstant %uint 32 |
| 33 |
%float = OpTypeFloat 32 |
| 34 |
%cb = OpTypeStruct %float |
| 35 |
%_ptr_Uniform_cb = OpTypePointer Uniform %cb |
| 36 |
%_ = OpVariable %_ptr_Uniform_cb Uniform |
| 37 |
%int = OpTypeInt 32 1 |
| 38 |
%int_0 = OpConstant %int 0 |
| 39 |
%_ptr_Uniform_float = OpTypePointer Uniform %float |
| 40 |
%34 = OpTypeImage %float Buffer 0 0 0 2 R32f |
| 41 |
%_ptr_UniformConstant_34 = OpTypePointer UniformConstant %34 |
| 42 |
%buffer = OpVariable %_ptr_UniformConstant_34 UniformConstant |
| 43 |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| 44 |
%group_id = OpVariable %_ptr_Input_v3uint Input |
| 45 |
%_ptr_Input_uint = OpTypePointer Input %uint |
| 46 |
%group_index = OpVariable %_ptr_Input_uint Input |
| 47 |
%main = OpFunction %void None %3 |
| 48 |
%5 = OpLabel |
| 49 |
%43 = OpLoad %v3uint %group_id |
| 50 |
%47 = OpLoad %uint %group_index |
| 51 |
%56 = OpCompositeExtract %uint %43 0 |
| 52 |
%57 = OpIMul %uint %uint_32 %56 |
| 53 |
%59 = OpIAdd %uint %57 %47 |
| 54 |
%60 = OpAccessChain %_ptr_Uniform_float %_ %int_0 |
| 55 |
%61 = OpLoad %float %60 |
| 56 |
%62 = OpLoad %34 %buffer |
| 57 |
OpImageWrite %62 %59 %61 |
| 58 |
OpReturn |
| 59 |
OpFunctionEnd |