2021-06-10 18:49:14 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
|
|
|
; Bound: 43
|
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
2021-08-05 17:34:19 +00:00
|
|
|
OpEntryPoint GLCompute %main "main" %GlobalInvocationId_1
|
2021-06-10 18:49:14 +00:00
|
|
|
OpExecutionMode %main LocalSize 1 1 1
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %GlobalInvocationId_1 "GlobalInvocationId_1"
|
2021-06-10 18:49:14 +00:00
|
|
|
OpName %width "width"
|
|
|
|
OpName %tex "tex"
|
|
|
|
OpName %Result "Result"
|
|
|
|
OpMemberName %Result 0 "values"
|
|
|
|
OpName %result "result"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %main_inner "main_inner"
|
|
|
|
OpName %GlobalInvocationId "GlobalInvocationId"
|
2021-06-10 18:49:14 +00:00
|
|
|
OpName %main "main"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpDecorate %GlobalInvocationId_1 BuiltIn GlobalInvocationId
|
2021-06-10 18:49:14 +00:00
|
|
|
OpDecorate %tex DescriptorSet 0
|
|
|
|
OpDecorate %tex Binding 0
|
|
|
|
OpDecorate %Result Block
|
|
|
|
OpMemberDecorate %Result 0 Offset 0
|
|
|
|
OpDecorate %_runtimearr_float ArrayStride 4
|
|
|
|
OpDecorate %result DescriptorSet 0
|
|
|
|
OpDecorate %result Binding 1
|
|
|
|
%uint = OpTypeInt 32 0
|
2021-08-05 17:34:19 +00:00
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
|
|
|
%GlobalInvocationId_1 = OpVariable %_ptr_Input_v3uint Input
|
2021-06-10 18:49:14 +00:00
|
|
|
%width = OpConstant %uint 128
|
|
|
|
%float = OpTypeFloat 32
|
2021-08-05 17:34:19 +00:00
|
|
|
%8 = OpTypeImage %float 2D 1 0 0 1 Unknown
|
|
|
|
%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8
|
|
|
|
%tex = OpVariable %_ptr_UniformConstant_8 UniformConstant
|
2021-06-10 18:49:14 +00:00
|
|
|
%_runtimearr_float = OpTypeRuntimeArray %float
|
|
|
|
%Result = OpTypeStruct %_runtimearr_float
|
|
|
|
%_ptr_StorageBuffer_Result = OpTypePointer StorageBuffer %Result
|
|
|
|
%result = OpVariable %_ptr_StorageBuffer_Result StorageBuffer
|
|
|
|
%void = OpTypeVoid
|
2021-08-05 17:34:19 +00:00
|
|
|
%14 = OpTypeFunction %void %v3uint
|
2021-06-10 18:49:14 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
|
|
|
%v4float = OpTypeVector %float 4
|
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%v2int = OpTypeVector %int 2
|
|
|
|
%int_0 = OpConstant %int 0
|
2021-08-05 17:34:19 +00:00
|
|
|
%38 = OpTypeFunction %void
|
|
|
|
%main_inner = OpFunction %void None %14
|
|
|
|
%GlobalInvocationId = OpFunctionParameter %v3uint
|
|
|
|
%18 = OpLabel
|
|
|
|
%20 = OpCompositeExtract %uint %GlobalInvocationId 1
|
|
|
|
%21 = OpIMul %uint %20 %width
|
|
|
|
%22 = OpCompositeExtract %uint %GlobalInvocationId 0
|
|
|
|
%23 = OpIAdd %uint %21 %22
|
|
|
|
%25 = OpAccessChain %_ptr_StorageBuffer_float %result %uint_0 %23
|
|
|
|
%29 = OpLoad %8 %tex
|
|
|
|
%33 = OpCompositeExtract %uint %GlobalInvocationId 0
|
|
|
|
%32 = OpBitcast %int %33
|
|
|
|
%35 = OpCompositeExtract %uint %GlobalInvocationId 1
|
|
|
|
%34 = OpBitcast %int %35
|
|
|
|
%36 = OpCompositeConstruct %v2int %32 %34
|
|
|
|
%27 = OpImageFetch %v4float %29 %36 Lod %int_0
|
|
|
|
%26 = OpCompositeExtract %float %27 0
|
|
|
|
OpStore %25 %26
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
|
|
|
%main = OpFunction %void None %38
|
|
|
|
%40 = OpLabel
|
|
|
|
%42 = OpLoad %v3uint %GlobalInvocationId_1
|
|
|
|
%41 = OpFunctionCall %void %main_inner %42
|
2021-06-10 18:49:14 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|