Path: blob/21.2-virgl/src/gallium/frontends/clover/api/invalid.cpp
4572 views
//1// Copyright 2020 Red Hat2//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#include "api/util.hpp"23#include "core/context.hpp"24#include "core/platform.hpp"2526using namespace clover;2728// This contains all the CL 2.x API entrypoints that return INVALID_OPERATON29// on CL 3.0. If these are implemented they should be moved out of this file.3031CLOVER_API cl_mem32clCreatePipe(cl_context d_ctx,33cl_mem_flags flags,34cl_uint pipe_packet_size,35cl_uint pipe_max_packets,36const cl_pipe_properties *properties,37cl_int *r_errorcode) {38*r_errorcode = CL_INVALID_OPERATION;39return nullptr;40}414243CLOVER_API cl_int44clGetPipeInfo(cl_mem pipe,45cl_pipe_info param_name,46size_t param_value_size,47void *param_value,48size_t *param_value_size_ret) {49return CL_INVALID_MEM_OBJECT;50}5152CLOVER_API cl_int53clGetDeviceAndHostTimer(cl_device_id device,54cl_ulong *device_timestamp,55cl_ulong *host_timestamp) {56return CL_INVALID_OPERATION;57}5859CLOVER_API cl_int60clGetHostTimer(cl_device_id device,61cl_ulong *host_timestamp) {62return CL_INVALID_OPERATION;63}646566CLOVER_API cl_int67clGetKernelSubGroupInfo(cl_kernel d_kern,68cl_device_id device,69cl_kernel_sub_group_info param_name,70size_t input_value_size,71const void *input_value,72size_t param_size_value,73void *param_value,74size_t *param_value_size_ret) {75return CL_INVALID_OPERATION;76}777879CLOVER_API cl_int80clSetDefaultDeviceCommandQueue(cl_context context,81cl_device_id device,82cl_command_queue command_queue) {83return CL_INVALID_OPERATION;84}8586CLOVER_API cl_int87clSetProgramReleaseCallback(cl_program d_prog,88void (CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),89void *user_data) {90return CL_INVALID_OPERATION;91}9293CLOVER_API cl_int94clSetProgramSpecializationConstant(cl_program program,95cl_uint spec_id,96size_t spec_size,97const void* spec_value) {98return CL_INVALID_OPERATION;99}100101102