=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d-shader: Use typed shader inputs directly.
Alexandre Julliard
julliard at winehq.org
Mon Oct 29 18:00:21 CDT 2018
Module: vkd3d
Branch: master
Commit: feeb2b49dfbce9cf87c1c0fed7caf827203c1f4e
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=feeb2b49dfbce9cf87c1c0fed7caf827203c1f4e
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Oct 29 11:12:15 2018 +0100
vkd3d-shader: Use typed shader inputs directly.
... instead of copying them to a private floating-point variable.
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 13631a0..d281d25 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -3238,7 +3238,7 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
vkd3d_spirv_build_op_decorate1(builder, input_id, SpvDecorationComponent, component_idx);
}
- use_private_var = component_type != VKD3D_TYPE_FLOAT || component_count != VKD3D_VEC4_SIZE;
+ use_private_var = component_count != VKD3D_VEC4_SIZE || (builtin && builtin->fixup_pfn);
vkd3d_symbol_make_register(®_symbol, reg);
@@ -3256,7 +3256,7 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
{
reg_symbol.id = var_id;
reg_symbol.info.reg.storage_class = storage_class;
- reg_symbol.info.reg.component_type = VKD3D_TYPE_FLOAT;
+ reg_symbol.info.reg.component_type = use_private_var ? VKD3D_TYPE_FLOAT : component_type;
reg_symbol.info.reg.write_mask = VKD3DSP_WRITEMASK_ALL;
vkd3d_dxbc_compiler_put_symbol(compiler, ®_symbol);
More information about the wine-cvs
mailing list