ir3/cp: Add missing const promotion check

We need to check the source type for moves when the destination type is
u16, just like the f16 check above.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142>
This commit is contained in:
Connor Abbott 2021-09-27 15:52:23 +02:00 committed by Marge Bot
parent 1d9bd8b262
commit ab0a665615
1 changed files with 2 additions and 0 deletions

View File

@ -428,6 +428,8 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr,
*/
if (is_cat2_float(instr->opc) || is_cat3_float(instr->opc))
return false;
if (instr->opc == OPC_MOV && type_float(instr->cat1.src_type))
return false;
}
src_reg = ir3_reg_clone(instr->block->shader, src_reg);