[Mesa-dev] Status of the GLSL->TGSI translator

Bryan Cain bryancain3 at gmail.com
Thu Jun 16 06:56:28 PDT 2011


On Thu, Jun 16, 2011 at 12:46 AM, Dave Airlie <airlied at gmail.com> wrote:

>  On Thu, Jun 16, 2011 at 3:22 PM, Dave Airlie <airlied at gmail.com> wrote:
> > On Thu, Jun 16, 2011 at 7:38 AM, Bryan Cain <bryancain3 at gmail.com>
> wrote:
> >> My work on the GLSL IR to TGSI translator I announced on the list this
> >> April is now at the point where I think it is ready to be merged into
> >> Mesa.  It is stable and doesn't regress any piglit tests on softpipe or
> >> nv50.
> >
> > I just pulled it into master here, and got this on build on an F15 box
> > with gcc 4.6.0.
> >
> > g++ -c -o state_tracker/st_glsl_to_tgsi.o
> > state_tracker/st_glsl_to_tgsi.cpp -DFEATURE_GL=1 -D_GNU_SOURCE
> > -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1
> > -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING
> > -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -DGALLIUM_LLVMPIPE
> > -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -I../../include
> > -I../../src/glsl -I../../src/mesa -I../../src/mapi
> > -I../../src/gallium/include -I../../src/gallium/auxiliary
> > -I/usr/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
> > -D__STDC_CONSTANT_MACROS -g -O2 -Wall -fno-strict-aliasing -fPIC
> > -fvisibility=hidden
> > state_tracker/st_glsl_to_tgsi.cpp:392:70: error: call of overloaded
> > ‘st_src_reg(gl_register_file, int, NULL)’ is ambiguous
> > state_tracker/st_glsl_to_tgsi.cpp:392:70: note: candidates are:
> > state_tracker/st_glsl_to_tgsi.cpp:103:4: note:
> > st_src_reg::st_src_reg(gl_register_file, int, int)
> > state_tracker/st_glsl_to_tgsi.cpp:90:4: note:
> > st_src_reg::st_src_reg(gl_register_file, int, const glsl_type*)
> > gmake[2]: *** [state_tracker/st_glsl_to_tgsi.o] Error 1
>
> I fixed this by casting NULL to (const glsl_type *)NULL, but not sure
> what the proper answer is,
>
> With that I get 0 piglit regressions due to this on r600g on evergreen.
>
> Dave.
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110616/f2547fa0/attachment.htm>


More information about the mesa-dev mailing list