mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-24 07:39:52 +00:00
loader: short cut when init with maxGpus equal to 0
This commit is contained in:
parent
dbdddf031f
commit
e6067d1107
@ -364,7 +364,7 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglInitAndEnumerateGpus(const XGL_APPLICATION_IN
|
||||
}
|
||||
|
||||
res = icd->InitAndEnumerateGpus(pAppInfo, pAllocCb, max, &n, gpus);
|
||||
if (res == XGL_SUCCESS) {
|
||||
if (res == XGL_SUCCESS && n) {
|
||||
memcpy(pGpus + count, gpus, sizeof(*pGpus) * n);
|
||||
count += n;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user