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

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

2013-02-01 Thread Brian Paul
On 02/01/2013 11:44 AM, Christoph Bumiller wrote: 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 imple

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 > th

[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 rs