summaryrefslogtreecommitdiffstats
path: root/cpu_ref/rsCpuCoreRuntime.h
blob: c7841ec4fc2202d413cc2b594a93625ba9403e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Warning: This header file is shared with the core runtime, which is written in C;
// hence, this header file must be written in C.

#ifndef RSD_CPU_CORE_RUNTIME_H
#define RSD_CPU_CORE_RUNTIME_H

// Warning: This value is shared with the compiler
// Any change to this value requires a matching compiler change
#define RS_KERNEL_INPUT_LIMIT 8

struct RsLaunchDimensions {
    // Warning: This structure is shared with the compiler
    // Any change to the fields here requires a matching compiler change

    uint32_t x;
    uint32_t y;
    uint32_t z;
    uint32_t lod;
    uint32_t face;
    uint32_t array[4 /*make a define*/];
};

struct RsExpandKernelDriverInfo {
    // Warning: This structure is shared with the compiler
    // Any change to the fields here requires a matching compiler change

    const uint8_t *inPtr[RS_KERNEL_INPUT_LIMIT];
    uint32_t inStride[RS_KERNEL_INPUT_LIMIT];
    uint32_t inLen;

    uint8_t *outPtr[RS_KERNEL_INPUT_LIMIT];
    uint32_t outStride[RS_KERNEL_INPUT_LIMIT];
    uint32_t outLen;

    // Dimension of the launch
    struct RsLaunchDimensions dim;

    // The walking iterator of the launch
    struct RsLaunchDimensions current;

    const void *usr;
    uint32_t usrLen;

    // Items below this line are not used by the compiler and can be change in the driver
    uint32_t lid;
    uint32_t slot;
};

#endif