Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/gallium/frontends/clover/api/invalid.cpp
4572 views
1
//
2
// Copyright 2020 Red Hat
3
//
4
// Permission is hereby granted, free of charge, to any person obtaining a
5
// copy of this software and associated documentation files (the "Software"),
6
// to deal in the Software without restriction, including without limitation
7
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
// and/or sell copies of the Software, and to permit persons to whom the
9
// Software is furnished to do so, subject to the following conditions:
10
//
11
// The above copyright notice and this permission notice shall be included in
12
// all copies or substantial portions of the Software.
13
//
14
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
// OTHER DEALINGS IN THE SOFTWARE.
21
//
22
23
#include "api/util.hpp"
24
#include "core/context.hpp"
25
#include "core/platform.hpp"
26
27
using namespace clover;
28
29
// This contains all the CL 2.x API entrypoints that return INVALID_OPERATON
30
// on CL 3.0. If these are implemented they should be moved out of this file.
31
32
CLOVER_API cl_mem
33
clCreatePipe(cl_context d_ctx,
34
cl_mem_flags flags,
35
cl_uint pipe_packet_size,
36
cl_uint pipe_max_packets,
37
const cl_pipe_properties *properties,
38
cl_int *r_errorcode) {
39
*r_errorcode = CL_INVALID_OPERATION;
40
return nullptr;
41
}
42
43
44
CLOVER_API cl_int
45
clGetPipeInfo(cl_mem pipe,
46
cl_pipe_info param_name,
47
size_t param_value_size,
48
void *param_value,
49
size_t *param_value_size_ret) {
50
return CL_INVALID_MEM_OBJECT;
51
}
52
53
CLOVER_API cl_int
54
clGetDeviceAndHostTimer(cl_device_id device,
55
cl_ulong *device_timestamp,
56
cl_ulong *host_timestamp) {
57
return CL_INVALID_OPERATION;
58
}
59
60
CLOVER_API cl_int
61
clGetHostTimer(cl_device_id device,
62
cl_ulong *host_timestamp) {
63
return CL_INVALID_OPERATION;
64
}
65
66
67
CLOVER_API cl_int
68
clGetKernelSubGroupInfo(cl_kernel d_kern,
69
cl_device_id device,
70
cl_kernel_sub_group_info param_name,
71
size_t input_value_size,
72
const void *input_value,
73
size_t param_size_value,
74
void *param_value,
75
size_t *param_value_size_ret) {
76
return CL_INVALID_OPERATION;
77
}
78
79
80
CLOVER_API cl_int
81
clSetDefaultDeviceCommandQueue(cl_context context,
82
cl_device_id device,
83
cl_command_queue command_queue) {
84
return CL_INVALID_OPERATION;
85
}
86
87
CLOVER_API cl_int
88
clSetProgramReleaseCallback(cl_program d_prog,
89
void (CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
90
void *user_data) {
91
return CL_INVALID_OPERATION;
92
}
93
94
CLOVER_API cl_int
95
clSetProgramSpecializationConstant(cl_program program,
96
cl_uint spec_id,
97
size_t spec_size,
98
const void* spec_value) {
99
return CL_INVALID_OPERATION;
100
}
101
102