Page 1 of 1

from CPU to GPU accelerated

Posted: 2012-07-03, 17:50
by stravinsky
http://www.removablefeast.com:8000/google-bouncing-balls/

in this demo, for density = "CPU destroying" , the performance is very slow, because the CPU is being used to do paralled processing stuff.
my question is : without changing the code of the benchmark , is it possile to run this demo using the GPU acceleration ?


since this demo is using HTML5, can we make use of the GPU?

Re: from CPU to GPU accelerated

Posted: 2012-07-03, 17:57
by Moonchild
Short answer: no.

Long answer: the browser content does not have direct access to graphics card functions like CUDA or Stream. That would be a Bad ThingTM
Since the calculations are not related to drawing (generic functions) you'd have to offload this task using GPU-specific code of the page-specific algorithm to the video card which you cannot do.

Re: from CPU to GPU accelerated

Posted: 2012-07-03, 18:04
by stravinsky
since demos like "ie9 fish demo" and other html5 demos do use the GPU for better performance. or playing angry birds in the browser with HWA turned off makes it bad performing (running on the CPU, instead of the GPU ) i thought this could be done on this demo too.

Re: from CPU to GPU accelerated

Posted: 2012-07-03, 23:16
by Moonchild
It all depends on the way the demo was programmed. Both the "fish" demo and the angry birds game have fairly few calculations, most of it is standard drawing of objects which can be accelerated by using the directx layers. The demo you pointed at is speed limited by the actual calculations done for each dot, not by the drawing of the dots.

Re: from CPU to GPU accelerated

Posted: 2012-07-04, 05:20
by stravinsky
GPU's do drawing+calculation in games . but that would have to be explicitly programmed by the programmer.
i thought by making some small changes in the FF code, the intensive parallel cpu calls could be intercepted and sent to the GPU.

you can close this thread now.

Re: from CPU to GPU accelerated

Posted: 2012-07-04, 09:47
by Moonchild
stravinsky wrote:GPU's do drawing+calculation in games.
Games have direct access to programming the GPU. That's not something you want browser content to be able to do. So it means this is limited to what the actual browser implements as far as acceleration goes (standard, generic functions).