Quantcast
Channel: Adobe Community : Popular Discussions - Premiere Pro SDK
Viewing all articles
Browse latest Browse all 53010

gpu accelerated plugin is not working well on Radeon graphic card

$
0
0

Hi, everyone!

I am building a gpu accelerated plugin from SDK_ProcAmp. (CUDA, openCL, metal)

it is working as well without any error on window. (CUDA, openCL)

And it also is working as well on MAC which has NVidio or intel DH graphic card.(openCL, metal)

But there is specific error on MAC which has Radeon graphic card.(openCL, metal)

 

------------------- Problem on radeon graphic card ---------------------

Until before rendering, the plugin is working as well without any error.

After rendering, there is the error when I change some parameters,

 

for example with opencl.

 

error : CL_INVALID_CONTEXT                          -34

 

difference with SDK_ProcAmp:

I created temp buffer by clCreateBuffer and use it for some effect operation in render function.

 

/////////////////////// some codes //////////////////////////////

....

int n_elements = mWidth * mHeight * sizof(float) *4;

cl_mem tempEffectBuffer = clCreateBuffer(context, CL_MEM_READ_WRITE,

          n_elements,

               NULL, &errcode);

....

....

 

clSetKernelArg(mKernel1, 0, sizeof(cl_mem), &inBuffer);

clSetKernelArg(mKernel1, 1, sizeof(int), &inPitch);

clSetKernelArg(mKernel1, 2, sizeof(cl_mem), &tempEffectBuffer);

clSetKernelArg(mKernel1, 3, sizeof(int), &tempPitch);

...

...

 

cl_int result = clEnqueueNDRangeKernel(

     mCommandQueue,

     mKernel1,

     2,

     0,

     grid1,

     threadBlock1,

     0,

     0,

     0);

 

 

if (result != CL_SUCCESS)    // the error appears when I change some parameters after redering.(CL_INVALID_CONTEXT                          -34)

          return suiteError_Fail;

 

....

// First kernel puts some effected pixel information of inFrame into tempEffectBuffer.

// Second kernel puts other effected pixel information of tempEffectBuffer into destBuffer.

....

     clSetKernelArg(mFinalKernel, 0, sizeof(cl_mem), &tempEffectBuffer);

     clSetKernelArg(mFinalKernel, 1, sizeof(int), &inPitch);

     clSetKernelArg(mFinalKernel, 2, sizeof(cl_mem), &destBuffer);

     clSetKernelArg(mFinalKernel, 3, sizeof(int), &destPitch);

....

....

cl_int anti_result = clEnqueueNDRangeKernel(

     mCommandQueue,

     mFinalKernel,

     2,

     0,

     grid2,

     threadBlock2,

     0,

     0,

     0);

 

 

if (finalResult!= CL_SUCCESS)

     return suiteError_Fail;

...

...

 

///////////////////////////////// end code ////////////////////

 

I hope to get help from anyone.

 

Regards,

Igor.


Viewing all articles
Browse latest Browse all 53010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>