<div dir="ltr">Problem is fixed. Thanks for your help.<div><br></div><div>Matt</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 5:19 AM, Zhigang Gong <span dir="ltr"><<a href="mailto:zhigang.gong@linux.intel.com" target="_blank">zhigang.gong@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just pushed a patch to fix this bug. Could you try your original case without<br>
modification? Thanks.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Oct 08, 2013 at 05:02:09PM +0800, Zhigang Gong wrote:<br>
> On Sun, Oct 06, 2013 at 01:30:15AM -0400, Matt Harvey wrote:<br>
> > Hi<br>
> ><br>
> > I'm having trouble and was wondering if you guys had any insight. This<br>
> > simple kernel:<br>
> > __constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE |<br>
> > CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;<br>
><br>
> Try to change the above statement to:<br>
> const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;<br>
><br>
> ><br>
> > __kernel void edge_detect(__read_only image2d_t image_in,<br>
> >                         __write_only image2d_t image_out)<br>
> > {<br>
> >     const int2 pos = { get_global_id(0), get_global_id(1) };<br>
> >     //make this a pass through<br>
> >     float4 data = read_imagef(image_in, sampler, pos);<br>
> >     write_imagef(image_out, pos, data);<br>
> > }<br>
> ><br>
> > Fails after compilation with this error message:<br>
> > ASSERTION FAILED: arg != NULL<br>
> >   at file /media/matto/Programming/src/beignet/backend/src/ir/sampler.cpp,<br>
> > function void gbe::ir::SamplerSet::append(gbe::ir::Register,<br>
> > gbe::ir::Context*), line 60<br>
> > Stack dump:<br>
> > 0. Running pass 'Function Pass Manager' on module '/tmp/fileB926yJ.ll'.<br>
> > 1. Running pass 'Gen Back-End' on function '@edge_detect'<br>
><br>
> It seems that for the __constant/constant qualifier, the compiler<br>
> will not do constant propagation. The only worked qualifier for sampler_t<br>
> is const, if you want to define it in the kernel. We will fix this problem<br>
> in the futuer, before that, you can use const as a workaround.<br>
><br>
> Thanks for reporting this bug.<br>
><br>
> ><br>
> > This looks like a bug to me.<br>
> ><br>
> > Any ideas?<br>
> ><br>
> > Thanks<br>
><br>
> > _______________________________________________<br>
> > Beignet mailing list<br>
> > <a href="mailto:Beignet@lists.freedesktop.org">Beignet@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/beignet" target="_blank">http://lists.freedesktop.org/mailman/listinfo/beignet</a><br>
><br>
> _______________________________________________<br>
> Beignet mailing list<br>
> <a href="mailto:Beignet@lists.freedesktop.org">Beignet@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/beignet" target="_blank">http://lists.freedesktop.org/mailman/listinfo/beignet</a><br>
</div></div></blockquote></div><br></div>