Hello Guest

OpenCL

  • 69 Replies
  • 64113 Views
Re: OpenCL
« Reply #15 on: September 13, 2010, 13:52:19 »
OpenCL is very very poorly supported by drivers at this stage IME(InMyExperence). I don't think there is any rush till things stabilize to something you at least have a hope of get working on a clients computer.
If you want a plot read a book and leave Hollywood out of it.

*

Offline spasi

  • *****
  • 2156
    • WebHotelier
Re: OpenCL
« Reply #16 on: September 18, 2010, 11:25:25 »
I just made the first successful LWJGL OpenCL call, yay. I should be able to implement OpenCL 1.0, 1.1 + extensions over the weekend, then I'll work on the java-side API, then integration with OpenGL... should have a beta version committed by the next weekend, hopefully.

It took a while because OpenCL makes heavy use of pointer arrays and size_t parameters. I ended up implementing a PointerBuffer class that mirrors the LongBuffer API at the Java-side, but works with either 32bit or 64bit values underneath. Then I had to add support for it in our generator, do a bit of refactoring, etc.

*

Offline Matzon

  • *****
  • 2242
Re: OpenCL
« Reply #17 on: September 18, 2010, 17:45:53 »
Excellent work. Should we hold 2.6 and get that in or ?

*

Offline spasi

  • *****
  • 2156
    • WebHotelier
Re: OpenCL
« Reply #18 on: September 18, 2010, 17:50:19 »
If there's an important fix/feature in 2.6, we should go ahead and release it, OpenCL can wait.

*

Offline Matzon

  • *****
  • 2242
Re: OpenCL
« Reply #19 on: September 18, 2010, 18:17:24 »
nope - I'd also like to get opencl out there and then do a 2.6.x later on

*

Offline spasi

  • *****
  • 2156
    • WebHotelier
Re: OpenCL
« Reply #20 on: September 20, 2010, 16:34:31 »
It currently looks like that the OpenCL binding would be much cleaner/prettier if we could use generics and enums. Do you think this is a good time to move to a 1.5+ code base? Or should we wait for 3.0 (which might also include non-backwards-compatible changes)?
« Last Edit: September 20, 2010, 16:36:14 by spasi »

*

Offline kappa

  • *****
  • 1313
Re: OpenCL
« Reply #21 on: September 20, 2010, 16:57:11 »
I'd be shocked if there is a computer out there that supports OpenCL and has Java 1.4 :)

*

Offline princec

  • *****
  • 1929
    • Puppygames
Re: OpenCL
« Reply #22 on: September 20, 2010, 17:24:41 »
Let me just check my "in-the-wild" Java stats to see what 1.4 VMs are still out there...

Cas :0

*

Offline Matzon

  • *****
  • 2242
Re: OpenCL
« Reply #23 on: September 20, 2010, 17:59:05 »
would retroweaver be an option?

*

Offline kappa

  • *****
  • 1313
Re: OpenCL
« Reply #24 on: September 20, 2010, 18:05:37 »
Let me just check my "in-the-wild" Java stats to see what 1.4 VMs are still out there...

Cas :0

last I checked on StatOWL, Java 1.4 and all jre versions below it only accounted for about 5% of all java installs. Java 1.5 accounted for about 15% and with the rest either having Java 6 or no java.

but will be interesting to see what stats you get from your games.

*

Offline princec

  • *****
  • 1929
    • Puppygames
Re: OpenCL
« Reply #25 on: September 20, 2010, 18:37:56 »
Right, stats since the great hard disk crash indicate a still reasonably sizeable 10% of the Mac-using population running Puppygames are using 1.4 for some reason. (That's unique installs too, not plays) I'm on the verge of saying "ditch them" as those running 1.4 are also mostly running 10.3.9 and 10.4.11 which are getting pretty long in the the tooth. Mac being 50% of my customer base that's a fairly sizable number of people though.

To move to Java 5 syntax and so on we should bump the major version number of LWJGL though - maybe to 3.0 - and archive the 2.5 LWJGL release so that those wanting backward 1.4 compatibility don't have to arse about retroweaving or anything.

Cas :)

*

Offline kappa

  • *****
  • 1313
Re: OpenCL
« Reply #26 on: September 20, 2010, 19:05:16 »
just curious, how will OpenCL be integrated into LWJGL, will it just be a in the lwjgl.jar/lwjgl.dll or will it be a separate standalone optional jar and native (lwjgl-opencl.jar and opencl.dll) ?

do consider its likely to a be a small niche market for a while yet.

*

Offline spasi

  • *****
  • 2156
    • WebHotelier
Re: OpenCL
« Reply #27 on: September 20, 2010, 19:57:40 »
I was thinking about that too, might as well go for a separate jar/dll for now. I'll see how it goes first though, gonna decide when the implementation is complete.

edit: On a related note, we could do an extension cleanup soon. We support dozens of legacy extensions that can be easily removed.
« Last Edit: September 20, 2010, 20:05:42 by spasi »

*

Offline kappa

  • *****
  • 1313
Re: OpenCL
« Reply #28 on: September 20, 2010, 20:10:19 »
yeh agreed, did notice that the lwjgl.jar has picked up some weight as of late (*shakes fist at khronos*).

e.g.

lwjgl 2.3 = lwjgl.jar (590kb)
lwjgl 2.5 = lwjgl.jar (729kb)

*

Offline spasi

  • *****
  • 2156
    • WebHotelier
Re: OpenCL
« Reply #29 on: September 20, 2010, 23:56:20 »
I took a break from OpenCL and made another change to the Generator that lets us reuse entry points. Many ARB extensions will now reuse the implementations of the core functions (even if the corresponding GL version isn't supported). A total of 287 functions have been updated to use this trick.