<?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 i.MX6: Impossible to pass NULL buffer objects to clSetKernelArg() in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Impossible-to-pass-NULL-buffer-objects-to-clSetKernelArg/m-p/317820#M42134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Vivante GPU package from i.MX6 BSP 3.0.35-4.1.0, passing NULL or a pointer thereto to clSetKernelArg() for a kernel buffer object argument (e.g. '&lt;SPAN style="font-family: courier new,courier;"&gt;__global uchar *buf&lt;/SPAN&gt;') results in a segmentation fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a bug since, according to &lt;A class="jive-link-external-small" data-content-finding="Community" href="https://www.khronos.org/registry/cl/specs/opencl-1.1.pdf"&gt;https://www.khronos.org/registry/cl/specs/opencl-1.1.pdf&lt;/A&gt; § "5.7.2 Setting Kernel Arguments":&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;If the argument is a buffer object, the arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as a pointer to __global or __constant memory in the kernel.&lt;/P&gt;

&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the only way of passing a NULL pointer to a kernel, so there is no workaround, apart from adding a kernel argument telling not to use the passed pointer, which anyway compels to create a dummy buffer object when not needed, but this one can be small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tested this issue with the Yocto release, but I have found nothing in the release notes indicating that such a bug has been fixed. Does anyone know?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2014 01:16:10 GMT</pubDate>
    <dc:creator>bthebaudeau</dc:creator>
    <dc:date>2014-06-12T01:16:10Z</dc:date>
    <item>
      <title>i.MX6: Impossible to pass NULL buffer objects to clSetKernelArg()</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Impossible-to-pass-NULL-buffer-objects-to-clSetKernelArg/m-p/317820#M42134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Vivante GPU package from i.MX6 BSP 3.0.35-4.1.0, passing NULL or a pointer thereto to clSetKernelArg() for a kernel buffer object argument (e.g. '&lt;SPAN style="font-family: courier new,courier;"&gt;__global uchar *buf&lt;/SPAN&gt;') results in a segmentation fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a bug since, according to &lt;A class="jive-link-external-small" data-content-finding="Community" href="https://www.khronos.org/registry/cl/specs/opencl-1.1.pdf"&gt;https://www.khronos.org/registry/cl/specs/opencl-1.1.pdf&lt;/A&gt; § "5.7.2 Setting Kernel Arguments":&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;If the argument is a buffer object, the arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as a pointer to __global or __constant memory in the kernel.&lt;/P&gt;

&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the only way of passing a NULL pointer to a kernel, so there is no workaround, apart from adding a kernel argument telling not to use the passed pointer, which anyway compels to create a dummy buffer object when not needed, but this one can be small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tested this issue with the Yocto release, but I have found nothing in the release notes indicating that such a bug has been fixed. Does anyone know?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 01:16:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Impossible-to-pass-NULL-buffer-objects-to-clSetKernelArg/m-p/317820#M42134</guid>
      <dc:creator>bthebaudeau</dc:creator>
      <dc:date>2014-06-12T01:16:10Z</dc:date>
    </item>
  </channel>
</rss>

