From 0e006715d85d6daa5f7dd560a82d7437aabedc1d Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Mon, 12 May 2025 15:13:10 +0200 Subject: [PATCH] vkd3d-shader/dxil: Do not use field "reg" in of sm6_value when writing bitcasts. It's going to be removed; the generated register data type is the right thing to look at here. --- libs/vkd3d-shader/dxil.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index c85b644df..592754ea1 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -6955,9 +6955,11 @@ static void sm6_parser_emit_cast(struct sm6_parser *sm6, const struct dxil_recor instruction_dst_param_init_ssa_scalar(ins, sm6); - /* bitcast */ + /* VSIR bitcasts are represented by source registers with types different + * from the types they were written with, rather than with different types + * for the MOV source and destination. */ if (handler_idx == VKD3DSIH_MOV) - src_param->reg.data_type = dst->reg.data_type; + src_param->reg.data_type = ins->dst[0].reg.data_type; } struct sm6_cmp_info