blob: 6c8877bf90e0a580689db9ec702597d23c7cfbb7 [file] [log] [blame]
;
; fragment_main
;
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 45
; Schema: 0
OpCapability Shader
%26 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %fragment_main "fragment_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpMemberName %prevent_dce_block 0 "inner"
OpName %prevent_dce_block "prevent_dce_block"
OpName %smoothstep_40864c "smoothstep_40864c"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %arg_2 "arg_2"
OpName %res "res"
OpName %fragment_main "fragment_main"
OpMemberDecorate %prevent_dce_block 0 Offset 0
OpDecorate %prevent_dce_block Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 Coherent
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%prevent_dce_block = OpTypeStruct %v4float
%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
%1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
%7 = OpTypeFunction %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_2 = OpConstant %float 2
%11 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%float_4 = OpConstant %float 4
%14 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
%float_3 = OpConstant %float 3
%17 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3
%27 = OpConstantNull %v4float
%float_1 = OpConstant %float 1
%28 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%void = OpTypeVoid
%38 = OpTypeFunction %void
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%smoothstep_40864c = OpFunction %v4float None %7
%8 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function
%arg_1 = OpVariable %_ptr_Function_v4float Function
%arg_2 = OpVariable %_ptr_Function_v4float Function
%res = OpVariable %_ptr_Function_v4float Function
OpStore %arg_0 %11
OpStore %arg_1 %14
OpStore %arg_2 %17
%19 = OpLoad %v4float %arg_0 None
%20 = OpLoad %v4float %arg_1 None
%21 = OpLoad %v4float %arg_2 None
%22 = OpFSub %v4float %21 %19
%23 = OpFSub %v4float %20 %19
%24 = OpFDiv %v4float %22 %23
%25 = OpExtInst %v4float %26 NClamp %24 %27 %28
%30 = OpFMul %v4float %11 %25
%31 = OpFSub %v4float %17 %30
%32 = OpFMul %v4float %25 %31
%33 = OpFMul %v4float %25 %32
OpStore %res %33
%35 = OpLoad %v4float %res None
OpReturnValue %35
OpFunctionEnd
%fragment_main = OpFunction %void None %38
%39 = OpLabel
%40 = OpFunctionCall %v4float %smoothstep_40864c
%41 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
OpStore %41 %40 None
OpReturn
OpFunctionEnd
;
; compute_main
;
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 45
; Schema: 0
OpCapability Shader
%26 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %compute_main LocalSize 1 1 1
OpMemberName %prevent_dce_block 0 "inner"
OpName %prevent_dce_block "prevent_dce_block"
OpName %smoothstep_40864c "smoothstep_40864c"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %arg_2 "arg_2"
OpName %res "res"
OpName %compute_main "compute_main"
OpMemberDecorate %prevent_dce_block 0 Offset 0
OpDecorate %prevent_dce_block Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 Coherent
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%prevent_dce_block = OpTypeStruct %v4float
%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
%1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
%7 = OpTypeFunction %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_2 = OpConstant %float 2
%11 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%float_4 = OpConstant %float 4
%14 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
%float_3 = OpConstant %float 3
%17 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3
%27 = OpConstantNull %v4float
%float_1 = OpConstant %float 1
%28 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%void = OpTypeVoid
%38 = OpTypeFunction %void
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%smoothstep_40864c = OpFunction %v4float None %7
%8 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function
%arg_1 = OpVariable %_ptr_Function_v4float Function
%arg_2 = OpVariable %_ptr_Function_v4float Function
%res = OpVariable %_ptr_Function_v4float Function
OpStore %arg_0 %11
OpStore %arg_1 %14
OpStore %arg_2 %17
%19 = OpLoad %v4float %arg_0 None
%20 = OpLoad %v4float %arg_1 None
%21 = OpLoad %v4float %arg_2 None
%22 = OpFSub %v4float %21 %19
%23 = OpFSub %v4float %20 %19
%24 = OpFDiv %v4float %22 %23
%25 = OpExtInst %v4float %26 NClamp %24 %27 %28
%30 = OpFMul %v4float %11 %25
%31 = OpFSub %v4float %17 %30
%32 = OpFMul %v4float %25 %31
%33 = OpFMul %v4float %25 %32
OpStore %res %33
%35 = OpLoad %v4float %res None
OpReturnValue %35
OpFunctionEnd
%compute_main = OpFunction %void None %38
%39 = OpLabel
%40 = OpFunctionCall %v4float %smoothstep_40864c
%41 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0
OpStore %41 %40 None
OpReturn
OpFunctionEnd
;
; vertex_main
;
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 59
; Schema: 0
OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output
OpName %vertex_main_position_Output "vertex_main_position_Output"
OpName %vertex_main_loc0_Output "vertex_main_loc0_Output"
OpName %vertex_main___point_size_Output "vertex_main___point_size_Output"
OpName %smoothstep_40864c "smoothstep_40864c"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %arg_2 "arg_2"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpMemberName %VertexOutput 0 "pos"
OpMemberName %VertexOutput 1 "prevent_dce"
OpName %VertexOutput "VertexOutput"
OpName %out "out"
OpName %vertex_main "vertex_main"
OpDecorate %vertex_main_position_Output BuiltIn Position
OpDecorate %vertex_main_loc0_Output Location 0
OpDecorate %vertex_main_loc0_Output Flat
OpDecorate %vertex_main___point_size_Output BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output
%vertex_main_loc0_Output = OpVariable %_ptr_Output_v4float Output
%_ptr_Output_float = OpTypePointer Output %float
%vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output
%9 = OpTypeFunction %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_2 = OpConstant %float 2
%13 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%float_4 = OpConstant %float 4
%16 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
%float_3 = OpConstant %float 3
%19 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3
%29 = OpConstantNull %v4float
%float_1 = OpConstant %float 1
%30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%VertexOutput = OpTypeStruct %v4float %v4float
%40 = OpTypeFunction %VertexOutput
%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
%44 = OpConstantNull %VertexOutput
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%54 = OpTypeFunction %void
%smoothstep_40864c = OpFunction %v4float None %9
%10 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function
%arg_1 = OpVariable %_ptr_Function_v4float Function
%arg_2 = OpVariable %_ptr_Function_v4float Function
%res = OpVariable %_ptr_Function_v4float Function
OpStore %arg_0 %13
OpStore %arg_1 %16
OpStore %arg_2 %19
%21 = OpLoad %v4float %arg_0 None
%22 = OpLoad %v4float %arg_1 None
%23 = OpLoad %v4float %arg_2 None
%24 = OpFSub %v4float %23 %21
%25 = OpFSub %v4float %22 %21
%26 = OpFDiv %v4float %24 %25
%27 = OpExtInst %v4float %28 NClamp %26 %29 %30
%32 = OpFMul %v4float %13 %27
%33 = OpFSub %v4float %19 %32
%34 = OpFMul %v4float %27 %33
%35 = OpFMul %v4float %27 %34
OpStore %res %35
%37 = OpLoad %v4float %res None
OpReturnValue %37
OpFunctionEnd
%vertex_main_inner = OpFunction %VertexOutput None %40
%41 = OpLabel
%out = OpVariable %_ptr_Function_VertexOutput Function %44
%45 = OpAccessChain %_ptr_Function_v4float %out %uint_0
OpStore %45 %29 None
%48 = OpAccessChain %_ptr_Function_v4float %out %uint_1
%50 = OpFunctionCall %v4float %smoothstep_40864c
OpStore %48 %50 None
%51 = OpLoad %VertexOutput %out None
OpReturnValue %51
OpFunctionEnd
%vertex_main = OpFunction %void None %54
%55 = OpLabel
%56 = OpFunctionCall %VertexOutput %vertex_main_inner
%57 = OpCompositeExtract %v4float %56 0
OpStore %vertex_main_position_Output %57 None
%58 = OpCompositeExtract %v4float %56 1
OpStore %vertex_main_loc0_Output %58 None
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd