File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ void khrIcdVendorAdd(const char *libraryName)
159
159
KHR_ICD_TRACE ("found icd 2 object, but platform is missing clIcdSetPlatformDispatchDataKHR\n" );
160
160
continue ;
161
161
}
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 ]))
163
163
{
164
164
KHR_ICD_TRACE ("found icd 2 object, but platform is missing tag in clUnloadCompiler\n" );
165
165
continue ;
Original file line number Diff line number Diff line change @@ -73,8 +73,17 @@ struct KHRDisp
73
73
struct _cl_icd_dispatch dispatch ;
74
74
};
75
75
76
+ #if __CL_HAS_ANON_STRUCT__
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
76
82
#define KHR_ICD2_HAS_TAG (object ) \
77
83
(((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
78
87
79
88
#define KHR_ICD2_DISPATCH (object ) \
80
89
(KHR_ICD2_HAS_TAG(object) ? \
You can’t perform that action at this time.
0 commit comments