diff options
author | Mark Janes <[email protected]> | 2018-05-03 14:28:00 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2018-05-03 15:26:59 -0700 |
commit | 7b9c15628aae8729118b648f5f473e6ac926b99b (patch) | |
tree | ef26aaa3b3c7c2206d0a0d1c31ef6c5cc86f6ad3 /src/intel/compiler/brw_fs_nir.cpp | |
parent | 589622a2fe1bbfb2564fae497e99a3bcb4a3e069 (diff) |
Revert "i965/compiler: handle conversion to smaller type in the lowering pass for that"
This reverts commit 96b51537908cd2aace85f54b437eeb72e6346b7e.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106393
Reviewed-by: Scott D Phillips <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs_nir.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 4c8bcc4ebc9..f9fde145a16 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -755,9 +755,19 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr) */ case nir_op_f2f16_undef: - inst = bld.MOV(result, op[0]); + case nir_op_i2i16: + case nir_op_u2u16: { + /* TODO: Fixing aligment rules for conversions from 32-bits to + * 16-bit types should be moved to lower_conversions + */ + fs_reg tmp = bld.vgrf(op[0].type, 1); + tmp = subscript(tmp, result.type, 0); + inst = bld.MOV(tmp, op[0]); + inst->saturate = instr->dest.saturate; + inst = bld.MOV(result, tmp); inst->saturate = instr->dest.saturate; break; + } case nir_op_f2f64: case nir_op_f2i64: @@ -797,8 +807,6 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr) case nir_op_f2u16: case nir_op_i2i32: case nir_op_u2u32: - case nir_op_i2i16: - case nir_op_u2u16: case nir_op_i2f16: case nir_op_u2f16: inst = bld.MOV(result, op[0]); |