[PATCH vkd3d] vkd3d-shader: Increment the token pointer before reading the next one.
Zebediah Figura
z.figura12 at gmail.com
Tue May 19 14:23:15 CDT 2020
From: Hans-Kristian Arntzen <post at arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post at arntzen-software.no>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
libs/vkd3d-shader/dxbc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 98c51e4..5e504dc 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -873,7 +873,7 @@ static void shader_sm5_read_dcl_uav_structured(struct vkd3d_shader_instruction *
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_UAV, &ins->declaration.structured_resource.reg);
ins->flags = (opcode_token & VKD3D_SM5_UAV_FLAGS_MASK) >> VKD3D_SM5_UAV_FLAGS_SHIFT;
- ins->declaration.structured_resource.byte_stride = *tokens;
+ ins->declaration.structured_resource.byte_stride = *tokens++;
if (ins->declaration.structured_resource.byte_stride % 4)
FIXME("Byte stride %u is not multiple of 4.\n", ins->declaration.structured_resource.byte_stride);
shader_sm4_read_register_space(priv, &tokens, end, &ins->declaration.structured_resource.register_space);
@@ -908,7 +908,7 @@ static void shader_sm5_read_dcl_resource_structured(struct vkd3d_shader_instruct
const DWORD *end = &tokens[token_count];
shader_sm4_read_dst_param(priv, &tokens, end, VKD3D_DATA_RESOURCE, &ins->declaration.structured_resource.reg);
- ins->declaration.structured_resource.byte_stride = *tokens;
+ ins->declaration.structured_resource.byte_stride = *tokens++;
if (ins->declaration.structured_resource.byte_stride % 4)
FIXME("Byte stride %u is not multiple of 4.\n", ins->declaration.structured_resource.byte_stride);
shader_sm4_read_register_space(priv, &tokens, end, &ins->declaration.structured_resource.register_space);
--
2.26.2
More information about the wine-devel
mailing list