File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,17 @@ vector_class<platform> platform_impl::get_platforms() {
100
100
for (unsigned int i = 0 ; i < Plugins.size (); i++) {
101
101
102
102
pi_uint32 NumPlatforms = 0 ;
103
- Plugins[i].call <PiApiKind::piPlatformsGet>(0 , nullptr , &NumPlatforms);
103
+ // Just return zero platforms if plugin fails to initialize.
104
+ // This way platforms from other plugins get a chance to be discovered.
105
+ if (Plugins[i].call_nocheck <PiApiKind::piPlatformsGet>(
106
+ 0 , nullptr , &NumPlatforms) != PI_SUCCESS)
107
+ return Platforms;
104
108
105
109
if (NumPlatforms) {
106
110
vector_class<RT::PiPlatform> PiPlatforms (NumPlatforms);
107
- Plugins[i].call <PiApiKind::piPlatformsGet>(NumPlatforms,
108
- PiPlatforms.data (), nullptr );
111
+ if (Plugins[i].call_nocheck <PiApiKind::piPlatformsGet>(
112
+ NumPlatforms, PiPlatforms.data (), nullptr ) != PI_SUCCESS)
113
+ return Platforms;
109
114
110
115
for (const auto &PiPlatform : PiPlatforms) {
111
116
platform Platform = detail::createSyclObjFromImpl<platform>(
You can’t perform that action at this time.
0 commit comments