Advertisement
Guest User

SPIR-V shader

a guest
Sep 15th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 11.85 KB | None | 0 0
  1. ; SPIR-V
  2. ; Version: 1.3
  3. ; Generator: Khronos; 0
  4. ; Bound: 1011
  5. ; Schema: 0
  6.                OpCapability StorageUniform16
  7.                OpCapability Shader
  8.                OpCapability ImageQuery
  9.                OpCapability Image1D
  10.                OpExtension "SPV_KHR_storage_buffer_storage_class"
  11.                OpExtension "SPV_KHR_variable_pointers"
  12.         %194 = OpExtInstImport "GLSL.std.450"
  13.                OpMemoryModel Logical GLSL450
  14.                OpEntryPoint Vertex %1008 "main" %vertex_index %instance_index %per_vertex %in_attr0 %in_attr1 %in_attr2 %in_attr3 %out_attr0 %out_attr1 %out_attr2
  15.                OpDecorate %CbufStd140Array ArrayStride 16
  16.                OpDecorate %CbufScalarArray ArrayStride 4
  17.                OpDecorate %_struct_35 Block
  18.                OpMemberDecorate %_struct_35 0 Offset 0
  19.                OpDecorate %_struct_36 Block
  20.                OpMemberDecorate %_struct_36 0 Offset 0
  21.                OpDecorate %GmemArray ArrayStride 4
  22.                OpDecorate %_struct_41 Block
  23.                OpMemberDecorate %_struct_41 0 Offset 0
  24.                OpDecorate %vertex_index BuiltIn VertexIndex
  25.                OpDecorate %instance_index BuiltIn InstanceIndex
  26.                OpDecorate %PerVertex Block
  27.                OpMemberDecorate %PerVertex 0 BuiltIn Position
  28.                OpDecorate %in_attr0 Location 0
  29.                OpDecorate %in_attr1 Location 1
  30.                OpDecorate %in_attr2 Location 2
  31.                OpDecorate %in_attr3 Location 3
  32.                OpDecorate %out_attr0 Location 0
  33.                OpDecorate %out_attr1 Location 1
  34.                OpDecorate %out_attr2 Location 2
  35.                OpDecorate %cbuf_1 Binding 0
  36.                OpDecorate %cbuf_1 DescriptorSet 0
  37.                OpDecorate %cbuf_8 Binding 1
  38.                OpDecorate %cbuf_8 DescriptorSet 0
  39.                OpDecorate %cbuf_9 Binding 2
  40.                OpDecorate %cbuf_9 DescriptorSet 0
  41.                OpDecorate %cbuf_10 Binding 3
  42.                OpDecorate %cbuf_10 DescriptorSet 0
  43.        %void = OpTypeVoid
  44.        %bool = OpTypeBool
  45.       %bool2 = OpTypeVector %bool 2
  46.         %int = OpTypeInt 32 1
  47.        %int2 = OpTypeVector %int 2
  48.        %int3 = OpTypeVector %int 3
  49.        %int4 = OpTypeVector %int 4
  50.        %uint = OpTypeInt 32 0
  51.       %uint2 = OpTypeVector %uint 2
  52.       %uint3 = OpTypeVector %uint 3
  53.       %uint4 = OpTypeVector %uint 4
  54.       %float = OpTypeFloat 32
  55.      %float2 = OpTypeVector %float 2
  56.      %float3 = OpTypeVector %float 3
  57.      %float4 = OpTypeVector %float 4
  58.    %prv_bool = OpTypePointer Private %bool
  59.   %prv_float = OpTypePointer Private %float
  60.   %func_uint = OpTypePointer Function %uint
  61.     %in_bool = OpTypePointer Input %bool
  62.      %in_int = OpTypePointer Input %int
  63.     %in_int4 = OpTypePointer Input %int4
  64.     %in_uint = OpTypePointer Input %uint
  65.    %in_uint3 = OpTypePointer Input %uint3
  66.    %in_uint4 = OpTypePointer Input %uint4
  67.    %in_float = OpTypePointer Input %float
  68.   %in_float2 = OpTypePointer Input %float2
  69.   %in_float4 = OpTypePointer Input %float4
  70.   %out_float = OpTypePointer Output %float
  71.  %out_float4 = OpTypePointer Output %float4
  72. %_ptr_Uniform_float = OpTypePointer Uniform %float
  73.   %uint_4096 = OpConstant %uint 4096
  74. %CbufStd140Array = OpTypeArray %float4 %uint_4096
  75.  %uint_16384 = OpConstant %uint 16384
  76. %CbufScalarArray = OpTypeArray %float %uint_16384
  77.  %_struct_35 = OpTypeStruct %CbufStd140Array
  78.  %_struct_36 = OpTypeStruct %CbufScalarArray
  79. %_ptr_Uniform__struct_35 = OpTypePointer Uniform %_struct_35
  80. %_ptr_Uniform__struct_36 = OpTypePointer Uniform %_struct_36
  81. %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
  82.   %GmemArray = OpTypeRuntimeArray %float
  83.  %_struct_41 = OpTypeStruct %GmemArray
  84. %_ptr_StorageBuffer__struct_41 = OpTypePointer StorageBuffer %_struct_41
  85.     %float_0 = OpConstant %float 0
  86.        %true = OpConstantTrue %bool
  87.       %false = OpConstantFalse %bool
  88.   %PerVertex = OpTypeStruct %float4
  89. %_ptr_Output_PerVertex = OpTypePointer Output %PerVertex
  90.          %85 = OpConstantNull %float4
  91.          %93 = OpTypeFunction %void
  92.     %uint_10 = OpConstant %uint 10
  93.     %uint_20 = OpConstant %uint 20
  94. %_arr_uint_uint_20 = OpTypeArray %uint %uint_20
  95.         %105 = OpConstantNull %_arr_uint_uint_20
  96. %_ptr_Function__arr_uint_uint_20 = OpTypePointer Function %_arr_uint_uint_20
  97.      %uint_0 = OpConstant %uint 0
  98.      %uint_3 = OpConstant %uint 3
  99.      %uint_2 = OpConstant %uint 2
  100.     %uint_32 = OpConstant %uint 32
  101.    %uint_0_0 = OpConstant %uint 0
  102.     %uint_29 = OpConstant %uint 29
  103.    %uint_292 = OpConstant %uint 292
  104.      %uint_1 = OpConstant %uint 1
  105. %uint_1084227584 = OpConstant %uint 1084227584
  106.   %float_0_5 = OpConstant %float 0.5
  107.     %uint_49 = OpConstant %uint 49
  108. %uint_1056964608 = OpConstant %uint 1056964608
  109. %uint_1048576 = OpConstant %uint 1048576
  110. %uint_524288 = OpConstant %uint 524288
  111.     %uint_80 = OpConstant %uint 80
  112. %uint_1065353216 = OpConstant %uint 1065353216
  113.      %uint_4 = OpConstant %uint 4
  114.      %uint_5 = OpConstant %uint 5
  115.      %uint_6 = OpConstant %uint 6
  116.     %uint_96 = OpConstant %uint 96
  117.   %uint_1536 = OpConstant %uint 1536
  118. %uint_3204448256 = OpConstant %uint 3204448256
  119.     %uint_64 = OpConstant %uint 64
  120.    %uint_100 = OpConstant %uint 100
  121.     %uint_52 = OpConstant %uint 52
  122.    %uint_208 = OpConstant %uint 208
  123.   %uint_1540 = OpConstant %uint 1540
  124.     %uint_68 = OpConstant %uint 68
  125.    %uint_212 = OpConstant %uint 212
  126.     %uint_56 = OpConstant %uint 56
  127.    %uint_192 = OpConstant %uint 192
  128.    %uint_224 = OpConstant %uint 224
  129. %uint_4294967295 = OpConstant %uint 4294967295
  130.     %uint_84 = OpConstant %uint 84
  131.    %uint_228 = OpConstant %uint 228
  132.     %uint_72 = OpConstant %uint 72
  133.    %uint_196 = OpConstant %uint 196
  134.     %uint_88 = OpConstant %uint 88
  135.    %uint_216 = OpConstant %uint 216
  136.    %uint_104 = OpConstant %uint 104
  137.    %uint_232 = OpConstant %uint 232
  138.     %uint_76 = OpConstant %uint 76
  139.    %uint_200 = OpConstant %uint 200
  140.     %uint_92 = OpConstant %uint 92
  141.    %uint_220 = OpConstant %uint 220
  142.    %uint_108 = OpConstant %uint 108
  143.    %uint_236 = OpConstant %uint 236
  144.    %uint_204 = OpConstant %uint 204
  145.    %uint_960 = OpConstant %uint 960
  146.    %uint_964 = OpConstant %uint 964
  147.    %uint_968 = OpConstant %uint 968
  148.     %uint_48 = OpConstant %uint 48
  149.    %uint_944 = OpConstant %uint 944
  150.      %uint_8 = OpConstant %uint 8
  151.    %uint_160 = OpConstant %uint 160
  152.    %uint_176 = OpConstant %uint 176
  153.    %uint_144 = OpConstant %uint 144
  154.    %uint_128 = OpConstant %uint 128
  155.    %uint_776 = OpConstant %uint 776
  156.    %uint_780 = OpConstant %uint 780
  157.    %uint_768 = OpConstant %uint 768
  158.    %uint_164 = OpConstant %uint 164
  159.    %uint_180 = OpConstant %uint 180
  160.    %uint_148 = OpConstant %uint 148
  161.    %uint_132 = OpConstant %uint 132
  162.   %uint_1088 = OpConstant %uint 1088
  163.    %uint_772 = OpConstant %uint 772
  164.    %uint_168 = OpConstant %uint 168
  165.    %uint_184 = OpConstant %uint 184
  166.    %uint_152 = OpConstant %uint 152
  167.    %uint_136 = OpConstant %uint 136
  168.     %uint_12 = OpConstant %uint 12
  169.    %uint_172 = OpConstant %uint 172
  170.    %uint_188 = OpConstant %uint 188
  171.    %uint_156 = OpConstant %uint 156
  172.    %uint_140 = OpConstant %uint 140
  173. %vertex_index = OpVariable %in_uint Input
  174. %instance_index = OpVariable %in_uint Input
  175.  %per_vertex = OpVariable %_ptr_Output_PerVertex Output
  176.       %gpr_0 = OpVariable %prv_float Private %float_0
  177.       %gpr_1 = OpVariable %prv_float Private %float_0
  178.       %gpr_2 = OpVariable %prv_float Private %float_0
  179.       %gpr_3 = OpVariable %prv_float Private %float_0
  180.       %gpr_4 = OpVariable %prv_float Private %float_0
  181.       %gpr_5 = OpVariable %prv_float Private %float_0
  182.       %gpr_6 = OpVariable %prv_float Private %float_0
  183.       %gpr_7 = OpVariable %prv_float Private %float_0
  184.       %gpr_8 = OpVariable %prv_float Private %float_0
  185.       %gpr_9 = OpVariable %prv_float Private %float_0
  186.      %gpr_10 = OpVariable %prv_float Private %float_0
  187.      %gpr_11 = OpVariable %prv_float Private %float_0
  188.      %gpr_12 = OpVariable %prv_float Private %float_0
  189.      %gpr_13 = OpVariable %prv_float Private %float_0
  190.      %gpr_14 = OpVariable %prv_float Private %float_0
  191.      %gpr_16 = OpVariable %prv_float Private %float_0
  192.      %pred_0 = OpVariable %prv_bool Private %false
  193.      %pred_1 = OpVariable %prv_bool Private %false
  194.      %pred_2 = OpVariable %prv_bool Private %false
  195.      %pred_3 = OpVariable %prv_bool Private %false
  196.      %pred_4 = OpVariable %prv_bool Private %false
  197.      %pred_5 = OpVariable %prv_bool Private %false
  198.      %pred_6 = OpVariable %prv_bool Private %false
  199.        %zero = OpVariable %prv_bool Private %false
  200.        %sign = OpVariable %prv_bool Private %false
  201.       %carry = OpVariable %prv_bool Private %false
  202.    %overflow = OpVariable %prv_bool Private %false
  203.    %in_attr0 = OpVariable %in_float4 Input
  204.    %in_attr1 = OpVariable %in_float4 Input
  205.    %in_attr2 = OpVariable %in_float4 Input
  206.    %in_attr3 = OpVariable %in_float4 Input
  207.   %out_attr0 = OpVariable %out_float4 Output %85
  208.   %out_attr1 = OpVariable %out_float4 Output %85
  209.   %out_attr2 = OpVariable %out_float4 Output %85
  210.      %cbuf_1 = OpVariable %_ptr_Uniform__struct_36 Uniform
  211.      %cbuf_8 = OpVariable %_ptr_Uniform__struct_36 Uniform
  212.      %cbuf_9 = OpVariable %_ptr_Uniform__struct_36 Uniform
  213.     %cbuf_10 = OpVariable %_ptr_Uniform__struct_36 Uniform
  214.          %94 = OpFunction %void None %93
  215.          %95 = OpLabel
  216.      %jmp_to = OpVariable %func_uint Function %uint_10
  217. %ssy_flow_stack = OpVariable %_ptr_Function__arr_uint_uint_20 Function %105
  218. %ssy_flow_stack_top = OpVariable %func_uint Function %uint_0
  219. %pbk_flow_stack = OpVariable %_ptr_Function__arr_uint_uint_20 Function %105
  220. %pbk_flow_stack_top = OpVariable %func_uint Function %uint_0
  221.                OpBranch %loop
  222.        %loop = OpLabel
  223.                OpLoopMerge %merge %continue None
  224.                OpBranch %98
  225.          %98 = OpLabel
  226.         %113 = OpLoad %uint %jmp_to
  227.                OpSelectionMerge %99 None
  228.                OpSwitch %113 %112 10 %label_0xa 29 %label_0x1d 49 %label_0x31
  229.         %112 = OpLabel
  230.                OpReturn
  231.   %label_0xa = OpLabel
  232.                OpBranch %label_0x1d
  233.  %label_0x1d = OpLabel
  234.  
  235. ;; vkBegin
  236.         %176 = OpLoad %bool %pred_0
  237.         %177 = OpLogicalNot %bool %176
  238. ;               OpSelectionMerge %175 None
  239. ;               OpBranchConditional %177 %174 %175
  240. ;        %174 = OpLabel
  241. ;        %178 = OpAccessChain %out_float %per_vertex %uint_0_0 %uint_2
  242. ;        %179 = OpAccessChain %out_float %per_vertex %uint_0_0 %uint_3
  243. ;        %180 = OpLoad %float %178
  244. ;        %181 = OpLoad %float %179
  245. ;        %182 = OpFAdd %float %180 %181
  246. ;        %184 = OpFMul %float %182 %float_0_5
  247. ;               OpStore %178 %184
  248.  
  249.         %185 = OpLoad %bool %pred_0
  250.         %186 = OpLogicalNot %bool %185
  251.                OpSelectionMerge %188 None
  252.                OpBranchConditional %186 %187 %188 1 0
  253.         %187 = OpLabel
  254.                OpReturn
  255.         %188 = OpLabel
  256.                OpBranch %175
  257.         %175 = OpLabel
  258. ;; vkEnd
  259.  
  260. %00128_ST_A__0xeff07f800787ff00_ = OpUndef %void
  261.         %236 = OpAccessChain %out_float %per_vertex %uint_0_0 %uint_2
  262.         %237 = OpLoad %float %gpr_0
  263.                OpStore %236 %237
  264.                OpStore %jmp_to %uint_49
  265.                OpSelectionMerge %239 None
  266.                OpBranchConditional %true %238 %239 1 0
  267.         %238 = OpLabel
  268.                OpBranch %continue
  269.         %239 = OpLabel
  270.                OpBranch %label_0x31
  271.  %label_0x31 = OpLabel
  272.  
  273.                OpSelectionMerge %1007 None
  274.                OpBranchConditional %true %1006 %1007 1 0
  275.        %1006 = OpLabel
  276.                OpReturn
  277.        %1007 = OpLabel
  278.                OpBranch %112
  279.          %99 = OpLabel
  280.                OpBranch %continue
  281.    %continue = OpLabel
  282.                OpBranch %loop
  283.       %merge = OpLabel
  284.                OpReturn
  285.                OpFunctionEnd
  286.        %1008 = OpFunction %void None %93
  287.        %1009 = OpLabel
  288.        %1010 = OpFunctionCall %void %94
  289.                OpReturn
  290.                OpFunctionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement