Henri Verbeet : vkd3d-shader: Decorate "precise" arithmetic instructions with SpvDecorationNoContraction.
Module: vkd3d Branch: master Commit: 73a937edd035e82155825abf406734c224cc666d URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=73a937edd035e82155825abf... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 12 13:12:52 2021 +0100 vkd3d-shader: Decorate "precise" arithmetic instructions with SpvDecorationNoContraction. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/spirv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 61d0d47..27bf40b 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6368,6 +6368,8 @@ static void vkd3d_dxbc_compiler_emit_alu_instruction(struct vkd3d_dxbc_compiler val_id = vkd3d_spirv_build_op_trv(builder, &builder->function_stream, op, type_id, src_ids, instruction->src_count); + if (instruction->flags & VKD3DSI_PRECISE_XYZW) + vkd3d_spirv_build_op_decorate(builder, val_id, SpvDecorationNoContraction, NULL, 0); vkd3d_dxbc_compiler_emit_store_dst(compiler, dst, val_id); } @@ -6600,6 +6602,8 @@ static void vkd3d_dxbc_compiler_emit_dot(struct vkd3d_dxbc_compiler *compiler, val_id = vkd3d_dxbc_compiler_emit_construct_vector(compiler, component_type, component_count, val_id, 0, 1); } + if (instruction->flags & VKD3DSI_PRECISE_XYZW) + vkd3d_spirv_build_op_decorate(builder, val_id, SpvDecorationNoContraction, NULL, 0); vkd3d_dxbc_compiler_emit_store_dst(compiler, dst, val_id); }
participants (1)
-
Alexandre Julliard