2121
2222#include "icd_platform.h"
2323#include "icd_dispatch.h"
24+ #include "icd_trace.h"
25+ #include "icd_library.h"
2426
2527#ifndef CL_USE_DEPRECATED_OPENCL_1_0_APIS
2628#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
@@ -110,8 +112,6 @@ struct KHRicdVendorRec
110112// the global state
111113extern KHRicdVendor * khrIcdVendors ;
112114
113- extern int khrEnableTrace ;
114-
115115#if defined(CL_ENABLE_LAYERS )
116116/*
117117 * KHRLayer
@@ -177,18 +177,6 @@ void khrIcdLayersEnumerateEnv(void);
177177// add a layer to the layer chain
178178void khrIcdLayerAdd (const char * libraryName );
179179
180- // dynamically load a library. returns NULL on failure
181- // n.b, this call is OS-specific
182- void * khrIcdOsLibraryLoad (const char * libraryName );
183-
184- // get a function pointer from a loaded library. returns NULL on failure.
185- // n.b, this call is OS-specific
186- void * khrIcdOsLibraryGetFunctionAddress (void * library , const char * functionName );
187-
188- // unload a library.
189- // n.b, this call is OS-specific
190- void khrIcdOsLibraryUnload (void * library );
191-
192180// parse properties and determine the platform to use from them
193181void khrIcdContextPropertiesGetPlatform (
194182 const cl_context_properties * properties ,
@@ -201,32 +189,6 @@ void khrIcdContextPropertiesGetPlatform(
201189#define ICD_ANON_UNION_INIT_MEMBER (a ) a
202190#endif
203191
204- // internal tracing macros
205- #define KHR_ICD_TRACE (...) \
206- do \
207- { \
208- if (khrEnableTrace) \
209- { \
210- fprintf(stderr, "KHR ICD trace at %s:%d: ", __FILE__, __LINE__); \
211- fprintf(stderr, __VA_ARGS__); \
212- } \
213- } while (0)
214-
215- #ifdef _WIN32
216- #define KHR_ICD_WIDE_TRACE (...) \
217- do \
218- { \
219- if (khrEnableTrace) \
220- { \
221- fwprintf(stderr, L"KHR ICD trace at %hs:%d: ", __FILE__, __LINE__); \
222- fwprintf(stderr, __VA_ARGS__); \
223- } \
224- } while (0)
225-
226- #else
227- #define KHR_ICD_WIDE_TRACE (...)
228- #endif
229-
230192#define KHR_ICD_ERROR_RETURN_ERROR (_error ) \
231193do { \
232194 return _error; \
0 commit comments