I am trying to use the openCL examples in DirectGMA SDK 1.1. Although in general it seems to be working, but I am finding weird behaviours when I try to change the OpenCL kernel code, so I would appreciate some feedback. I get no error message (basically it seems the kernel is compiled fine, and the code runs, but I don't get any correct output either.
// Modified kernel code
const char* pKernelSrc = "__kernel void copyImage(__global uint* rgbaIn, __global uint* rgbaOut, int2 vDim) \n \
{ \n \
uint posX = get_global_id(0); \n \
uint posY = get_global_id(1); \n \
uint value4 = 0; \n \
\n \
value4 = rgbaIn[posY] ; \n \
rgbaOut[(posY * (vDim.y)) + posX] = value4; \n \
} ";
.......
///////////////////
I am trying to basically do format conversion with OpenCL. Basically I've 2 cl_mem buffers in GPU memory, and I am doing 16bpp - 32bpp conversion, and copying the results to an OpenGL texture to display. I tried some sample OpenCL code I got from web, but none really behaves really well either. Could this be just that the OpenCL stuff in the DirectGMA 1.1 SDK is too. So far only the enqueueread/write copy works consistently, anything else seems to have very tight requirements. But I am a newbie, so maybe I am missing something. Most of the time the kernel compileswith no issues, it just doesn't work. (if I purposely inject errors in to the kernel, it then it will fail kernel compilation)
Any help would be much appreciated.
Solved! Go to Solution.
I can see your another post here OpenCL newbie questions . I think both are same. In that case, it's good that you've figured out the issues and resolved it.
Regards,
Hi Patrick,
You've been white-listed. So, you should be able to post in any forum appropriate to your issue.
Is the above issue specific to DirectGMA SDK or do you observe the same for any OpenCL code (i.e without DirectGMA SDK also)?
I am testing with the DirectGMA SDK 1.1 code and it's OpenCL projects as I needed to use DirectGMA along with either OpenCL or something else to do format conversion. I haven't tried running using different environment (aka without DirectGMA SDK)
I can see your another post here OpenCL newbie questions . I think both are same. In that case, it's good that you've figured out the issues and resolved it.
Regards,