mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Pass a struct vsir_program to vkd3d_shader_normalise().
This commit is contained in:
parent
0715734dfb
commit
5de5f241a6
Notes:
Alexandre Julliard
2024-03-19 23:18:03 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/731
@ -4393,11 +4393,9 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
|
||||
const struct vkd3d_shader_compile_info *compile_info)
|
||||
enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t config_flags,
|
||||
const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_message_context *message_context)
|
||||
{
|
||||
struct vkd3d_shader_message_context *message_context = parser->message_context;
|
||||
struct vsir_program *program = &parser->program;
|
||||
enum vkd3d_result result = VKD3D_OK;
|
||||
|
||||
remove_dcl_temps(program);
|
||||
@ -4488,7 +4486,7 @@ enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
|
||||
if (TRACE_ON())
|
||||
vkd3d_shader_trace(program);
|
||||
|
||||
if ((result = vsir_program_validate(program, parser->config_flags,
|
||||
if ((result = vsir_program_validate(program, config_flags,
|
||||
compile_info->source_name, message_context)) < 0)
|
||||
return result;
|
||||
|
||||
|
@ -10133,7 +10133,8 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler,
|
||||
enum vkd3d_result result = VKD3D_OK;
|
||||
unsigned int i;
|
||||
|
||||
if ((result = vkd3d_shader_normalise(parser, compile_info)) < 0)
|
||||
if ((result = vsir_program_normalise(program, compiler->config_flags,
|
||||
compile_info, compiler->message_context)) < 0)
|
||||
return result;
|
||||
|
||||
if (program->temp_count)
|
||||
|
@ -1321,6 +1321,8 @@ struct vsir_program
|
||||
|
||||
bool vsir_program_init(struct vsir_program *program, const struct vkd3d_shader_version *version, unsigned int reserve);
|
||||
void vsir_program_cleanup(struct vsir_program *program);
|
||||
enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t config_flags,
|
||||
const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_message_context *message_context);
|
||||
enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t config_flags,
|
||||
const char *source_name, struct vkd3d_shader_message_context *message_context);
|
||||
|
||||
@ -1784,7 +1786,4 @@ void dxbc_writer_add_section(struct dxbc_writer *dxbc, uint32_t tag, const void
|
||||
void dxbc_writer_init(struct dxbc_writer *dxbc);
|
||||
int dxbc_writer_write(struct dxbc_writer *dxbc, struct vkd3d_shader_code *code);
|
||||
|
||||
enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
|
||||
const struct vkd3d_shader_compile_info *compile_info);
|
||||
|
||||
#endif /* __VKD3D_SHADER_PRIVATE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user