Re: [Mesa-dev] [PATCH 12/59] intel/compiler: handle b2i/b2f with other integer conversion opcodes
This'll have to be rebased on dca6cd9ce6510 but otherwise looks fine. I've been a bit annoyed by this myself. Reviewed-by: Jason Ekstrand Incidentally, this could also be lowered in NIR Not sure if we want to but there it is. On Tue, Dec 4, 2018 at 1:18 AM Iago Toral Quiroga wrote: > Since we handle booleans as integers this makes more sense. > --- > src/intel/compiler/brw_fs_nir.cpp | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/intel/compiler/brw_fs_nir.cpp > b/src/intel/compiler/brw_fs_nir.cpp > index 9f3d3bf9762..6c765fc2661 100644 > --- a/src/intel/compiler/brw_fs_nir.cpp > +++ b/src/intel/compiler/brw_fs_nir.cpp > @@ -801,11 +801,6 @@ fs_visitor::nir_emit_alu(const fs_builder , > nir_alu_instr *instr) >inst->saturate = instr->dest.saturate; >break; > > - case nir_op_b2i: > - case nir_op_b2f: > - op[0].type = BRW_REGISTER_TYPE_D; > - op[0].negate = !op[0].negate; > - /* fallthrough */ > case nir_op_f2f64: > case nir_op_f2i64: > case nir_op_f2u64: > @@ -850,6 +845,11 @@ fs_visitor::nir_emit_alu(const fs_builder , > nir_alu_instr *instr) >inst->saturate = instr->dest.saturate; >break; > > + case nir_op_b2i: > + case nir_op_b2f: > + op[0].type = BRW_REGISTER_TYPE_D; > + op[0].negate = !op[0].negate; > + /* fallthrough */ > case nir_op_i2f64: > case nir_op_i2i64: > case nir_op_u2f64: > -- > 2.17.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 12/59] intel/compiler: handle b2i/b2f with other integer conversion opcodes
On Wed, Dec 05, 2018 at 11:23:06AM +0100, Iago Toral wrote: > On Tue, 2018-12-04 at 18:16 +0200, Pohjolainen, Topi wrote: > > On Tue, Dec 04, 2018 at 08:16:36AM +0100, Iago Toral Quiroga wrote: > > > Since we handle booleans as integers this makes more sense. > > > > If this is applied before patch 10, can we merge 10 and 13? > > We can't apply this before patch 10 because patch 10 is the one that > splits the f264 and {i,u}264 opcodes. However, we could merge this and > patch 13 into patch 10 if that looks better to you. What you have is just fine. I just didn't see all the corners involved. Patches 11-13: Reviewed-by: Topi Pohjolainen > > Iago > > > > --- > > > src/intel/compiler/brw_fs_nir.cpp | 10 +- > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/src/intel/compiler/brw_fs_nir.cpp > > > b/src/intel/compiler/brw_fs_nir.cpp > > > index 9f3d3bf9762..6c765fc2661 100644 > > > --- a/src/intel/compiler/brw_fs_nir.cpp > > > +++ b/src/intel/compiler/brw_fs_nir.cpp > > > @@ -801,11 +801,6 @@ fs_visitor::nir_emit_alu(const fs_builder > > > , nir_alu_instr *instr) > > >inst->saturate = instr->dest.saturate; > > >break; > > > > > > - case nir_op_b2i: > > > - case nir_op_b2f: > > > - op[0].type = BRW_REGISTER_TYPE_D; > > > - op[0].negate = !op[0].negate; > > > - /* fallthrough */ > > > case nir_op_f2f64: > > > case nir_op_f2i64: > > > case nir_op_f2u64: > > > @@ -850,6 +845,11 @@ fs_visitor::nir_emit_alu(const fs_builder > > > , nir_alu_instr *instr) > > >inst->saturate = instr->dest.saturate; > > >break; > > > > > > + case nir_op_b2i: > > > + case nir_op_b2f: > > > + op[0].type = BRW_REGISTER_TYPE_D; > > > + op[0].negate = !op[0].negate; > > > + /* fallthrough */ > > > case nir_op_i2f64: > > > case nir_op_i2i64: > > > case nir_op_u2f64: > > > -- > > > 2.17.1 > > > > > > ___ > > > mesa-dev mailing list > > > mesa-dev@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 12/59] intel/compiler: handle b2i/b2f with other integer conversion opcodes
On Tue, 2018-12-04 at 18:16 +0200, Pohjolainen, Topi wrote: > On Tue, Dec 04, 2018 at 08:16:36AM +0100, Iago Toral Quiroga wrote: > > Since we handle booleans as integers this makes more sense. > > If this is applied before patch 10, can we merge 10 and 13? We can't apply this before patch 10 because patch 10 is the one that splits the f264 and {i,u}264 opcodes. However, we could merge this and patch 13 into patch 10 if that looks better to you. Iago > > --- > > src/intel/compiler/brw_fs_nir.cpp | 10 +- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/src/intel/compiler/brw_fs_nir.cpp > > b/src/intel/compiler/brw_fs_nir.cpp > > index 9f3d3bf9762..6c765fc2661 100644 > > --- a/src/intel/compiler/brw_fs_nir.cpp > > +++ b/src/intel/compiler/brw_fs_nir.cpp > > @@ -801,11 +801,6 @@ fs_visitor::nir_emit_alu(const fs_builder > > , nir_alu_instr *instr) > >inst->saturate = instr->dest.saturate; > >break; > > > > - case nir_op_b2i: > > - case nir_op_b2f: > > - op[0].type = BRW_REGISTER_TYPE_D; > > - op[0].negate = !op[0].negate; > > - /* fallthrough */ > > case nir_op_f2f64: > > case nir_op_f2i64: > > case nir_op_f2u64: > > @@ -850,6 +845,11 @@ fs_visitor::nir_emit_alu(const fs_builder > > , nir_alu_instr *instr) > >inst->saturate = instr->dest.saturate; > >break; > > > > + case nir_op_b2i: > > + case nir_op_b2f: > > + op[0].type = BRW_REGISTER_TYPE_D; > > + op[0].negate = !op[0].negate; > > + /* fallthrough */ > > case nir_op_i2f64: > > case nir_op_i2i64: > > case nir_op_u2f64: > > -- > > 2.17.1 > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 12/59] intel/compiler: handle b2i/b2f with other integer conversion opcodes
On Tue, Dec 04, 2018 at 08:16:36AM +0100, Iago Toral Quiroga wrote: > Since we handle booleans as integers this makes more sense. If this is applied before patch 10, can we merge 10 and 13? > --- > src/intel/compiler/brw_fs_nir.cpp | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/intel/compiler/brw_fs_nir.cpp > b/src/intel/compiler/brw_fs_nir.cpp > index 9f3d3bf9762..6c765fc2661 100644 > --- a/src/intel/compiler/brw_fs_nir.cpp > +++ b/src/intel/compiler/brw_fs_nir.cpp > @@ -801,11 +801,6 @@ fs_visitor::nir_emit_alu(const fs_builder , > nir_alu_instr *instr) >inst->saturate = instr->dest.saturate; >break; > > - case nir_op_b2i: > - case nir_op_b2f: > - op[0].type = BRW_REGISTER_TYPE_D; > - op[0].negate = !op[0].negate; > - /* fallthrough */ > case nir_op_f2f64: > case nir_op_f2i64: > case nir_op_f2u64: > @@ -850,6 +845,11 @@ fs_visitor::nir_emit_alu(const fs_builder , > nir_alu_instr *instr) >inst->saturate = instr->dest.saturate; >break; > > + case nir_op_b2i: > + case nir_op_b2f: > + op[0].type = BRW_REGISTER_TYPE_D; > + op[0].negate = !op[0].negate; > + /* fallthrough */ > case nir_op_i2f64: > case nir_op_i2i64: > case nir_op_u2f64: > -- > 2.17.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 12/59] intel/compiler: handle b2i/b2f with other integer conversion opcodes
Since we handle booleans as integers this makes more sense. --- src/intel/compiler/brw_fs_nir.cpp | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 9f3d3bf9762..6c765fc2661 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -801,11 +801,6 @@ fs_visitor::nir_emit_alu(const fs_builder , nir_alu_instr *instr) inst->saturate = instr->dest.saturate; break; - case nir_op_b2i: - case nir_op_b2f: - op[0].type = BRW_REGISTER_TYPE_D; - op[0].negate = !op[0].negate; - /* fallthrough */ case nir_op_f2f64: case nir_op_f2i64: case nir_op_f2u64: @@ -850,6 +845,11 @@ fs_visitor::nir_emit_alu(const fs_builder , nir_alu_instr *instr) inst->saturate = instr->dest.saturate; break; + case nir_op_b2i: + case nir_op_b2f: + op[0].type = BRW_REGISTER_TYPE_D; + op[0].negate = !op[0].negate; + /* fallthrough */ case nir_op_i2f64: case nir_op_i2i64: case nir_op_u2f64: -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev