<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing? in i.MX Graphics</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2152570#M914</link>
    <description>&lt;P&gt;Thanks for following up.&amp;nbsp; It does appear to work.&amp;nbsp; For anyone else trying to do this, this is how the buffer is created:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;cl_mem_properties extMemProperties[] =
{
	CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR, (cl_mem_properties)buf-&amp;gt;dma_fd,
	0
};
cl_mem buffer_YUYV = clCreateBufferWithProperties(
	/*context*/          context,
	/*properties*/       extMemProperties,
	/*flags*/            CL_MEM_READ_ONLY,
	/*size*/             buf-&amp;gt;size,
	/*host_ptr*/         NULL,
	/*errcode_ret*/      &amp;amp;err);
		&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Aug 2025 00:45:57 GMT</pubDate>
    <dc:creator>pete_sensoray</dc:creator>
    <dc:date>2025-08-15T00:45:57Z</dc:date>
    <item>
      <title>IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing?</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2147914#M887</link>
      <description>&lt;P&gt;I need to use the&amp;nbsp;OpenCL extension 'cl_khr_external_memory_dma_buf' for processing a video buffer using zero-copy, but the extension isn't listed in the string returned from CL_DEVICE_EXTENSIONS:&lt;/P&gt;&lt;PRE&gt;CL_DEVICE_NAME: Vivante OpenCL Device GC7000UL.6204.0000&lt;BR /&gt;CL_DEVICE_VENDOR: Vivante Corporation&lt;BR /&gt;CL_DRIVER_VERSION: OpenCL 3.0 V6.4.11.p2.745085&lt;BR /&gt;CL_DEVICE_PROFILE: FULL_PROFILE&lt;BR /&gt;CL_DEVICE_VERSION: OpenCL 3.0 &lt;BR /&gt;CL_DEVICE_EXTENSIONS: cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_il_program cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_icd cl_khr_command_buffer &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UG10159 says should be supported with this SW version 6.4.11, which is what appears in the driver version.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pete_sensoray_1-1754528249478.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/351244iDE2EFCBBA2639596/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pete_sensoray_1-1754528249478.png" alt="pete_sensoray_1-1754528249478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 01:00:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2147914#M887</guid>
      <dc:creator>pete_sensoray</dc:creator>
      <dc:date>2025-08-07T01:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing?</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2147932#M888</link>
      <description>&lt;P&gt;I checked the cl_ext.h under the&amp;nbsp;/usr/include/CL, this extension already exists, I attached the header file&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;/***************************************************************&lt;BR /&gt;* cl_khr_external_memory_dma_buf&lt;BR /&gt;***************************************************************/&lt;BR /&gt;#define cl_khr_external_memory_dma_buf 1&lt;/P&gt;
&lt;P&gt;/* cl_external_memory_handle_type_khr */&lt;BR /&gt;#define CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR 0x2067&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 01:37:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2147932#M888</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-08-07T01:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing?</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2148605#M893</link>
      <description>&lt;P&gt;Sorry, that's not how extension detection works. The presence of the extension in the driver is not indicated by the cl_ext.h header file -- all possible extensions are listed there and detection happens during program execution.&amp;nbsp; An extension is supported when it is returned in the string from the glGetDeviceInfo function call:&lt;/P&gt;&lt;PRE&gt;char extensions[1024];&lt;BR /&gt;clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, sizeof(extensions), extensions, NULL);&lt;BR /&gt;printf("CL_DEVICE_EXTENSIONS: %s\n", extensions);&lt;BR /&gt;if (strstr(extensions, "cl_khr_external_memory_dma_buf") == NULL) {&lt;BR /&gt;// Handle error: DMA-BUF extension not supported&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;Either the documentation is wrong, or the extensions list in the driver is wrong.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 16:41:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2148605#M893</guid>
      <dc:creator>pete_sensoray</dc:creator>
      <dc:date>2025-08-07T16:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing?</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2151965#M912</link>
      <description>&lt;P&gt;confirmed that imx8mp can support this, suggest customer to call the driver directly, to check if the return value is correct or not, don't need to check this print information&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 03:01:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2151965#M912</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-08-14T03:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP: OpenCL extension 'cl_khr_external_memory_dma_buf' missing?</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2152570#M914</link>
      <description>&lt;P&gt;Thanks for following up.&amp;nbsp; It does appear to work.&amp;nbsp; For anyone else trying to do this, this is how the buffer is created:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;cl_mem_properties extMemProperties[] =
{
	CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR, (cl_mem_properties)buf-&amp;gt;dma_fd,
	0
};
cl_mem buffer_YUYV = clCreateBufferWithProperties(
	/*context*/          context,
	/*properties*/       extMemProperties,
	/*flags*/            CL_MEM_READ_ONLY,
	/*size*/             buf-&amp;gt;size,
	/*host_ptr*/         NULL,
	/*errcode_ret*/      &amp;amp;err);
		&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2025 00:45:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing/m-p/2152570#M914</guid>
      <dc:creator>pete_sensoray</dc:creator>
      <dc:date>2025-08-15T00:45:57Z</dc:date>
    </item>
  </channel>
</rss>

