<div class="gmail_quote">On Thu, Jun 16, 2011 at 12:46 AM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>></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 <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br>> On Thu, Jun 16, 2011 at 7:38 AM, Bryan Cain <<a href="mailto:bryancain3@gmail.com">bryancain3@gmail.com</a>> wrote:<br>
>> My work on the GLSL IR to TGSI translator I announced on the list this<br>>> April is now at the point where I think it is ready to be merged into<br>>> Mesa. It is stable and doesn't regress any piglit tests on softpipe or<br>
>> nv50.<br>><br>> I just pulled it into master here, and got this on build on an F15 box<br>> with gcc 4.6.0.<br>><br>> g++ -c -o state_tracker/st_glsl_to_tgsi.o<br>> state_tracker/st_glsl_to_tgsi.cpp -DFEATURE_GL=1 -D_GNU_SOURCE<br>
> -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1<br>> -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING<br>> -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -DGALLIUM_LLVMPIPE<br>> -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -I../../include<br>
> -I../../src/glsl -I../../src/mesa -I../../src/mapi<br>> -I../../src/gallium/include -I../../src/gallium/auxiliary<br>> -I/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS<br>> -D__STDC_CONSTANT_MACROS -g -O2 -Wall -fno-strict-aliasing -fPIC<br>
> -fvisibility=hidden<br>> state_tracker/st_glsl_to_tgsi.cpp:392:70: error: call of overloaded<br>> ‘st_src_reg(gl_register_file, int, NULL)’ is ambiguous<br>> state_tracker/st_glsl_to_tgsi.cpp:392:70: note: candidates are:<br>
> state_tracker/st_glsl_to_tgsi.cpp:103:4: note:<br>> st_src_reg::st_src_reg(gl_register_file, int, int)<br>> state_tracker/st_glsl_to_tgsi.cpp:90:4: note:<br>> st_src_reg::st_src_reg(gl_register_file, int, const glsl_type*)<br>
> 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'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'll commit a fix for that when I get back to my computer at home.