xref: /aosp_15_r20/external/skia/tests/sksl/compute/Uniforms.asm.comp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID
5               OpExecutionMode %main LocalSize 64 1 1
6               OpName %constants "constants"
7               OpMemberName %constants 0 "x"
8               OpName %outputBuffer "outputBuffer"
9               OpMemberName %outputBuffer 0 "results"
10               OpName %sk_GlobalInvocationID "sk_GlobalInvocationID"
11               OpName %main "main"
12               OpMemberDecorate %constants 0 Offset 0
13               OpDecorate %constants Block
14               OpDecorate %3 Binding 0
15               OpDecorate %3 DescriptorSet 0
16               OpDecorate %_runtimearr_int ArrayStride 4
17               OpMemberDecorate %outputBuffer 0 Offset 0
18               OpDecorate %outputBuffer BufferBlock
19               OpDecorate %7 Binding 1
20               OpDecorate %7 DescriptorSet 0
21               OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId
22        %int = OpTypeInt 32 1
23  %constants = OpTypeStruct %int
24%_ptr_Uniform_constants = OpTypePointer Uniform %constants
25          %3 = OpVariable %_ptr_Uniform_constants Uniform
26%_runtimearr_int = OpTypeRuntimeArray %int
27%outputBuffer = OpTypeStruct %_runtimearr_int
28%_ptr_Uniform_outputBuffer = OpTypePointer Uniform %outputBuffer
29          %7 = OpVariable %_ptr_Uniform_outputBuffer Uniform
30       %uint = OpTypeInt 32 0
31     %v3uint = OpTypeVector %uint 3
32%_ptr_Input_v3uint = OpTypePointer Input %v3uint
33%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
34       %void = OpTypeVoid
35         %16 = OpTypeFunction %void
36      %int_0 = OpConstant %int 0
37%_ptr_Uniform_int = OpTypePointer Uniform %int
38       %main = OpFunction %void None %16
39         %17 = OpLabel
40         %19 = OpLoad %v3uint %sk_GlobalInvocationID
41         %20 = OpCompositeExtract %uint %19 0
42         %21 = OpAccessChain %_ptr_Uniform_int %7 %int_0 %20
43         %23 = OpLoad %int %21
44         %24 = OpAccessChain %_ptr_Uniform_int %3 %int_0
45         %25 = OpLoad %int %24
46         %26 = OpIMul %int %23 %25
47               OpStore %21 %26
48               OpReturn
49               OpFunctionEnd
50