cancel
Showing results for 
Search instead for 
Did you mean: 

GPU Developer Tools

hego555
Journeyman III

ADL C# ADL2_Overdrive6_StateInfo_Get

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;
}

Tags (2)
0 Likes
Reply
4 Replies
dipak
Staff
Staff

Re: ADL C# ADL2_Overdrive6_StateInfo_Get

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 )

0 Likes
Reply
hego555
Journeyman III

Re: ADL C# ADL2_Overdrive6_StateInfo_Get

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.

pastedImage_0.png in C++

pastedImage_1.pngC#

0 Likes
Reply
hego555
Journeyman III

Re: ADL C# ADL2_Overdrive6_StateInfo_Get

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

0 Likes
Reply
dipak
Staff
Staff

Re: ADL C# ADL2_Overdrive6_StateInfo_Get

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.

0 Likes
Reply