Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-23 Thread Jason Ekstrand
On Sun, Apr 22, 2018 at 11:31 AM, Iago Toral wrote: > On Fri, 2018-04-20 at 17:16 -0700, Jason Ekstrand wrote: > > On Fri, Apr 20, 2018 at 5:16 AM, Nicolai Hähnle > wrote: > > On 20.04.2018 10:21, Iago Toral wrote: > > Hi, > > while developing support for Vulkan shaderInt16 on Anvil I came acros

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-22 Thread Iago Toral
On Fri, 2018-04-20 at 17:16 -0700, Jason Ekstrand wrote: > On Fri, Apr 20, 2018 at 5:16 AM, Nicolai Hähnle > wrote: > > On 20.04.2018 10:21, Iago Toral wrote: > > > > > Hi, > > > > > > > > > > > > while developing support for Vulkan shaderInt16 on Anvil I came > > > across > > > > > > a featu

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-21 Thread Nicolai Hähnle
On 21.04.2018 02:32, Bas Nieuwenhuizen wrote: On Fri, Apr 20, 2018 at 5:16 PM, Jason Ekstrand wrote: On Fri, Apr 20, 2018 at 5:16 AM, Nicolai Hähnle wrote: On 20.04.2018 10:21, Iago Toral wrote: Hi, while developing support for Vulkan shaderInt16 on Anvil I came across a feature of NIR th

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Giuseppe Bilotta
On Sat, Apr 21, 2018 at 2:16 AM, Jason Ekstrand wrote: > > I was thinking about this a bit this morning and it gets even more sticky. > What happens if you have > > bool e = (a < b) && (c < d); > > where a and b are 16-bit and c and d are 32-bit? In this case, one > comprison has a 32-bit value a

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Bas Nieuwenhuizen
On Fri, Apr 20, 2018 at 5:16 PM, Jason Ekstrand wrote: > On Fri, Apr 20, 2018 at 5:16 AM, Nicolai Hähnle wrote: >> >> On 20.04.2018 10:21, Iago Toral wrote: >>> >>> Hi, >>> >>> while developing support for Vulkan shaderInt16 on Anvil I came across >>> a feature of NIR that was a bit inconvenient:

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Jason Ekstrand
On Fri, Apr 20, 2018 at 5:16 AM, Nicolai Hähnle wrote: > On 20.04.2018 10:21, Iago Toral wrote: > >> Hi, >> >> while developing support for Vulkan shaderInt16 on Anvil I came across >> a feature of NIR that was a bit inconvenient: bools are always 32-bit >> by design, but the Intel hardware produ

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Pohjolainen, Topi
On Fri, Apr 20, 2018 at 02:16:17PM +0200, Nicolai Hähnle wrote: > On 20.04.2018 10:21, Iago Toral wrote: > >Hi, > > > >while developing support for Vulkan shaderInt16 on Anvil I came across > >a feature of NIR that was a bit inconvenient: bools are always 32-bit > >by design, but the Intel hardware

Re: [Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Nicolai Hähnle
On 20.04.2018 10:21, Iago Toral wrote: Hi, while developing support for Vulkan shaderInt16 on Anvil I came across a feature of NIR that was a bit inconvenient: bools are always 32-bit by design, but the Intel hardware produces 16-bit bool results for 16- bit comparisons, so that creates a proble

[Mesa-dev] 16-bit comparisons in NIR

2018-04-20 Thread Iago Toral
Hi, while developing support for Vulkan shaderInt16 on Anvil I came across a feature of NIR that was a bit inconvenient: bools are always 32-bit by design, but the Intel hardware produces 16-bit bool results for 16- bit comparisons, so that creates a problem that manifests like this: vec1 32 ssa_