1dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross/*
2dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * Copyright (C) 2015 The Android Open Source Project
3dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross *
4dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * Licensed under the Apache License, Version 2.0 (the "License");
5dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * you may not use this file except in compliance with the License.
6dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * You may obtain a copy of the License at
7dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross *
8dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross *      http://www.apache.org/licenses/LICENSE-2.0
9dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross *
10dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * Unless required by applicable law or agreed to in writing, software
11dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * distributed under the License is distributed on an "AS IS" BASIS,
12dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * See the License for the specific language governing permissions and
14dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross * limitations under the License.
15dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross */
16dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
17dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross// Warning: This header file is shared with the core runtime, which is written in C;
18dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross// hence, this header file must be written in C.
19dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
20dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross#ifndef RSD_CPU_CORE_RUNTIME_H
21dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross#define RSD_CPU_CORE_RUNTIME_H
22dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
23b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross// Warning: This value is shared with the compiler
24b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross// Any change to this value requires a matching compiler change
25b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross#define RS_KERNEL_INPUT_LIMIT 8
26dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
27b0abb140ac51b93d1a85aadaa63fe057f2d29850David Grossstruct RsLaunchDimensions {
28b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Warning: This structure is shared with the compiler
29b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Any change to the fields here requires a matching compiler change
30b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross
31b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t x;
32dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross    uint32_t y;
33dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross    uint32_t z;
34b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t lod;
35b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t face;
36b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t array[4 /*make a define*/];
37b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross};
38dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
39b0abb140ac51b93d1a85aadaa63fe057f2d29850David Grossstruct RsExpandKernelDriverInfo {
40b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Warning: This structure is shared with the compiler
41b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Any change to the fields here requires a matching compiler change
42b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross
43b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    const uint8_t *inPtr[RS_KERNEL_INPUT_LIMIT];
44b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t inStride[RS_KERNEL_INPUT_LIMIT];
45b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t inLen;
46dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
47b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint8_t *outPtr[RS_KERNEL_INPUT_LIMIT];
48b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t outStride[RS_KERNEL_INPUT_LIMIT];
49b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t outLen;
50dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
51b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Dimension of the launch
52b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    struct RsLaunchDimensions dim;
53b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross
54b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // The walking iterator of the launch
55b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    struct RsLaunchDimensions current;
56b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross
57b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    const void *usr;
58b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t usrLen;
59b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross
60b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    // Items below this line are not used by the compiler and can be change in the driver
61b0abb140ac51b93d1a85aadaa63fe057f2d29850David Gross    uint32_t lid;
62dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross    uint32_t slot;
63dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross};
64dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross
65dced5c96bc53c45a1aac782ea9bd738b0d50fd09David Gross#endif
66