mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Bitcast if necessary in the spirv_compiler_emit_mov() general implementation.
In SM 6, this is needed when storing an asfloat() or asuint() result in an indexable temp, because dxc performs the bitcast by casting the destination pointer.
This commit is contained in:
parent
3db7c2a62d
commit
2037daae32
Notes:
Alexandre Julliard
2023-12-11 23:20:29 +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/498
@ -6926,6 +6926,11 @@ static void spirv_compiler_emit_mov(struct spirv_compiler *compiler,
|
|||||||
|
|
||||||
general_implementation:
|
general_implementation:
|
||||||
val_id = spirv_compiler_emit_load_src(compiler, src, dst->write_mask);
|
val_id = spirv_compiler_emit_load_src(compiler, src, dst->write_mask);
|
||||||
|
if (dst->reg.data_type != src->reg.data_type)
|
||||||
|
{
|
||||||
|
val_id = vkd3d_spirv_build_op_bitcast(builder, vkd3d_spirv_get_type_id_for_data_type(builder,
|
||||||
|
dst->reg.data_type, vkd3d_write_mask_component_count(dst->write_mask)), val_id);
|
||||||
|
}
|
||||||
spirv_compiler_emit_store_dst(compiler, dst, val_id);
|
spirv_compiler_emit_store_dst(compiler, dst, val_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user