<div class="gmail_quote">On Thu, Jun 16, 2011 at 12:46 AM, Dave Airlie <span dir="ltr">&lt;<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">On Thu, Jun 16, 2011 at 3:22 PM, Dave Airlie &lt;<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>&gt; wrote:<br>&gt; On Thu, Jun 16, 2011 at 7:38 AM, Bryan Cain &lt;<a href="mailto:bryancain3@gmail.com">bryancain3@gmail.com</a>&gt; wrote:<br>
&gt;&gt; My work on the GLSL IR to TGSI translator I announced on the list this<br>&gt;&gt; April is now at the point where I think it is ready to be merged into<br>&gt;&gt; Mesa.  It is stable and doesn&#39;t regress any piglit tests on softpipe or<br>
&gt;&gt; nv50.<br>&gt;<br>&gt; I just pulled it into master here, and got this on build on an F15 box<br>&gt; with gcc 4.6.0.<br>&gt;<br>&gt; g++ -c -o state_tracker/st_glsl_to_tgsi.o<br>&gt; state_tracker/st_glsl_to_tgsi.cpp -DFEATURE_GL=1 -D_GNU_SOURCE<br>
&gt; -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1<br>&gt; -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING<br>&gt; -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -DGALLIUM_LLVMPIPE<br>&gt; -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -I../../include<br>
&gt; -I../../src/glsl -I../../src/mesa -I../../src/mapi<br>&gt; -I../../src/gallium/include -I../../src/gallium/auxiliary<br>&gt; -I/usr/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS<br>&gt; -D__STDC_CONSTANT_MACROS -g -O2 -Wall -fno-strict-aliasing -fPIC<br>
&gt; -fvisibility=hidden<br>&gt; state_tracker/st_glsl_to_tgsi.cpp:392:70: error: call of overloaded<br>&gt; ‘st_src_reg(gl_register_file, int, NULL)’ is ambiguous<br>&gt; state_tracker/st_glsl_to_tgsi.cpp:392:70: note: candidates are:<br>
&gt; state_tracker/st_glsl_to_tgsi.cpp:103:4: note:<br>&gt; st_src_reg::st_src_reg(gl_register_file, int, int)<br>&gt; state_tracker/st_glsl_to_tgsi.cpp:90:4: note:<br>&gt; st_src_reg::st_src_reg(gl_register_file, int, const glsl_type*)<br>
&gt; gmake[2]: *** [state_tracker/st_glsl_to_tgsi.o] Error 1<br><br></div></div>I fixed this by casting NULL to (const glsl_type *)NULL, but not sure<br>what the proper answer is,<br><br>With that I get 0 piglit regressions due to this on r600g on evergreen.<br>
<font color="#888888"><br>Dave.<br></font></blockquote></div><br>Hm, I never got that error with my version of g++ (I think 4.5).  It looks like it just doesn&#39;t know whether NULL is a pointer or an integer (stupid C++), so casting it to (const glsl_type *)NULL is the correct fix.  I&#39;ll commit a fix for that when I get back to my computer at home.