vkd3d-shader/spirv: Support bool dst register in spirv_compiler_emit_comparison_instruction().

This commit is contained in:
Conor McCarthy 2023-11-01 16:41:52 +10:00 committed by Alexandre Julliard
parent 418c177a1b
commit 1dd141535c
Notes: Alexandre Julliard 2023-11-10 21:38:32 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/441

View File

@ -7387,7 +7387,8 @@ static void spirv_compiler_emit_comparison_instruction(struct spirv_compiler *co
result_id = vkd3d_spirv_build_op_tr2(builder, &builder->function_stream, result_id = vkd3d_spirv_build_op_tr2(builder, &builder->function_stream,
op, type_id, src0_id, src1_id); op, type_id, src0_id, src1_id);
result_id = spirv_compiler_emit_bool_to_int(compiler, component_count, result_id, true); if (dst->reg.data_type != VKD3D_DATA_BOOL)
result_id = spirv_compiler_emit_bool_to_int(compiler, component_count, result_id, true);
spirv_compiler_emit_store_reg(compiler, &dst->reg, dst->write_mask, result_id); spirv_compiler_emit_store_reg(compiler, &dst->reg, dst->write_mask, result_id);
} }