diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 83f91960..479cc5b8 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1075,17 +1075,17 @@ void *shader_sm4_init(const DWORD *byte_code, size_t byte_code_size, return priv; } -void shader_sm4_free(void *data) +void shader_sm4_free(struct vkd3d_shader_parser *parser) { struct vkd3d_shader_src_param_entry *e1, *e2; - struct vkd3d_sm4_data *priv = data; + struct vkd3d_sm4_data *sm4 = parser->data; - list_move_head(&priv->src_free, &priv->src); - LIST_FOR_EACH_ENTRY_SAFE(e1, e2, &priv->src_free, struct vkd3d_shader_src_param_entry, entry) + list_move_head(&sm4->src_free, &sm4->src); + LIST_FOR_EACH_ENTRY_SAFE(e1, e2, &sm4->src_free, struct vkd3d_shader_src_param_entry, entry) { vkd3d_free(e1); } - vkd3d_free(priv); + vkd3d_free(sm4); } static struct vkd3d_shader_src_param *get_src_param(struct vkd3d_sm4_data *priv) diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 36c211e6..c439308e 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -394,7 +394,7 @@ static int vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser, static void vkd3d_shader_parser_destroy(struct vkd3d_shader_parser *parser) { - shader_sm4_free(parser->data); + shader_sm4_free(parser); free_shader_desc(&parser->shader_desc); } diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 97c1999b..fb449aac 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -890,7 +890,7 @@ struct vkd3d_shader_message_context; void *shader_sm4_init(const DWORD *byte_code, size_t byte_code_size, const struct vkd3d_shader_signature *output_signature, struct vkd3d_shader_message_context *message_context); -void shader_sm4_free(void *data); +void shader_sm4_free(struct vkd3d_shader_parser *parser); void shader_sm4_read_header(void *data, const DWORD **ptr, struct vkd3d_shader_version *shader_version); void shader_sm4_read_instruction(void *data, const DWORD **ptr,