File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ void khrIcdVendorAdd(const char *libraryName)
159159 KHR_ICD_TRACE ("found icd 2 object, but platform is missing clIcdSetPlatformDispatchDataKHR\n" );
160160 continue ;
161161 }
162- if (KHR_ICD2_HAS_TAG (platforms [i ]) && !(( intptr_t )(( platforms [i ]) -> dispatch -> clUnloadCompiler ) == CL_ICD2_TAG_KHR ))
162+ if (KHR_ICD2_HAS_TAG (platforms [i ]) && !KHR_ICD2_HAS_TAG2 ( platforms [i ]))
163163 {
164164 KHR_ICD_TRACE ("found icd 2 object, but platform is missing tag in clUnloadCompiler\n" );
165165 continue ;
Original file line number Diff line number Diff line change @@ -73,8 +73,17 @@ struct KHRDisp
7373 struct _cl_icd_dispatch dispatch ;
7474};
7575
76+ #if __CL_HAS_ANON_UNION__
77+ #define KHR_ICD2_HAS_TAG (object ) \
78+ ((object)->dispatch->clGetPlatformIDs_icd2_tag == CL_ICD2_TAG_KHR)
79+ #define KHR_ICD2_HAS_TAG2 (object ) \
80+ ((object)->dispatch->clUnloadCompiler_icd2_tag == CL_ICD2_TAG_KHR)
81+ #else
7682#define KHR_ICD2_HAS_TAG (object ) \
7783(((intptr_t)((object)->dispatch->clGetPlatformIDs)) == CL_ICD2_TAG_KHR)
84+ #define KHR_ICD2_HAS_TAG2 (object ) \
85+ (((intptr_t)((object)->dispatch->clUnloadCompiler)) == CL_ICD2_TAG_KHR)
86+ #endif
7887
7988#define KHR_ICD2_DISPATCH (object ) \
8089(KHR_ICD2_HAS_TAG(object) ? \
You can’t perform that action at this time.
0 commit comments