From: Józef Kucia jkucia@codeweavers.com
... instead of copying them to a private floating-point variable.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- 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 13631a07fd1b..d281d2524d0a 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);