intel/fs: Delete a TODO about using brw_F32TO16.
We can just use the new builder helpers to get the optimization advantages of a MOV on Gfx8+ while also getting the necessary F32TO16 on Gfx7.x and yet not worry too hard about it. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
This commit is contained in:

committed by
Marge Bot

parent
966995d911
commit
78bf53904e
@@ -1070,17 +1070,8 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr,
|
|||||||
if (BRW_RND_MODE_UNSPECIFIED != rnd)
|
if (BRW_RND_MODE_UNSPECIFIED != rnd)
|
||||||
bld.emit(SHADER_OPCODE_RND_MODE, bld.null_reg_ud(), brw_imm_d(rnd));
|
bld.emit(SHADER_OPCODE_RND_MODE, bld.null_reg_ud(), brw_imm_d(rnd));
|
||||||
|
|
||||||
/* In theory, it would be better to use BRW_OPCODE_F32TO16. Depending
|
|
||||||
* on the HW gen, it is a special hw opcode or just a MOV, and
|
|
||||||
* brw_F32TO16 (at brw_eu_emit) would do the work to chose.
|
|
||||||
*
|
|
||||||
* But if we want to use that opcode, we need to provide support on
|
|
||||||
* different optimizations and lowerings. As right now HF support is
|
|
||||||
* only for gfx8+, it will be better to use directly the MOV, and use
|
|
||||||
* BRW_OPCODE_F32TO16 when/if we work for HF support on gfx7.
|
|
||||||
*/
|
|
||||||
assert(type_sz(op[0].type) < 8); /* brw_nir_lower_conversions */
|
assert(type_sz(op[0].type) < 8); /* brw_nir_lower_conversions */
|
||||||
inst = bld.MOV(result, op[0]);
|
inst = bld.F32TO16(result, op[0]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user