rsdIntrinsics.h revision 49202fbfe57d2cc92b183baa8cbce3141e9a9ead
1/* 2 * Copyright (C) 2012 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#ifndef RSD_INTRINSICS_H 18#define RSD_INTRINSICS_H 19 20#include <rs_hal.h> 21 22typedef struct RsdIntriniscFuncs_rec { 23 24 void (*bind)(const android::renderscript::Context *dc, 25 const android::renderscript::Script *script, 26 void * intrinsicData, 27 uint32_t slot, android::renderscript::Allocation *data); 28 void (*setVar)(const android::renderscript::Context *dc, 29 const android::renderscript::Script *script, 30 void * intrinsicData, 31 uint32_t slot, void *data, size_t dataLength); 32 void (*root)(const android::renderscript::RsForEachStubParamStruct *, 33 uint32_t x1, uint32_t x2, uint32_t instep, uint32_t outstep); 34 35} RsdIntriniscFuncs_t; 36 37bool rsdIntrinsic_Init(const android::renderscript::Context *dc, 38 android::renderscript::Script *script, 39 RsScriptIntrinsicID id, RsdIntriniscFuncs_t *funcs); 40 41 42 43#endif // RSD_INTRINSICS_H 44 45