Comments on: Simple Particles with OpenCL and OpenGL http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/ casin' the joint since '85 Thu, 03 Mar 2016 20:39:33 +0000 hourly 1 https://wordpress.org/?v=4.4.5 By: enj http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-135 Thu, 08 Jul 2010 02:24:44 +0000 http://enja.org/?p=183#comment-135 Turns out that it was glFinish() taking up the time that made us think there was memory copying. Changing the timings we get much more expected results: rendering takes up the most time, followed by kernel execution (both are dependent on size) while acquiring and releasing OpenGL objects is cheap and does not appear to depend on the size of the arrays!

]]>
By: enj http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-112 Tue, 29 Jun 2010 13:58:54 +0000 http://enja.org/?p=183#comment-112 @Brian: that makes sense, thanks!

@Andrew: thank you for pointing that out! I have the 9400M which a quick googling reveals does use shared memory (all 256mb =\ ). It’s kind of a let down, but it’s a reality check!
OpenCL reports that the card supports OpenGL interop, and the code still works but I guess the memory is being transfered by the underlying system. When I get good timings I should be able to confirm this.

]]>
By: Andrew http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-111 Mon, 28 Jun 2010 18:57:24 +0000 http://enja.org/?p=183#comment-111 You mentioned you didn’t get any performance increase on your MBP. One cause of this may be that your video card is using shared memory. It is not uncommon for laptop video cards to use part of main memory as video memory. Typically they will have about half dedicated and half shared. You may want to check your MBP’s specifications to find out the details and whether or not it uses shared memory.

]]>
By: Brian http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-110 Sun, 27 Jun 2010 22:39:58 +0000 http://enja.org/?p=183#comment-110 @enj: Yeah, you want to avoid conditionals for GPU targets since the compilers usually have all of the workgroups execute the computation for both branches and only end up using the conditional expression to decide which results get written back to memory.

]]>
By: enj http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-108 Sun, 27 Jun 2010 01:13:40 +0000 http://enja.org/?p=183#comment-108 @Nathan: It’s a safe bet that OpenCL will make it to phones eventually!

@Brian: Thanks for the tip! I definitely want to try some more fun stuff with the system, I know there is a more clever way to deal with the lifetime but I was too busy getting things to work properly. From my preliminary understanding one wants to avoid conditionals if possible right?

]]>
By: Blenderificus http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-107 Sat, 26 Jun 2010 23:41:52 +0000 http://enja.org/?p=183#comment-107 awesome!!! cant wait to see it in Blender. Thank you for your hard work

]]>
By: Tweets that mention Simple Particles with OpenCL and OpenGL | enj -- Topsy.com http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-106 Sat, 26 Jun 2010 20:55:37 +0000 http://enja.org/?p=183#comment-106 […] This post was mentioned on Twitter by Tech news (BOT), Stream Computing. Stream Computing said: Learn #OpenCL by example. Particles, OpenGL and OpenCL: http://bit.ly/9b45Fy Author is working on OpenCL + #Blender – check out his site! […]

]]>
By: Brian http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-105 Sat, 26 Jun 2010 19:38:16 +0000 http://enja.org/?p=183#comment-105 if(life[i] <= 0.)

You might be able to generalize this code (maybe shuffling some code to/from the host) to omit this conditional, and it would probably perform better.

]]>
By: Nathan Crock http://enja.org/2010/06/26/simple-particles-with-opencl-and-opengl/comment-page-1/#comment-103 Sat, 26 Jun 2010 18:07:18 +0000 http://enja.org/?p=183#comment-103 Sick… Now you’re going to port this to the Android right?

]]>