opdude's picture

VectorAdd Example (OpenCL)

Hi there,

I'm trying to run the example VectorAdd for OpenCL in the 1.0-beta1 revision of OpenTK and i'm running into the following error.

Launching sample: "Vector Addition"
 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at OpenTK.Compute.CL10.CL.Core.CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, ErrorCode* errcode_ret)
   at OpenTK.Compute.CL10.CL.CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, ErrorCode* errcode_ret) in C:\Users\Opdude\Desktop\opentk-1.0-beta-1\Source\OpenTK\Compute\CL10\CL.cs:line 1659
   at Examples.VectorAdd.Main() in C:\Users\Opdude\Desktop\opentk-1.0-beta-1\Source\Examples\OpenCL\VectorAdd.cs:line 40
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Examples.ExampleBrowser.RunSample(Control parent, ExampleInfo e) in C:\Users\Opdude\Desktop\opentk-1.0-beta-1\Source\Examples\ExampleBrowser.cs:line 336

Is there something I'm missing with this example?

Im running this example on Windows 7 x64, with an ATI 4850 (using the ATI Stream SDK 2.0 drivers) incase you need to know.

Thanks in advance