Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62270167 authored by Michael Lentine's avatar Michael Lentine Committed by Jesse Hall
Browse files

Fix GetSpecific*ProcAddr.

Change GetSpeicific*ProcAddr to cast to return the value inside of the table
instead of the table itself.

Change-Id: Ib693274cd5c0869d79f0869a6d99a78c31a63b08
(cherry picked from commit 0c8fe76496e1fe6fe63e4e6179f53a98561a7748)
parent d7b994a0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ PFN_vkVoidFunction GetSpecificInstanceProcAddr(const InstanceVtbl* vtbl,
    else
        return nullptr;
    const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
    return reinterpret_cast<PFN_vkVoidFunction>(
    return *reinterpret_cast<PFN_vkVoidFunction*>(
        const_cast<unsigned char*>(base) + entry->offset);
}

@@ -449,7 +449,7 @@ PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl,
    else
        return nullptr;
    const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
    return reinterpret_cast<PFN_vkVoidFunction>(
    return *reinterpret_cast<PFN_vkVoidFunction*>(
        const_cast<unsigned char*>(base) + entry->offset);
}

+2 −2
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ PFN_vkVoidFunction GetSpecificInstanceProcAddr(const InstanceVtbl* vtbl,
    else
        return nullptr;
    const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
    return reinterpret_cast<PFN_vkVoidFunction>(
    return *reinterpret_cast<PFN_vkVoidFunction*>(
        const_cast<unsigned char*>(base) + entry->offset);
}

@@ -196,7 +196,7 @@ PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl,
    else
        return nullptr;
    const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
    return reinterpret_cast<PFN_vkVoidFunction>(
    return *reinterpret_cast<PFN_vkVoidFunction*>(
        const_cast<unsigned char*>(base) + entry->offset);
}