mesa/src/gallium/docs/source
Brian Paul d276a40e15 gallium: add SQRT shader opcode
The glsl-to-tgsi translater will emit SQRT to implement GLSL's sqrt()
and distance() functions if the PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED
query says it's supported by the driver.

Otherwise, sqrt(x) is implemented with x*rsq(x).  The problem with
this is sqrt(0) must be handled specially because rsq(0) might be
Inf/NaN/undefined (and then 0*rsq(0) is Inf/Nan/undefined).  In the
glsl-to-tgsi code we use an extra CMP to check if x is zero and then
replace the result of x*rsq(x) with zero.

In the end, this makes sqrt() generate much more reasonable code for
drivers that can do square roots.

Note that many of piglit's generated shader tests use the GLSL
distance() function.
2013-02-04 09:33:44 -07:00
..
cso gallium/docs: beef up the docs related to color clamping 2012-05-25 10:02:22 -06:00
exts gallium/docs: Add formatting for envvar role; change debugging. 2010-08-15 03:43:54 -07:00
conf.py gallium/docs: update some distro information 2012-10-15 16:11:49 +02:00
context.rst gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE 2013-01-15 16:47:18 +01:00
cso.rst Fill out some of the CSO info. 2009-12-20 16:40:39 -08:00
debugging.rst gallium/docs: Add Galahad 2010-08-20 02:29:42 +01:00
distro.rst gallium/docs: update some distro information 2012-10-15 16:11:49 +02:00
glossary.rst gallium: support for array textures and related changes 2010-12-02 04:33:43 +01:00
index.rst gallium: add PIPE_TEXTURE_RECT target 2010-08-20 12:03:59 +02:00
intro.rst Add Gallium docs. 2009-12-20 15:00:40 -08:00
pipeline.txt gallium/docs: added new pipeline.txt diagram 2010-09-17 18:50:47 -06:00
resources.rst gallium/docs: improve documentation for resources 2010-08-20 15:24:36 +02:00
screen.rst gallium: add PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT 2013-01-30 13:10:11 +01:00
tgsi.rst gallium: add SQRT shader opcode 2013-02-04 09:33:44 -07:00