ARM Graphic expert:
I have a cl_mem buffer, which will be reused every camera frame, so it need reset to zero before we can use it.
for opencl 1.2 we can use clEnqueueFillBuffer, for mali driver, what would be the most efficient way to fill the buffer?
I have write a kernel and fill the buffer on gpu, but it turn out to be very slow, the kernel:
__kernel void set(__global int* dstptr)
{
int y = get_global_id(0);
__global int* dst = dstptr + y*ROW_WIDTH;
for (int i=0; i<(ROW_WIDTH/4); i++) {
*dst = 0;
dst++;
}
ROW_WIDTH is a compile time macro, which is set to prime number of the buffer size, for example, for the buffer size 1280*960, it's 75.
And it turn out to be very slow, why? and what's can be done?
Thanks for you reply!
I am running code on mali t760 mp2 on android platform.
I haven't disable dvfs. How to disable dvfs? I have the kernel source.
And I will try your suggestion later.
Thanks,
songmao
Hi songmao,
thanks for your information.
Please, could you tell us as well which platform do you use and which mali driver do you have?
many thanks,
Gian Marco
It's mtk mt6752, the driver seems to be r5, but I am not sure.