mesa/src/gallium/include/pipe
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
..
p_compiler.h gallium: Add support for Solaris Studio C++ compiler. 2012-06-18 10:01:26 -07:00
p_config.h util: Add cpuid for Solaris Studio. 2012-09-03 12:28:07 -07:00
p_context.h gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag 2013-01-04 13:18:33 +01:00
p_defines.h gallium: add SQRT shader opcode 2013-02-04 09:33:44 -07:00
p_format.h gallium: add R8G8_R8B8 and G8R8_B8R8 formats 2012-03-09 12:40:54 +01:00
p_screen.h gallium: mention PIPE_TIMEOUT_INFINITE in the fence_finish() comment 2012-09-20 09:49:12 -06:00
p_shader_tokens.h gallium: add SQRT shader opcode 2013-02-04 09:33:44 -07:00
p_state.h gallium: remove pipe_surface::usage 2012-12-12 13:09:54 +01:00
p_video_decoder.h vl: move away from state like parameters 2012-01-15 12:40:44 +01:00
p_video_enums.h vl: add interlacing capabilities 2012-02-06 10:35:58 +01:00
p_video_state.h vl/compositor: replace pipe_video_rect with u_rect 2012-03-02 13:14:21 +01:00