diff --git a/src/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c index 12c0433cca3..841de864bea 100644 --- a/src/freedreno/ir3/ir3_cp.c +++ b/src/freedreno/ir3/ir3_cp.c @@ -393,6 +393,13 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr, return false; if (!is_cat2_float(instr->opc) && !is_cat3_float(instr->opc)) return false; + } else if (src->cat1.dst_type == TYPE_U16) { + /* Since we set CONSTANT_DEMOTION_ENABLE, a float reference of + * what was a U16 value read from the constbuf would incorrectly + * do 32f->16f conversion, when we want to read a 16f value. + */ + if (is_cat2_float(instr->opc) || is_cat3_float(instr->opc)) + return false; } src_reg = ir3_reg_clone(instr->block->shader, src_reg);