[Mesa-dev] SpvOpSelect w/ float operands

2020-11-17 Thread Brian Paul
Using the Intel Vulkan driver, we've found some cases where SpvOpSelect is returning -0.0 (negative zeros) instead of normal 0.0 depending on the arguments. I'm wondering if "SpvOpSelect x, a, b" for floats is being implemented with something like "a*x + b*(1-x)" ? That might explain where

Re: [Mesa-dev] SpvOpSelect w/ float operands

2020-11-17 Thread Ian Romanick
On 11/17/20 9:25 AM, Brian Paul wrote: > > Using the Intel Vulkan driver, we've found some cases where SpvOpSelect > is returning -0.0 (negative zeros) instead of normal 0.0 depending on > the arguments. Do you have a specific test case that fails? It seems like on some platforms there was an er

Re: [Mesa-dev] SpvOpSelect w/ float operands

2020-11-17 Thread Brian Paul
On 11/17/2020 11:49 AM, Ian Romanick wrote: On 11/17/20 9:25 AM, Brian Paul wrote: Using the Intel Vulkan driver, we've found some cases where SpvOpSelect is returning -0.0 (negative zeros) instead of normal 0.0 depending on the arguments. Do you have a specific test case that fails? Yeah,

Re: [Mesa-dev] SpvOpSelect w/ float operands

2020-11-18 Thread Connor Abbott
On Tue, Nov 17, 2020 at 9:56 PM Brian Paul wrote: > > On 11/17/2020 11:49 AM, Ian Romanick wrote: > > On 11/17/20 9:25 AM, Brian Paul wrote: > >> > >> Using the Intel Vulkan driver, we've found some cases where SpvOpSelect > >> is returning -0.0 (negative zeros) instead of normal 0.0 depending on

Re: [Mesa-dev] SpvOpSelect w/ float operands

2020-11-18 Thread Brian Paul
On 11/18/2020 02:49 AM, Connor Abbott wrote: On Tue, Nov 17, 2020 at 9:56 PM Brian Paul wrote: On 11/17/2020 11:49 AM, Ian Romanick wrote: On 11/17/20 9:25 AM, Brian Paul wrote: Using the Intel Vulkan driver, we've found some cases where SpvOpSelect is returning -0.0 (negative zeros) instea