Home | History | Annotate | Download | only in cpu_ref
      1 /*
      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 
     23 // 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
     26 
     27 struct 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;
     32     uint32_t y;
     33     uint32_t z;
     34     uint32_t lod;
     35     uint32_t face;
     36     uint32_t array[4 /*make a define*/];
     37 };
     38 
     39 struct 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 
     57     const void *usr;
     58     uint32_t usrLen;
     59 
     60     // Items below this line are not used by the compiler and can be change in the driver
     61     uint32_t lid;
     62     uint32_t slot;
     63 };
     64 
     65 #endif
     66