Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 1 addition & 50 deletions include/cl_khr_icd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,4 @@
* OpenCL is a trademark of Apple Inc. used under license by Khronos.
*/

#include <CL/cl.h>

#if !defined(CL_PLATFORM_UNLOADABLE_KHR)
#define CL_PLATFORM_UNLOADABLE_KHR 0x0921
#endif

#if defined(CL_ENABLE_LAYERS) && !defined(CL_LAYER_PROPERTIES_LIST_END)
typedef cl_properties cl_layer_properties;

#define CL_LAYER_PROPERTIES_LIST_END ((cl_layer_properties)0)

typedef cl_int CL_API_CALL
clInitLayerWithProperties_t(
cl_uint num_entries,
const cl_icd_dispatch *target_dispatch,
cl_uint *num_entries_ret,
const cl_icd_dispatch **layer_dispatch_ret,
const cl_layer_properties *properties);

typedef clInitLayerWithProperties_t *pfn_clInitLayerWithProperties;

typedef cl_int CL_API_CALL
clDeinitLayer_t(void);

typedef clDeinitLayer_t *pfn_clDeinitLayer;
#endif //defined(CL_ENABLE_LAYERS) && !defined(CL_LAYER_PROPERTIES_LIST_END)

#if !defined(CL_ICD2_TAG_KHR)
#if INTPTR_MAX == INT32_MAX
#define CL_ICD2_TAG_KHR ((intptr_t)0x434C3331)
#else
#define CL_ICD2_TAG_KHR ((intptr_t)0x4F50454E434C3331)
#endif

typedef void * CL_API_CALL
clIcdGetFunctionAddressForPlatformKHR_t(
cl_platform_id platform,
const char* func_name);

typedef clIcdGetFunctionAddressForPlatformKHR_t *
clIcdGetFunctionAddressForPlatformKHR_fn;

typedef cl_int CL_API_CALL
clIcdSetPlatformDispatchDataKHR_t(
cl_platform_id platform,
void *disp_data);

typedef clIcdSetPlatformDispatchDataKHR_t *
clIcdSetPlatformDispatchDataKHR_fn;
#endif // !defined(CL_ICD2_TAG_KHR)
/* This is intentionally empty and left as a placeholder. */
6 changes: 1 addition & 5 deletions test/driver_stub/cl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
#include "rename_api.h"

#include <CL/cl.h>
#include <CL/cl_ext.h>
#include <platform/icd_test_log.h>
#include "icd_structs.h"
#include "cl_khr_icd2.h"

#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
CL_API_ENTRY cl_int CL_API_CALL
clIcdGetPlatformIDsKHR(cl_uint, cl_platform_id *, cl_uint *);

struct _cl_platform_id
{
Expand Down
10 changes: 2 additions & 8 deletions test/driver_stub/cl_ext.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#include <string.h>

#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#include "CL/cl.h"
#include "CL/cl_ext.h"
#include "cl_khr_icd2.h"

#if defined(CL_ENABLE_ICD2)
CL_API_ENTRY clIcdGetFunctionAddressForPlatformKHR_t clIcdGetFunctionAddressForPlatformKHR;
CL_API_ENTRY clIcdSetPlatformDispatchDataKHR_t clIcdSetPlatformDispatchDataKHR;
#endif
#include <CL/cl.h>
#include <CL/cl_ext.h>

struct driverStubextFunc_st
{
Expand Down
20 changes: 3 additions & 17 deletions test/driver_stub/icd.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,9 @@
// themselves via the dispatch table. Include this before cl headers.
#include "rename_api.h"

#include "CL/cl.h"
#include "CL/cl_gl.h"

#if defined(CL_ENABLE_ICD2)
#include "cl_khr_icd2.h"
CL_API_ENTRY clIcdGetFunctionAddressForPlatformKHR_t clIcdGetFunctionAddressForPlatformKHR;
CL_API_ENTRY clIcdSetPlatformDispatchDataKHR_t clIcdSetPlatformDispatchDataKHR;
#endif

/*
* Prototypes for deprecated functions no longer present in cl.h
*/
extern CL_API_ENTRY cl_int CL_API_CALL
clSetCommandQueueProperty(cl_command_queue /* command_queue */,
cl_command_queue_properties /* properties */,
cl_bool /* enable */,
cl_command_queue_properties * /* old_properties */);
#include <CL/cl.h>
#include <CL/cl_gl.h>
#include <CL/cl_ext.h>

#define ICD_DISPATCH_TABLE_ENTRY(fn) \
assert(dispatchTable->entryCount < 256); \
Expand Down
Loading