diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 99c32ae2..99a085f1 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1647,10 +1647,10 @@ fail: return; } -bool shader_sm4_is_end(void *data, const DWORD **ptr) +bool shader_sm4_is_end(struct vkd3d_shader_parser *parser, const uint32_t **ptr) { - struct vkd3d_sm4_data *priv = data; - return *ptr == priv->end; + struct vkd3d_sm4_data *sm4 = parser->data; + return *ptr == sm4->end; } static bool require_space(size_t offset, size_t count, size_t size, size_t data_size) diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index 04d948c2..9824840f 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -104,7 +104,7 @@ int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *generator, vkd3d_string_buffer_printf(&generator->buffer, "#version 440\n\n"); vkd3d_string_buffer_printf(&generator->buffer, "void main()\n{\n"); - while (!shader_sm4_is_end(parser->data, &parser->ptr)) + while (!shader_sm4_is_end(parser, &parser->ptr)) { shader_sm4_read_instruction(parser, &parser->ptr, &ins); diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 3e2b1523..409ed550 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -1837,7 +1837,7 @@ enum vkd3d_result vkd3d_dxbc_binary_to_text(struct vkd3d_shader_parser *parser, shader_version->minor, compiler.colours.reset); indent = 0; - while (!shader_sm4_is_end(parser->data, &ptr)) + while (!shader_sm4_is_end(parser, &ptr)) { struct vkd3d_shader_instruction ins; diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 56611772..b108fa65 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -954,7 +954,7 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info, if (TRACE_ON()) vkd3d_shader_trace(&parser); - while (!shader_sm4_is_end(parser.data, &parser.ptr)) + while (!shader_sm4_is_end(&parser, &parser.ptr)) { shader_sm4_read_instruction(&parser, &parser.ptr, &instruction); @@ -1085,7 +1085,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info return VKD3D_ERROR; } - while (!shader_sm4_is_end(parser.data, &parser.ptr)) + while (!shader_sm4_is_end(&parser, &parser.ptr)) { shader_sm4_read_instruction(&parser, &parser.ptr, &instruction); diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 5e828b6f..6d044c51 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -895,7 +895,7 @@ 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(struct vkd3d_shader_parser *parser, const uint32_t **ptr, struct vkd3d_shader_instruction *ins); -bool shader_sm4_is_end(void *data, const DWORD **ptr); +bool shader_sm4_is_end(struct vkd3d_shader_parser *parser, const uint32_t **ptr); struct vkd3d_string_buffer {