On 4/1/20 11:52 AM, Eric Anholt wrote:
> I would generally be of the opinion that we should have NIR opcodes
> that match any common hardware instructions, and lowering in algebraic
> to help turn input patterns into clean sequences of hardware
> instructions.
There is quite a bit of benefit to ha
On 4/1/20 11:39 AM, Erik Faye-Lund wrote:
> While working on the NIR to DXIL conversion code for D3D12, I've
> noticed that we're not exactly doing the best we could here.
>
> First some background:
>
> NIR currently has a few instructions that does kinda the same:
>
> 1. nir_op_ufind_msb: Finds
On Thu, Apr 2, 2020 at 7:23 AM Daniel Schürmann wrote:
>
> W.r.t AMD hardware, it seems to map quite exactly the DX behavior,
> so given that I would, of course favor a NIR instruction which maps that :)
I'm a bit surprised. I thought AMD HW usually had 25 opcodes whenever
3 were needed just so
W.r.t AMD hardware, it seems to map quite exactly the DX behavior,
so given that I would, of course favor a NIR instruction which maps that :)
Small overview (scalar and vector):
S_FLBIT_I32_{B32,B64} - D = the number of zeros before the first one
starting from the MSB.Returns -1 if none.
S_FLBI
On Wed, Apr 1, 2020 at 1:52 PM Eric Anholt wrote:
>
> On Wed, Apr 1, 2020 at 11:39 AM Erik Faye-Lund
> wrote:
> >
> > While working on the NIR to DXIL conversion code for D3D12, I've
> > noticed that we're not exactly doing the best we could here.
> >
> > First some background:
> >
> > NIR curren
On Wed, Apr 1, 2020 at 11:39 AM Erik Faye-Lund
wrote:
>
> While working on the NIR to DXIL conversion code for D3D12, I've
> noticed that we're not exactly doing the best we could here.
>
> First some background:
>
> NIR currently has a few instructions that does kinda the same:
>
> 1. nir_op_ufin
On Wed, Apr 1, 2020 at 2:39 PM Erik Faye-Lund
wrote:
>
> While working on the NIR to DXIL conversion code for D3D12, I've
> noticed that we're not exactly doing the best we could here.
>
> First some background:
>
> NIR currently has a few instructions that does kinda the same:
>
> 1. nir_op_ufind
While working on the NIR to DXIL conversion code for D3D12, I've
noticed that we're not exactly doing the best we could here.
First some background:
NIR currently has a few instructions that does kinda the same:
1. nir_op_ufind_msb: Finds the index of the most significant bit,
counting from the