[Mesa-dev] [PATCH 1/5] gallium: add SQRT shader opcode

2013-02-01 Thread Brian Paul
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

Re: [Mesa-dev] [PATCH 1/5] gallium: add SQRT shader opcode

2013-02-01 Thread Christoph Bumiller
On 01.02.2013 19:29, Brian Paul wrote: 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

Re: [Mesa-dev] [PATCH 1/5] gallium: add SQRT shader opcode

2013-02-01 Thread Roland Scheidegger
Am 01.02.2013 19:44, schrieb Christoph Bumiller: On 01.02.2013 19:29, Brian Paul wrote: 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