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