No matter why I tried I keep getting ADL_ERR_INVALID_PARAM_SIZE
These are the relevant structs I have
[StructLayout(LayoutKind.Sequential)]
internal struct PerformanceLevel
{
public int iEngineClock;
public int iMemoryClock;
}
[StructLayout(LayoutKind.Sequential)]
internal struct StateInfo
{
public int NumberOfPerformanceLevels;
public int ExtValue;
public int ExtMask;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public PerformanceLevel[] aLevels;
}
Below ADL SDK sample demonstrates how to use the above API. Please try this sample and if it works, modify your code accordingly.
Overdrive_Sample.cpp (display-library/Overdrive_Sample.cpp at master · GPUOpen-LibrariesAndSDKs/display-library · GitHub )
I've read all the examples, the OverdriveN.cpp example works when I run it. But I can't my equivalent in C# to work.
in C++
C#
I've made some progress, ADL is returning 0 now. But I'm having a hard time converting the aLevels from a pointer to an array. Will post if I'm successful or if I fail and need some help
Good to hear about this progress. I don't know C#, so can't help you in this regard. Please check with the C# community users if they can help you to convert this C/C++ structure to equivalent C#. If you face any other ADL related issue, please let us know.
Thanks.