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

Commit 91e1687d authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

[hardware][interfaces][renderscript] fix -Wreorder-init-list



C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I9529dba0fe407f0d16f7aee10e3629f0175b8e3e
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 0e1efc56
Loading
Loading
Loading
Loading
+110 −144
Original line number Diff line number Diff line
@@ -88,127 +88,97 @@ dispatchTable loadHAL() {
    dispatchTable dispatchHal = {
            .SetNativeLibDir = (SetNativeLibDirFnPtr) nullptr,

        .Allocation1DData =
            (Allocation1DDataFnPtr)dlsym(handle, "rsAllocation1DData"),
            .Allocation1DData = (Allocation1DDataFnPtr)dlsym(handle, "rsAllocation1DData"),
            .Allocation1DElementData = (Allocation1DElementDataFnPtr) nullptr,
        .Allocation1DRead =
            (Allocation1DReadFnPtr)dlsym(handle, "rsAllocation1DRead"),
        .Allocation2DData =
            (Allocation2DDataFnPtr)dlsym(handle, "rsAllocation2DData"),
        .Allocation2DRead =
            (Allocation2DReadFnPtr)dlsym(handle, "rsAllocation2DRead"),
        .Allocation3DData =
            (Allocation3DDataFnPtr)dlsym(handle, "rsAllocation3DData"),
        .Allocation3DRead =
            (Allocation3DReadFnPtr)dlsym(handle, "rsAllocation3DRead"),
        .AllocationAdapterCreate = (AllocationAdapterCreateFnPtr)dlsym(
            handle, "rsAllocationAdapterCreate"),
        .AllocationAdapterOffset = (AllocationAdapterOffsetFnPtr)dlsym(
            handle, "rsAllocationAdapterOffset"),
        .AllocationCopy2DRange = (AllocationCopy2DRangeFnPtr)dlsym(
            handle, "rsAllocationCopy2DRange"),
        .AllocationCopy3DRange = (AllocationCopy3DRangeFnPtr)dlsym(
            handle, "rsAllocationCopy3DRange"),
        .AllocationCopyToBitmap = (AllocationCopyToBitmapFnPtr)dlsym(
            handle, "rsAllocationCopyToBitmap"),
        .AllocationCreateFromBitmap = (AllocationCreateFromBitmapFnPtr)dlsym(
            handle, "rsAllocationCreateFromBitmap"),
        .AllocationCreateStrided = (AllocationCreateStridedFnPtr)dlsym(
            handle, "rsAllocationCreateStrided"),
        .AllocationCreateTyped = (AllocationCreateTypedFnPtr)dlsym(
            handle, "rsAllocationCreateTyped"),
        .AllocationCubeCreateFromBitmap =
            (AllocationCubeCreateFromBitmapFnPtr)dlsym(
            .Allocation1DRead = (Allocation1DReadFnPtr)dlsym(handle, "rsAllocation1DRead"),
            .Allocation2DData = (Allocation2DDataFnPtr)dlsym(handle, "rsAllocation2DData"),
            .Allocation2DRead = (Allocation2DReadFnPtr)dlsym(handle, "rsAllocation2DRead"),
            .Allocation3DData = (Allocation3DDataFnPtr)dlsym(handle, "rsAllocation3DData"),
            .Allocation3DRead = (Allocation3DReadFnPtr)dlsym(handle, "rsAllocation3DRead"),
            .AllocationAdapterCreate =
                    (AllocationAdapterCreateFnPtr)dlsym(handle, "rsAllocationAdapterCreate"),
            .AllocationAdapterOffset =
                    (AllocationAdapterOffsetFnPtr)dlsym(handle, "rsAllocationAdapterOffset"),
            .AllocationCopy2DRange =
                    (AllocationCopy2DRangeFnPtr)dlsym(handle, "rsAllocationCopy2DRange"),
            .AllocationCopy3DRange =
                    (AllocationCopy3DRangeFnPtr)dlsym(handle, "rsAllocationCopy3DRange"),
            .AllocationCopyToBitmap =
                    (AllocationCopyToBitmapFnPtr)dlsym(handle, "rsAllocationCopyToBitmap"),
            .AllocationCreateFromBitmap =
                    (AllocationCreateFromBitmapFnPtr)dlsym(handle, "rsAllocationCreateFromBitmap"),
            .AllocationCreateStrided =
                    (AllocationCreateStridedFnPtr)dlsym(handle, "rsAllocationCreateStrided"),
            .AllocationCreateTyped =
                    (AllocationCreateTypedFnPtr)dlsym(handle, "rsAllocationCreateTyped"),
            .AllocationCubeCreateFromBitmap = (AllocationCubeCreateFromBitmapFnPtr)dlsym(
                    handle, "rsAllocationCubeCreateFromBitmap"),
        .AllocationElementData = (AllocationElementDataFnPtr)dlsym(
            handle, "rsAllocationElementData"),
        .AllocationElementRead = (AllocationElementReadFnPtr)dlsym(
            handle, "rsAllocationElementRead"),
        .AllocationGenerateMipmaps = (AllocationGenerateMipmapsFnPtr)dlsym(
            handle, "rsAllocationGenerateMipmaps"),
            .AllocationElementData =
                    (AllocationElementDataFnPtr)dlsym(handle, "rsAllocationElementData"),
            .AllocationElementRead =
                    (AllocationElementReadFnPtr)dlsym(handle, "rsAllocationElementRead"),
            .AllocationGenerateMipmaps =
                    (AllocationGenerateMipmapsFnPtr)dlsym(handle, "rsAllocationGenerateMipmaps"),
            .AllocationGetPointer =
                    (AllocationGetPointerFnPtr)dlsym(handle, "rsAllocationGetPointer"),
            .AllocationGetSurface =
                    (AllocationGetSurfaceFnPtr)dlsym(handle, "rsAllocationGetSurface"),
        .AllocationGetType =
            (AllocationGetTypeFnPtr)dlsym(handle, "rsaAllocationGetType"),
        .AllocationIoReceive =
            (AllocationIoReceiveFnPtr)dlsym(handle, "rsAllocationIoReceive"),
        .AllocationIoSend =
            (AllocationIoSendFnPtr)dlsym(handle, "rsAllocationIoSend"),
        .AllocationRead =
            (AllocationReadFnPtr)dlsym(handle, "rsAllocationRead"),
        .AllocationResize1D =
            (AllocationResize1DFnPtr)dlsym(handle, "rsAllocationResize1D"),
            .AllocationGetType = (AllocationGetTypeFnPtr)dlsym(handle, "rsaAllocationGetType"),
            .AllocationIoReceive = (AllocationIoReceiveFnPtr)dlsym(handle, "rsAllocationIoReceive"),
            .AllocationIoSend = (AllocationIoSendFnPtr)dlsym(handle, "rsAllocationIoSend"),
            .AllocationRead = (AllocationReadFnPtr)dlsym(handle, "rsAllocationRead"),
            .AllocationResize1D = (AllocationResize1DFnPtr)dlsym(handle, "rsAllocationResize1D"),
            .AllocationSetSurface =
                    (AllocationSetSurfaceFnPtr)dlsym(handle, "rsAllocationSetSurface"),
        .AllocationSetupBufferQueue = (AllocationSetupBufferQueueFnPtr)dlsym(
            handle, "rsAllocationSetupBufferQueue"),
        .AllocationShareBufferQueue = (AllocationShareBufferQueueFnPtr)dlsym(
            handle, "rsAllocationShareBufferQueue"),
        .AllocationSyncAll =
            (AllocationSyncAllFnPtr)dlsym(handle, "rsAllocationSyncAll"),
            .AllocationSyncAll = (AllocationSyncAllFnPtr)dlsym(handle, "rsAllocationSyncAll"),
            .AllocationSetupBufferQueue =
                    (AllocationSetupBufferQueueFnPtr)dlsym(handle, "rsAllocationSetupBufferQueue"),
            .AllocationShareBufferQueue =
                    (AllocationShareBufferQueueFnPtr)dlsym(handle, "rsAllocationShareBufferQueue"),
            .AssignName = (AssignNameFnPtr)dlsym(handle, "rsAssignName"),
            .ClosureCreate = (ClosureCreateFnPtr)dlsym(handle, "rsClosureCreate"),
            .ClosureSetArg = (ClosureSetArgFnPtr)dlsym(handle, "rsClosureSetArg"),
        .ClosureSetGlobal =
            (ClosureSetGlobalFnPtr)dlsym(handle, "rsClosureSetGlobal"),
        .ContextCreateVendor =
            (ContextCreateVendorFnPtr)dlsym(handle, "rsContextCreateVendor"),
        .ContextDeinitToClient = (ContextDeinitToClientFnPtr)dlsym(
            handle, "rsContextDeinitToClient"),
        .ContextDestroy =
            (ContextDestroyFnPtr)dlsym(handle, "rsContextDestroy"),
            .ClosureSetGlobal = (ClosureSetGlobalFnPtr)dlsym(handle, "rsClosureSetGlobal"),
            .ContextCreateVendor = (ContextCreateVendorFnPtr)dlsym(handle, "rsContextCreateVendor"),
            .ContextDeinitToClient =
                    (ContextDeinitToClientFnPtr)dlsym(handle, "rsContextDeinitToClient"),
            .ContextDestroy = (ContextDestroyFnPtr)dlsym(handle, "rsContextDestroy"),
            .ContextDump = (ContextDumpFnPtr)dlsym(handle, "rsContextDump"),
            .ContextFinish = (ContextFinishFnPtr)dlsym(handle, "rsContextFinish"),
        .ContextGetMessage =
            (ContextGetMessageFnPtr)dlsym(handle, "rsContextGetMessage"),
        .ContextInitToClient =
            (ContextInitToClientFnPtr)dlsym(handle, "rsContextInitToClient"),
        .ContextPeekMessage =
            (ContextPeekMessageFnPtr)dlsym(handle, "rsContextPeekMessage"),
        .ContextSendMessage =
            (ContextSendMessageFnPtr)dlsym(handle, "rsContextSendMessage"),
        .ContextSetCacheDir =
            (ContextSetCacheDirFnPtr)dlsym(handle, "rsContextSetCacheDir"),
        .ContextSetPriority =
            (ContextSetPriorityFnPtr)dlsym(handle, "rsContextSetPriority"),
            .ContextGetMessage = (ContextGetMessageFnPtr)dlsym(handle, "rsContextGetMessage"),
            .ContextInitToClient = (ContextInitToClientFnPtr)dlsym(handle, "rsContextInitToClient"),
            .ContextPeekMessage = (ContextPeekMessageFnPtr)dlsym(handle, "rsContextPeekMessage"),
            .ContextSendMessage = (ContextSendMessageFnPtr)dlsym(handle, "rsContextSendMessage"),
            .ContextSetPriority = (ContextSetPriorityFnPtr)dlsym(handle, "rsContextSetPriority"),
            .ContextSetCacheDir = (ContextSetCacheDirFnPtr)dlsym(handle, "rsContextSetCacheDir"),
            .DeviceCreate = (DeviceCreateFnPtr) nullptr,
            .DeviceDestroy = (DeviceDestroyFnPtr) nullptr,
            .DeviceSetConfig = (DeviceSetConfigFnPtr) nullptr,
        .ElementCreate2 =
            (ElementCreate2FnPtr)dlsym(handle, "rsElementCreate2"),
            .ElementCreate2 = (ElementCreate2FnPtr)dlsym(handle, "rsElementCreate2"),
            .ElementCreate = (ElementCreateFnPtr)dlsym(handle, "rsElementCreate"),
            .ElementGetNativeData =
                    (ElementGetNativeDataFnPtr)dlsym(handle, "rsaElementGetNativeData"),
        .ElementGetSubElements = (ElementGetSubElementsFnPtr)dlsym(
            handle, "rsaElementGetSubElements"),
            .ElementGetSubElements =
                    (ElementGetSubElementsFnPtr)dlsym(handle, "rsaElementGetSubElements"),
            .GetName = (GetNameFnPtr)dlsym(handle, "rsaGetName"),
        .InvokeClosureCreate =
            (InvokeClosureCreateFnPtr)dlsym(handle, "rsInvokeClosureCreate"),
            .InvokeClosureCreate = (InvokeClosureCreateFnPtr)dlsym(handle, "rsInvokeClosureCreate"),
            .ObjDestroy = (ObjDestroyFnPtr)dlsym(handle, "rsObjDestroy"),
            .SamplerCreate = (SamplerCreateFnPtr)dlsym(handle, "rsSamplerCreate"),
            .ScriptBindAllocation =
                    (ScriptBindAllocationFnPtr)dlsym(handle, "rsScriptBindAllocation"),
            .ScriptCCreate = (ScriptCCreateFnPtr)dlsym(handle, "rsScriptCCreate"),
        .ScriptFieldIDCreate =
            (ScriptFieldIDCreateFnPtr)dlsym(handle, "rsScriptFieldIDCreate"),
            .ScriptFieldIDCreate = (ScriptFieldIDCreateFnPtr)dlsym(handle, "rsScriptFieldIDCreate"),
            .ScriptForEach = (ScriptForEachFnPtr) nullptr,
        .ScriptForEachMulti =
            (ScriptForEachMultiFnPtr)dlsym(handle, "rsScriptForEachMulti"),
            .ScriptForEachMulti = (ScriptForEachMultiFnPtr)dlsym(handle, "rsScriptForEachMulti"),
            .ScriptGetVarV = (ScriptGetVarVFnPtr)dlsym(handle, "rsScriptGetVarV"),
        .ScriptGroup2Create =
            (ScriptGroup2CreateFnPtr)dlsym(handle, "rsScriptGroup2Create"),
        .ScriptGroupCreate =
            (ScriptGroupCreateFnPtr)dlsym(handle, "rsScriptGroupCreate"),
        .ScriptGroupExecute =
            (ScriptGroupExecuteFnPtr)dlsym(handle, "rsScriptGroupExecute"),
        .ScriptGroupSetInput =
            (ScriptGroupSetInputFnPtr)dlsym(handle, "rsScriptGroupSetInput"),
            .ScriptGroup2Create = (ScriptGroup2CreateFnPtr)dlsym(handle, "rsScriptGroup2Create"),
            .ScriptGroupCreate = (ScriptGroupCreateFnPtr)dlsym(handle, "rsScriptGroupCreate"),
            .ScriptGroupExecute = (ScriptGroupExecuteFnPtr)dlsym(handle, "rsScriptGroupExecute"),
            .ScriptGroupSetInput = (ScriptGroupSetInputFnPtr)dlsym(handle, "rsScriptGroupSetInput"),
            .ScriptGroupSetOutput =
                    (ScriptGroupSetOutputFnPtr)dlsym(handle, "rsScriptGroupSetOutput"),
        .ScriptIntrinsicCreate = (ScriptIntrinsicCreateFnPtr)dlsym(
            handle, "rsScriptIntrinsicCreate"),
            .ScriptIntrinsicCreate =
                    (ScriptIntrinsicCreateFnPtr)dlsym(handle, "rsScriptIntrinsicCreate"),
            .ScriptInvoke = (ScriptInvokeFnPtr)dlsym(handle, "rsScriptInvoke"),
            .ScriptInvokeIDCreate =
                    (ScriptInvokeIDCreateFnPtr)dlsym(handle, "rsScriptInvokeIDCreate"),
@@ -216,20 +186,16 @@ dispatchTable loadHAL() {
            .ScriptKernelIDCreate =
                    (ScriptKernelIDCreateFnPtr)dlsym(handle, "rsScriptKernelIDCreate"),
            .ScriptReduce = (ScriptReduceFnPtr)dlsym(handle, "rsScriptReduce"),
        .ScriptSetTimeZone =
            (ScriptSetTimeZoneFnPtr)dlsym(handle, "rsScriptSetTimeZone"),
            .ScriptSetTimeZone = (ScriptSetTimeZoneFnPtr)dlsym(handle, "rsScriptSetTimeZone"),
            .ScriptSetVarD = (ScriptSetVarDFnPtr)dlsym(handle, "rsScriptSetVarD"),
            .ScriptSetVarF = (ScriptSetVarFFnPtr)dlsym(handle, "rsScriptSetVarF"),
            .ScriptSetVarI = (ScriptSetVarIFnPtr)dlsym(handle, "rsScriptSetVarI"),
            .ScriptSetVarJ = (ScriptSetVarJFnPtr)dlsym(handle, "rsScriptSetVarJ"),
        .ScriptSetVarObj =
            (ScriptSetVarObjFnPtr)dlsym(handle, "rsScriptSetVarObj"),
        .ScriptSetVarVE =
            (ScriptSetVarVEFnPtr)dlsym(handle, "rsScriptSetVarVE"),
            .ScriptSetVarObj = (ScriptSetVarObjFnPtr)dlsym(handle, "rsScriptSetVarObj"),
            .ScriptSetVarVE = (ScriptSetVarVEFnPtr)dlsym(handle, "rsScriptSetVarVE"),
            .ScriptSetVarV = (ScriptSetVarVFnPtr)dlsym(handle, "rsScriptSetVarV"),
            .TypeCreate = (TypeCreateFnPtr)dlsym(handle, "rsTypeCreate"),
        .TypeGetNativeData =
            (TypeGetNativeDataFnPtr)dlsym(handle, "rsaTypeGetNativeData"),
            .TypeGetNativeData = (TypeGetNativeDataFnPtr)dlsym(handle, "rsaTypeGetNativeData"),
    };

    return dispatchHal;