vkd3d-shader: Pass a vkd3d_shader_parser structure to shader_sm4_is_end().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-09-02 14:35:53 +02:00 committed by Alexandre Julliard
parent bb482332bf
commit 26009069dd
5 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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
{