www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - cl4d OpenCL wrapper moved to Github

reply "Trass3r" <un known.com> writes:
I finally moved cl4d to https://github.com/Trass3r/cl4d

It's in a very usable state. Contains 2 samples including an 
OpenCL/OpenGL interop one similar to 
http://www.youtube.com/watch?v=K1FOIhA6ecQ

btw, as of my latest commit you need a HEAD dmd to build it. This 
fixes a severe memory leak.
Dec 28 2011
next sibling parent mta`chrono <chrono mta-international.net> writes:
hey that's cool. thank you for your effort. what about moving this to
deimos?

- mta`chrono
Dec 29 2011
prev sibling next sibling parent reply Extrawurst <spam extrawurst.org> writes:
nice work. why moved to github ?

btw. with dmd2057 and the -property flag it does not build anymore.

Stephan

On 29.12.2011 02:18, Trass3r wrote:
 I finally moved cl4d to https://github.com/Trass3r/cl4d

 It's in a very usable state. Contains 2 samples including an
 OpenCL/OpenGL interop one similar to
 http://www.youtube.com/watch?v=K1FOIhA6ecQ

 btw, as of my latest commit you need a HEAD dmd to build it. This fixes
 a severe memory leak.

Dec 29 2011
parent reply Stephan <spam extrawurst.org> writes:
On 29.12.2011 13:31, Trass3r wrote:
 On Thursday, 29 December 2011 at 10:32:49 UTC, Extrawurst wrote:
 nice work. why moved to github ?

I'm sick of having to switch from git to hg commands every time I work on cl4d. So I converted it to git, cleaned up the history and just put it on Github cause it has nicer features.
 btw. with dmd2057 and the -property flag it does not build anymore.

I see, haven't used that switch yet.

ok i can just use the c header ports, the wrapper just makes dmd choke "Stack Overflow" with this simple cmd line: dmd opencl\c\cl.d opencl\c\cl_ext.d opencl\c\cl_gl.d opencl\c\cl_gl_ext.d opencl\c\cl_platform.d opencl\c\opencl.d opencl\all.d opencl\buffer.d opencl\commandqueue.d opencl\context.d opencl\device.d opencl\error.d opencl\event.d opencl\host.d opencl\image.d opencl\kernel.d opencl\memory.d opencl\platform.d opencl\program.d opencl\sampler.d opencl\wrapper.d
Dec 30 2011
parent reply Klyn <klyn no-email.com> writes:
On Fri 30-Dec 10:00, Stephan wrote:
 On 29.12.2011 13:31, Trass3r wrote:
 On Thursday, 29 December 2011 at 10:32:49 UTC, Extrawurst wrote:
 nice work. why moved to github ?

I'm sick of having to switch from git to hg commands every time I work on cl4d. So I converted it to git, cleaned up the history and just put it on Github cause it has nicer features.
 btw. with dmd2057 and the -property flag it does not build anymore.

I see, haven't used that switch yet.

ok i can just use the c header ports, the wrapper just makes dmd choke "Stack Overflow" with this simple cmd line: dmd opencl\c\cl.d opencl\c\cl_ext.d opencl\c\cl_gl.d opencl\c\cl_gl_ext.d opencl\c\cl_platform.d opencl\c\opencl.d opencl\all.d opencl\buffer.d opencl\commandqueue.d opencl\context.d opencl\device.d opencl\error.d opencl\event.d opencl\host.d opencl\image.d opencl\kernel.d opencl\memory.d opencl\platform.d opencl\program.d opencl\sampler.d opencl\wrapper.d

Heh, I was just going to post about that too, guess I'll post it here: (using dmd 2.057, eclipse+DDT, win7 x64) Hi, I'm trying to use cl4d, but when I compile I get a stack overflow.. This happens on the CLGLInterop.d example in the cl4d source. After some stripping down, it seems just an empty module with an empty main() and an import opencl.all is enough to trigger the overflow: -- module CLGLInterop; import opencl.all; void main(){} -- Here's the verbose compile output: -------- Build Commands: -------- -od"bin" -of"bin\test.exe" -I"src" "src\CLGLInterop.d" -v -d -I"C:\_prog\D\custom2\derelict\import\" -I"C:\_prog\D\custom2\cl4d\import\" binary C:\_prog\D\dmd2\windows\bin\dmd.exe version v2.057 config C:\_prog\D\dmd2\windows\bin\sc.ini parse CLGLInterop importall CLGLInterop import object (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\object.di) import opencl.all (C:\_prog\D\custom2\cl4d\import\opencl\all.d) import opencl.c.opencl (C:\_prog\D\custom2\cl4d\import\opencl\c\opencl.d) import opencl.c.cl (C:\_prog\D\custom2\cl4d\import\opencl\c\cl.d) import opencl.c.cl_platform (C:\_prog\D\custom2\cl4d\import\opencl\c\cl_platform.d) import std.conv (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d) import core.stdc.math (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\math.di) import core.stdc.config (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\config.di) import core.stdc.string (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\string.di) import core.stdc.stddef (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stddef.di) import std.algorithm (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d) import std.c.string (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\c\string.d) import std.array (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\array.d) import core.memory (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\memory.di) import core.bitop (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\bitop.di) import std.ascii (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\ascii.d) import std.exception (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\exception.d) import std.range (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\range.d) import std.functional (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\functional.d) import std.metastrings (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\metastrings.d) import std.traits (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\traits.d) import std.typetuple (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\typetuple.d) import std.typecons (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\typecons.d) import core.stdc.stdlib (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdlib.di) import std.format (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\format.d) import core.stdc.stdio (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdio.di) import core.stdc.stdarg (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdarg.di) import core.vararg (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\vararg.di) import std.bitmanip (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d) import std.math (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\math.d) import std.string (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\string.d) import core.exception (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\exception.di) import std.regex (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\regex.d) import std.internal.uni (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\internal\uni.d) import std.uni (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\uni.d) import std.internal.uni_tab (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\internal\uni_tab.d) import std.utf (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\utf.d) import std.system (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\system.d) import core.stdc.errno (C:\_prog\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\errno.di) import std.container (C:\_prog\D\dmd2\windows\bin\..\..\src\phobos\std\container.d) import opencl.c.cl_gl (C:\_prog\D\custom2\cl4d\import\opencl\c\cl_gl.d) import opencl.c.cl_gl_ext (C:\_prog\D\custom2\cl4d\import\opencl\c\cl_gl_ext.d) import opencl.c.cl_ext (C:\_prog\D\custom2\cl4d\import\opencl\c\cl_ext.d) import opencl.commandqueue (C:\_prog\D\custom2\cl4d\import\opencl\commandqueue.d) import opencl.buffer (C:\_prog\D\custom2\cl4d\import\opencl\buffer.d) import opencl.context (C:\_prog\D\custom2\cl4d\import\opencl\context.d) import opencl.device (C:\_prog\D\custom2\cl4d\import\opencl\device.d) import opencl.error (C:\_prog\D\custom2\cl4d\import\opencl\error.d) import opencl.platform (C:\_prog\D\custom2\cl4d\import\opencl\platform.d) import opencl.wrapper (C:\_prog\D\custom2\cl4d\import\opencl\wrapper.d) import opencl.kernel (C:\_prog\D\custom2\cl4d\import\opencl\kernel.d) import opencl.memory (C:\_prog\D\custom2\cl4d\import\opencl\memory.d) import opencl.program (C:\_prog\D\custom2\cl4d\import\opencl\program.d) import opencl.sampler (C:\_prog\D\custom2\cl4d\import\opencl\sampler.d) import opencl.event (C:\_prog\D\custom2\cl4d\import\opencl\event.d) import opencl.image (C:\_prog\D\custom2\cl4d\import\opencl\image.d) import opencl.host (C:\_prog\D\custom2\cl4d\import\opencl\host.d) semantic CLGLInterop Stack overflow I'm at a loss.. Any ideas?
Jan 08 2012
parent reply Klyn <klyn no-email.com> writes:
On Sun 08-Jan 22:53, Trass3r wrote:
 I'm trying to use cl4d, but when I compile I get a stack overflow..

Sigh. As I stated in the announcement you need a HEAD dmd. Or use a cl4d revision prior to the mentioned bugfix.

Oh I think I now get what you mean by HEAD dmd: the latest version on github. I've never compiled dmd myself so that didn't even occur to me.. About the 'mentioned bugfix', I assume you're referring to "bug 6473 has been fixed => so let's fix that memory leak"?
Jan 08 2012
parent reply Klyn <klyn no-email.com> writes:
On Mon 09-Jan 0:05, Trass3r wrote:
 About the 'mentioned bugfix', I assume you're referring to "bug 6473
 has been fixed => so let's fix that memory leak"?

Yep, just git checkout the revision before that one.

Ok, so when i try to compile it says src\opencl\c\cl_d3d10.d(88): Error: undefined identifier UINT src\opencl\c\cl_d3d10.d(96): Error: undefined identifier UINT and upon changing those to uint I get src\opencl\c\cl_d3d11.d(77): Error: undefined identifier ID3D11Buffer src\opencl\c\cl_d3d11.d(84): Error: undefined identifier ID3D11Texture2D src\opencl\c\cl_d3d11.d(91): Error: undefined identifier ID3D11Texture3D What am I missing?
Jan 08 2012
parent reply Klyn <klyn no-email.com> writes:
On Mon 09-Jan 2:45, Trass3r wrote:
 Ok, so when i try to compile it says

 src\opencl\c\cl_d3d10.d(88): Error: undefined identifier UINT
 src\opencl\c\cl_d3d10.d(96): Error: undefined identifier UINT

 and upon changing those to uint I get

 src\opencl\c\cl_d3d11.d(77): Error: undefined identifier ID3D11Buffer
 src\opencl\c\cl_d3d11.d(84): Error: undefined identifier ID3D11Texture2D
 src\opencl\c\cl_d3d11.d(91): Error: undefined identifier ID3D11Texture3D

 What am I missing?

Well the DirectX stuff isn't tested at all. I always compile with rdmd so these modules aren't compiled. The uint errors are small cases I overlooked. The rest is obvious: cl4d knows nothing about DirectX, so you need a binding. Maybe I should just turn these into void* to get rid of the errors, but then you loose type safety, hmm.

Well, I resorted to using bud and managed to get the vectorAdd example to compile, but when I run I get this error: AMD Accelerated Parallel Processing Advanced Micro Devices, Inc. OpenCL 1.1 AMD-APP (831.4) FULL_PROFILE cl_khr_icd cl_amd_event_callback cl_amd_offline_devices cl_khr_d3d10_sharing Barts Advanced Micro Devices, Inc. CAL 1.4.1646 (VM) OpenCL 1.1 AMD-APP (831.4) FULL_PROFILE Intel(R) Core(TM)2 Duo CPU E6750 2.66GHz GenuineIntel 2.0 OpenCL 1.1 AMD-APP (831.4) FULL_PROFILE Warnings being treated as errors C:\Users\abc\AppData\Local\Temp\OCLA2DA.tmp.cl(1): error: unrecognized character escape sequence #line 35 "src\main.d" ^ 1 error detected in the compilation of "C:\Users\abc\AppData\Local\Temp\OCLA2DA.tmp.cl". Internal error: clc compiler invocation failed. core.exception.AssertError src\opencl\kernel.d(196): _object is null ---------------- 42A6A8 42A51F 4039CD 40EE7C 40EEC0 40EAB7 4AC3A9 ---------------- Is this some kind of \ vs / bug?
Jan 09 2012
parent reply Klyn <klyn no-email.com> writes:
On Mon 09-Jan 14:24, Trass3r wrote:
 Well, I resorted to using bud and managed to get the vectorAdd example
 to compile, but when I run I get this error:

btw, bud's not maintained anymore.
 Is this some kind of \ vs / bug?

Try removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO) ~ vectorAdd.d(36)

Alright, that works! The vector example now gives the expected output. The CLGLInterop example however just gives a black window. By the way, just using your make.bat (with -d added) compiles fine now too.
Jan 09 2012
parent reply Klyn <klyn no-email.com> writes:
On Mon 09-Jan 23:39, Klyn wrote:
 On Mon 09-Jan 14:24, Trass3r wrote:
 Well, I resorted to using bud and managed to get the vectorAdd example
 to compile, but when I run I get this error:

btw, bud's not maintained anymore.
 Is this some kind of \ vs / bug?

Try removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO) ~ vectorAdd.d(36)

Alright, that works! The vector example now gives the expected output. The CLGLInterop example however just gives a black window. By the way, just using your make.bat (with -d added) compiles fine now too.

I finally compiled the HEAD dmd/druntime/phobos, so I'm now using your latest cl4d version. The make.bat compiles both examples just fine (with -d ofcourse). The vectorAdd example works perfectly, without any editing (ie. without removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO)). The CLGLInterop example however still just gives a black window. It only outputs the FPS in cmdline.
Jan 09 2012
parent reply Klyn <klyn no-email.com> writes:
On Tue 10-Jan 1:23, Trass3r wrote:
 The vectorAdd example works perfectly, without any editing (ie.
 without removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO)).

How strange, does pragma(msg, CL_PROGRAM_STRING_DEBUG_INFO); give different results for the two dmd revisions?
 The CLGLInterop example however still just gives a black window. It
 only outputs the FPS in cmdline.

any error messages? compile it in debug mode with -debug -g.

None that I can see. C:\cl4d\CLGLInterop.exe copied cl_platform_id 920C4F4. Reference count is now: 0 wrapped cl_context A5671A8 releasing cl_platform_id 920C4F4. Reference count before: 0 copied cl_platform_id 920C4F4. Reference count is now: 0 releasing cl_platform_id 920C4F4. Reference count before: 0 copied cl_context A5671A8. Reference count is now: 2 wrapped cl_mem A5789A8 releasing cl_context A5671A8. Reference count before: 2 copied cl_mem A5789A8. Reference count is now: 2 releasing cl_mem A5789A8. Reference count before: 2 copied cl_context A5671A8. Reference count is now: 2 wrapped cl_mem A49F8C8 releasing cl_context A5671A8. Reference count before: 2 copied cl_mem A49F8C8. Reference count is now: 2 releasing cl_mem A49F8C8. Reference count before: 2 copied cl_context A5671A8. Reference count is now: 2 wrapped cl_mem 44EEC38 releasing cl_context A5671A8. Reference count before: 2 copied cl_context A5671A8. Reference count is now: 2 wrapped cl_program A642850 releasing cl_context A5671A8. Reference count before: 3 copied cl_program A642850. Reference count is now: 2 copied cl_device_id 44276B0. Reference count is now: 0 releasing cl_device_id 44276B0. Reference count before: 0 releasing cl_program A642850. Reference count before: 2 copied cl_program A642850. Reference count is now: 2 wrapped cl_kernel A608008 releasing cl_program A642850. Reference count before: 3 copied cl_mem A5789A8. Reference count is now: 2 copied cl_mem A49F8C8. Reference count is now: 2 copied cl_mem 44EEC38. Reference count is now: 2 copied cl_mem A5789A8. Reference count is now: 3 copied cl_mem A5789A8. Reference count is now: 4 releasing cl_mem A5789A8. Reference count before: 4 releasing cl_mem A5789A8. Reference count before: 3 copied cl_mem A49F8C8. Reference count is now: 3 copied cl_mem A49F8C8. Reference count is now: 4 releasing cl_mem A49F8C8. Reference count before: 4 releasing cl_mem A49F8C8. Reference count before: 3 copied cl_mem 44EEC38. Reference count is now: 3 copied cl_mem 44EEC38. Reference count is now: 4 releasing cl_mem 44EEC38. Reference count before: 4 releasing cl_mem 44EEC38. Reference count before: 3 releasing cl_mem A5789A8. Reference count before: 2 releasing cl_mem A49F8C8. Reference count before: 2 releasing cl_mem 44EEC38. Reference count before: 2 copied cl_context A5671A8. Reference count is now: 3 copied cl_device_id 44276B0. Reference count is now: 0 wrapped cl_command_queue 4436648 releasing cl_context A5671A8. Reference count before: 4 releasing cl_device_id 44276B0. Reference count before: 0 copied cl_device_id 44276B0. Reference count is now: 0 releasing cl_device_id 44276B0. Reference count before: 0 releasing cl_program A642850. Reference count before: 2 initialization done copied cl_mem A5789A8. Reference count is now: 2 copied cl_mem A49F8C8. Reference count is now: 2 wrapped cl_event A5594C0 copied cl_mem A5789A8. Reference count is now: 4 releasing cl_mem A5789A8. Reference count before: 3 copied cl_mem A49F8C8. Reference count is now: 4 releasing cl_mem A49F8C8. Reference count before: 3 releasing cl_event A5594C0. Reference count before: 2 copied cl_mem 44EEC38. Reference count is now: 2 wrapped cl_event 442DFE0 releasing cl_mem 44EEC38. Reference count before: 2 releasing cl_event 442DFE0. Reference count before: 1 etc.
Jan 09 2012
parent Klyn <klyn no-email.com> writes:
On Tue 10-Jan 3:29, Trass3r wrote:
 Does this one work?
 http://www.cmsoft.com.br/index.php?option=com_content&view=category&layout=blog&id=99&Itemid=150

Simply running the bin/Debug/CLGLInterop.exe included in the zip produces ************** Exception Text ************** Cloo.BuildProgramFailureComputeException: Error in the application. at Cloo.ComputeException.ThrowOnError(ComputeErrorCode error) at Cloo.ComputeProgram.Build(ICollection`1 devices, String options, ComputeProgramBuildNotifier notify, IntPtr notifyDataPtr) at CLGLInterop.Form1.glControl1_Load(Object sender, EventArgs e) in D:\Programacao\OpenCL\Tutorial\CLGLInterop\CLGLInterop\Form1.cs:line 184 at System.Windows.Forms.UserControl.OnLoad(EventArgs e) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5448 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll ---------------------------------------- CLGLInterop Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/CLGLInterop/bin/Debug/CLGLInterop.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5447 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- OpenTK.GLControl Assembly Version: 1.0.0.201 Win32 Version: 1.0.0.201 CodeBase: file:///C:/CLGLInterop/bin/Debug/OpenTK.GLControl.DLL ---------------------------------------- OpenTK Assembly Version: 1.0.0.201 Win32 Version: 1.0.0.201 CodeBase: file:///C:/CLGLInterop/bin/Debug/OpenTK.DLL ---------------------------------------- Cloo Assembly Version: 0.7.1.0 Win32 Version: 0.7.1 CodeBase: file:///C:/CLGLInterop/bin/Debug/Cloo.DLL ----------------------------------------
Jan 09 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
On Thursday, 29 December 2011 at 09:48:54 UTC, mta`chrono wrote:
 hey that's cool. thank you for your effort. what about moving 
 this to deimos?

Remember this is a wrapper, not only a binding. What would be the merit of outsourcing the binding?
Dec 29 2011
prev sibling next sibling parent "Trass3r" <un known.com> writes:
On Thursday, 29 December 2011 at 10:32:49 UTC, Extrawurst wrote:
 nice work. why moved to github ?

I'm sick of having to switch from git to hg commands every time I work on cl4d. So I converted it to git, cleaned up the history and just put it on Github cause it has nicer features.
 btw. with dmd2057 and the -property flag it does not build 
 anymore.

I see, haven't used that switch yet.
Dec 29 2011
prev sibling next sibling parent Trass3r <un known.com> writes:
 I'm trying to use cl4d, but when I compile I get a stack overflow..

Sigh. As I stated in the announcement you need a HEAD dmd. Or use a cl4d revision prior to the mentioned bugfix.
Jan 08 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
 About the 'mentioned bugfix', I assume you're referring to "bug 
 6473 has been fixed => so let's fix that memory leak"?

Yep, just git checkout the revision before that one.
Jan 08 2012
prev sibling next sibling parent Trass3r <un known.com> writes:
 Ok, so when i try to compile it says

 src\opencl\c\cl_d3d10.d(88): Error: undefined identifier UINT
 src\opencl\c\cl_d3d10.d(96): Error: undefined identifier UINT

 and upon changing those to uint I get

 src\opencl\c\cl_d3d11.d(77): Error: undefined identifier ID3D11Buffer
 src\opencl\c\cl_d3d11.d(84): Error: undefined identifier ID3D11Texture2D
 src\opencl\c\cl_d3d11.d(91): Error: undefined identifier ID3D11Texture3D

 What am I missing?

Well the DirectX stuff isn't tested at all. I always compile with rdmd so these modules aren't compiled. The uint errors are small cases I overlooked. The rest is obvious: cl4d knows nothing about DirectX, so you need a binding. Maybe I should just turn these into void* to get rid of the errors, but then you loose type safety, hmm.
Jan 08 2012
prev sibling next sibling parent Trass3r <un known.com> writes:
 Well, I resorted to using bud and managed to get the vectorAdd example  
 to compile, but when I run I get this error:

btw, bud's not maintained anymore.
 Is this some kind of \ vs / bug?

Try removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO) ~ vectorAdd.d(36)
Jan 09 2012
prev sibling next sibling parent Trass3r <un known.com> writes:
 The vectorAdd example works perfectly, without any editing (ie. without  
 removing the mixin(CL_PROGRAM_STRING_DEBUG_INFO)).

How strange, does pragma(msg, CL_PROGRAM_STRING_DEBUG_INFO); give different results for the two dmd revisions?
 The CLGLInterop example however still just gives a black window. It only  
 outputs the FPS in cmdline.

any error messages? compile it in debug mode with -debug -g.
Jan 09 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
 The CLGLInterop example however still just gives a black 
 window. It only outputs the FPS in cmdline.

any error messages? compile it in debug mode with -debug -g.

None that I can see.

Hmm I'm not sure if I ever tested the code on Windows. The version(Windows) stuff looks ok though. I guess one would have to investigate this with something like http://www.gremedy.com
Jan 09 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
Does this one work?
http://www.cmsoft.com.br/index.php?option=com_content&view=category&layout=blog&id=99&Itemid=150
Jan 09 2012
prev sibling next sibling parent "Trass3r" <un known.com> writes:
Those guys do know how to create useless exception messages o.O

Well can't investigate this further at the moment.
Jan 09 2012
prev sibling parent Trass3r <un known.com> writes:
 The CLGLInterop example however still just gives a black window. It
 only outputs the FPS in cmdline.



Well it works fine on my Win7 x64 machine.
Jan 12 2012