From e39559690be3ede767ebe5a178bbd33f7e733662 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Tue, 10 May 2022 15:08:36 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Offset register id for input/ouput variables. Signed-off-by: Giovanni Mascellani Signed-off-by: Francisco Casas Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/hlsl_sm4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index a5fc094b..a6ac2aa3 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -891,7 +891,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r if (has_idx) { - reg->idx[0] = var->semantic.index; + reg->idx[0] = var->semantic.index + offset / 4; reg->idx_count = 1; } @@ -922,7 +922,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r if (has_idx) { - reg->idx[0] = var->semantic.index; + reg->idx[0] = var->semantic.index + offset / 4; reg->idx_count = 1; }