On 03.03.2010 20:23, Luca Barbieri wrote: >> And never will... It does not export PIPE_CAP_GLSL, and does not have >> the shader opcodes to ever do so. > > Any Gallium driver should be able to support the GLSL subset without > control flow. > > And if we had a proper optimization infrastructure capable of inlining > functions, converting conditionals to multiplications and unrolling > loops (e.g. look at what the nVidia Cg compiler does), then > essentially all GLSL could be supported on any driver, with only > limitations on the maximum number of loop iterations. > > Isn't it worth supporting that? > > BTW, proprietary drivers do this: for instance nVidia supports GLSL on > nv30, which can't do control flow in fragment shaders and doesn't > support SM3.
I think the i915 is a lot closer to r300 in that regard (which is quite a bit more limited than nv30), and it's true that ATI also supported glsl on that. As far as I know though it was quite easy to bump into shaders which wouldn't compile. There's only so much you can do if you have 4 blocks of (max) 16 instructions to run without any control flow if you need to unroll loops, not to mention lacking instructions for derivatives, or the fact things like sin/cos will take quite a few instructions... nv30, while processing fragment shaders slowly, had a LOT higher instruction count, IIRC supported derivatives and predication and had no dependent texturing limit. So that makes it a lot better suited for glsl hacks. So, I'm not sure it really makes a whole lot of sense to support glsl on i915. It'll really only ever work for very simple things (granted there are apps out there which indeed will only use glsl shaders which are known to compile fine on r300...) Roland ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev