[Mesa-dev] Any plans to add type precision to GLSL IR (glsl_type etc.)?

2010-10-13 Thread Aras Pranckevicius
Hi,

For GLSL optimizer (http://github.com/aras-p/glsl-optimizer) that is
built on top of Mesa's GLSL2, I need to add native OpenGL ES 2.0
precision support. Looks like right now Mesa's GLSL can parse
precision qualifiers just fine (when OpenGL ES 2.0 option is used),
but it does not do anything with them beyond the AST.

Are there any plans to add precision qualifiers to glsl_type and
relevant parts of GLSL IR? (some desktop GPUs internally can operate
on different precisions, and supporting that could be a performance
improvement in the future)

If there are no plans to support precision qualifiers beyond AST
anytime soon -- are there some caveats I need to know before I try to
implement it myself? Or some suggestions on how to approach the
problem?



Regards,

--
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Any plans to add type precision to GLSL IR (glsl_type etc.)?

2010-10-13 Thread Aras Pranckevicius
 That said, I don't think it would be difficult to add precision tracking
 to the IR.  My first thought is that a field should be added to
 ir_variable to track the declared precision of the variable.  A similar
 field should then be added to ir_rvalue to track the precision of the
 expression.

Yeah, at first I thought about adding that to glsl_type, but that way
lies madness.

So I started adding it to ir_variable, ir_rvalue et al., and so far it
seems to be promising (and not hard either). Thanks for confirming
that I'm not on some crazy path!

-- 
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev