=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d-shader: Take into account dst write mask for scalar stores.

Alexandre Julliard julliard at winehq.org
Wed Mar 6 15:29:26 CST 2019


Module: vkd3d
Branch: master
Commit: 67a160683d4129630760d231751772a3085b32aa
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=67a160683d4129630760d231751772a3085b32aa

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Mar  5 18:17:00 2019 +0100

vkd3d-shader: Take into account dst write mask for scalar stores.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/spirv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index de4c683..bb74400 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2933,6 +2933,7 @@ static void vkd3d_dxbc_compiler_emit_store_scalar(struct vkd3d_dxbc_compiler *co
         type_id = vkd3d_spirv_get_type_id(builder, component_type, 1);
         ptr_type_id = vkd3d_spirv_get_op_type_pointer(builder, storage_class, type_id);
         component_idx = vkd3d_write_mask_get_component_idx(write_mask);
+        component_idx -= vkd3d_write_mask_get_component_idx(dst_write_mask);
         index[0] = vkd3d_dxbc_compiler_get_constant_uint(compiler, component_idx);
         dst_id = vkd3d_spirv_build_op_in_bounds_access_chain(builder, ptr_type_id, dst_id, index, ARRAY_SIZE(index));
     }




More information about the wine-cvs mailing list