Path: blob/21.2-virgl/src/gallium/frontends/clover/api/dispatch.hpp
4572 views
//1// Copyright 2013 Francisco Jerez2//3// Permission is hereby granted, free of charge, to any person obtaining a4// copy of this software and associated documentation files (the "Software"),5// to deal in the Software without restriction, including without limitation6// the rights to use, copy, modify, merge, publish, distribute, sublicense,7// and/or sell copies of the Software, and to permit persons to whom the8// Software is furnished to do so, subject to the following conditions:9//10// The above copyright notice and this permission notice shall be included in11// all copies or substantial portions of the Software.12//13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR17// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19// OTHER DEALINGS IN THE SOFTWARE.20//2122#ifndef API_DISPATCH_HPP23#define API_DISPATCH_HPP2425#include "CL/cl.h"26#include "CL/cl_ext.h"27#include "CL/cl_egl.h"28#include "CL/cl_gl.h"29#include "CL/cl_icd.h"3031namespace clover {32extern const cl_icd_dispatch _dispatch;3334cl_int35GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,36size_t size, void *r_buf, size_t *r_size);3738void *39GetExtensionFunctionAddress(const char *p_name);4041void *42GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,43const char *p_name);4445cl_int46IcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,47cl_uint *rnum_platforms);4849cl_int50EnqueueSVMFree(cl_command_queue command_queue,51cl_uint num_svm_pointers,52void *svm_pointers[],53void (CL_CALLBACK *pfn_free_func) (54cl_command_queue queue, cl_uint num_svm_pointers,55void *svm_pointers[], void *user_data),56void *user_data,57cl_uint num_events_in_wait_list,58const cl_event *event_wait_list,59cl_event *event,60cl_int cmd);6162cl_int63EnqueueSVMMemcpy(cl_command_queue command_queue,64cl_bool blocking_copy,65void *dst_ptr,66const void *src_ptr,67size_t size,68cl_uint num_events_in_wait_list,69const cl_event *event_wait_list,70cl_event *event,71cl_int cmd);7273cl_int74EnqueueSVMMap(cl_command_queue command_queue,75cl_bool blocking_map,76cl_map_flags map_flags,77void *svm_ptr,78size_t size,79cl_uint num_events_in_wait_list,80const cl_event *event_wait_list,81cl_event *event,82cl_int cmd);8384cl_int85EnqueueSVMMemFill(cl_command_queue command_queue,86void *svm_ptr,87const void *pattern,88size_t pattern_size,89size_t size,90cl_uint num_events_in_wait_list,91const cl_event *event_wait_list,92cl_event *event,93cl_int cmd);9495cl_int96EnqueueSVMUnmap(cl_command_queue command_queue,97void *svm_ptr,98cl_uint num_events_in_wait_list,99const cl_event *event_wait_list,100cl_event *event,101cl_int cmd);102103cl_program104CreateProgramWithILKHR(cl_context d_ctx, const void *il,105size_t length, cl_int *r_errcode);106}107108#endif109110111