[Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-11 Thread Iago Toral Quiroga
The hardware doesn't support 16-bit integer types, so we need to implement these using 32-bit integer instructions and then convert the result back to 16-bit. --- src/intel/Makefile.sources| 1 + src/intel/compiler/brw_nir.c | 2 + src/intel/compile

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Jason Ekstrand
It may be useful to just use nir_algebraic for this. We already do for trig workarounds. It's more painful from a build-system perspective but, in general, the fewer hand-rolled algebraic lowering passes we have, the better. On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga wrote: > The har

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Rob Clark
side-note, not sure if it really effects what you are doing here, but karol ran into some cases, like 8bit signed imax, which needs to be "lowered" to 16b (or 32b) and converted back for hw that doesn't support smaller than 16b (or 32b). I think I have the same case with ir3, which also has 16b bu

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Jason Ekstrand
On Tue, Apr 24, 2018 at 7:38 AM, Rob Clark wrote: > side-note, not sure if it really effects what you are doing here, but > karol ran into some cases, like 8bit signed imax, which needs to be > "lowered" to 16b (or 32b) and converted back for hw that doesn't > support smaller than 16b (or 32b).

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Rob Clark
On Tue, Apr 24, 2018 at 5:45 PM, Jason Ekstrand wrote: > On Tue, Apr 24, 2018 at 7:38 AM, Rob Clark wrote: >> >> side-note, not sure if it really effects what you are doing here, but >> karol ran into some cases, like 8bit signed imax, which needs to be >> "lowered" to 16b (or 32b) and converted

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Jason Ekstrand
On April 24, 2018 18:38:33 Rob Clark wrote: On Tue, Apr 24, 2018 at 5:45 PM, Jason Ekstrand wrote: On Tue, Apr 24, 2018 at 7:38 AM, Rob Clark wrote: side-note, not sure if it really effects what you are doing here, but karol ran into some cases, like 8bit signed imax, which needs to be "lower

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Iago Toral
On Tue, 2018-04-24 at 23:11 -0400, Jason Ekstrand wrote: > On April 24, 2018 18:38:33 Rob Clark wrote: > > On Tue, Apr 24, 2018 at 5:45 PM, Jason Ekstrand > wrote: > On Tue, Apr 24, 2018 at 7:38 AM, Rob Clark > wrote: > > side-note, not sure if it really effects what you are doing here, but >

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-25 Thread Jason Ekstrand
Some of these comments may be duplicates of ones I made the first time through. On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga wrote: > The hardware doesn't support 16-bit integer types, so we need to implement > these using 32-bit integer instructions and then convert the result back > to

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-25 Thread Iago Toral
On Wed, 2018-04-25 at 07:05 -0700, Jason Ekstrand wrote: > Some of these comments may be duplicates of ones I made the first > time through. > > On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga om> wrote: > > The hardware doesn't support 16-bit integer types, so we need to > > implement > >