Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- libs/vkd3d-shader/dxbc.c | 9 +++++---- libs/vkd3d-shader/trace.c | 2 +- libs/vkd3d-shader/vkd3d_shader_main.c | 2 +- libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 479cc5b8..18ccc952 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1110,12 +1110,13 @@ static struct vkd3d_shader_src_param *get_src_param(struct vkd3d_sm4_data *priv) return &e->param; }
-void shader_sm4_read_header(void *data, const DWORD **ptr, struct vkd3d_shader_version *shader_version) +void shader_sm4_read_header(struct vkd3d_shader_parser *parser, + const uint32_t **ptr, struct vkd3d_shader_version *shader_version) { - struct vkd3d_sm4_data *priv = data; + struct vkd3d_sm4_data *sm4 = parser->data;
- *ptr = priv->start; - *shader_version = priv->shader_version; + *ptr = sm4->start; + *shader_version = sm4->shader_version; }
static bool shader_sm4_read_reg_idx(struct vkd3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 3b01b531..107554f6 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -1831,7 +1831,7 @@ enum vkd3d_result vkd3d_dxbc_binary_to_text(struct vkd3d_shader_parser *parser, vkd3d_string_buffer_init(buffer);
shader_version = &compiler.shader_version; - shader_sm4_read_header(parser->data, &ptr, shader_version); + shader_sm4_read_header(parser, &ptr, shader_version); vkd3d_string_buffer_printf(buffer, "%s%s_%u_%u%s\n", compiler.colours.version, shader_get_type_prefix(shader_version->type), shader_version->major, shader_version->minor, compiler.colours.reset); diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index c439308e..08a1cee1 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -388,7 +388,7 @@ static int vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser, return VKD3D_ERROR_INVALID_ARGUMENT; }
- shader_sm4_read_header(parser->data, &parser->ptr, &parser->shader_version); + shader_sm4_read_header(parser, &parser->ptr, &parser->shader_version); return VKD3D_OK; }
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index fb449aac..3b1169a1 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -891,8 +891,8 @@ 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(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_header(struct vkd3d_shader_parser *parser, + const uint32_t **ptr, struct vkd3d_shader_version *shader_version); void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_shader_instruction *ins); bool shader_sm4_is_end(void *data, const DWORD **ptr);