aco/gfx9: all non legacy opsel instructions only write 16bits

This affects 16bit VOP3 instructions that were new on gfx9, like max3.

No Foz-DB changes on vega10.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
This commit is contained in:
Georg Lehmann
2024-04-03 09:36:04 +02:00
committed by Marge Bot
parent 18706947e8
commit d15ca421c4
+7 -7
View File
@@ -589,11 +589,11 @@ instr_is_16bit(amd_gfx_level gfx_level, aco_opcode op)
switch (op) {
/* VOP3 */
case aco_opcode::v_mad_f16:
case aco_opcode::v_mad_u16:
case aco_opcode::v_mad_i16:
case aco_opcode::v_fma_f16:
case aco_opcode::v_div_fixup_f16:
case aco_opcode::v_mad_legacy_f16:
case aco_opcode::v_mad_legacy_u16:
case aco_opcode::v_mad_legacy_i16:
case aco_opcode::v_fma_legacy_f16:
case aco_opcode::v_div_fixup_legacy_f16: return false;
case aco_opcode::v_interp_p2_f16:
case aco_opcode::v_fma_mixlo_f16:
case aco_opcode::v_fma_mixhi_f16:
@@ -634,8 +634,8 @@ instr_is_16bit(amd_gfx_level gfx_level, aco_opcode op)
case aco_opcode::v_cvt_i16_f16:
case aco_opcode::v_cvt_norm_i16_f16:
case aco_opcode::v_cvt_norm_u16_f16: return gfx_level >= GFX10;
/* on GFX10, all opsel instructions preserve the high bits */
default: return gfx_level >= GFX10 && can_use_opsel(gfx_level, op, -1);
/* all non legacy opsel instructions preserve the high bits */
default: return can_use_opsel(gfx_level, op, -1);
}
}