From 222c52380bac026fca1db57c2a4c524e613f28b6 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 2 Jun 2024 00:23:12 +0200 Subject: [PATCH] vkd3d-shader/fx: Fix variable buffer offset value. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 54cf1020..3ba0a9ba 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -1000,7 +1000,7 @@ static void write_fx_4_numeric_variable(struct hlsl_ir_var *var, bool shared, st put_u32(buffer, type_offset); semantic_offset = put_u32(buffer, semantic_offset); /* Semantic */ - put_u32(buffer, var->buffer_offset); /* Offset in the constant buffer */ + put_u32(buffer, var->buffer_offset * 4); /* Offset in the constant buffer, in bytes. */ value_offset = put_u32(buffer, 0); /* Default value offset */ put_u32(buffer, flags); /* Flags */