mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/d3d-asm: Pass a prefix and suffix to shader_dump_reg_type().
This commit is contained in:
parent
7c66c9122d
commit
37401fa11c
Notes:
Alexandre Julliard
2024-04-15 22:23:36 +02:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/789
@ -1388,8 +1388,8 @@ static void shader_print_non_uniform(struct vkd3d_d3d_asm_compiler *compiler, co
|
||||
compiler->colours.modifier, compiler->colours.reset);
|
||||
}
|
||||
|
||||
static void shader_dump_reg_type(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
const struct vkd3d_shader_register *reg)
|
||||
static void shader_print_reg_type(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
const char *prefix, const struct vkd3d_shader_register *reg, const char *suffix)
|
||||
{
|
||||
static const char *dimensions[] =
|
||||
{
|
||||
@ -1402,7 +1402,10 @@ static void shader_dump_reg_type(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
const char *dimension;
|
||||
|
||||
if (!(compiler->flags & VSIR_ASM_FLAG_DUMP_TYPES))
|
||||
{
|
||||
vkd3d_string_buffer_printf(buffer, "%s%s", prefix, suffix);
|
||||
return;
|
||||
}
|
||||
|
||||
if (reg->data_type == VKD3D_DATA_UNUSED)
|
||||
return;
|
||||
@ -1412,9 +1415,9 @@ static void shader_dump_reg_type(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
else
|
||||
dimension = "??";
|
||||
|
||||
shader_addline(buffer, " <%s", dimension);
|
||||
vkd3d_string_buffer_printf(buffer, "%s <%s", prefix, dimension);
|
||||
shader_dump_data_type(compiler, reg->data_type);
|
||||
shader_addline(buffer, ">");
|
||||
vkd3d_string_buffer_printf(buffer, ">%s", suffix);
|
||||
}
|
||||
|
||||
static void shader_print_write_mask(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
@ -1460,8 +1463,7 @@ static void shader_print_dst_param(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
|
||||
shader_print_precision(compiler, ¶m->reg);
|
||||
shader_print_non_uniform(compiler, ¶m->reg);
|
||||
shader_dump_reg_type(compiler, ¶m->reg);
|
||||
vkd3d_string_buffer_printf(&compiler->buffer, "%s", suffix);
|
||||
shader_print_reg_type(compiler, "", ¶m->reg, suffix);
|
||||
}
|
||||
|
||||
static void shader_print_src_param(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
@ -1552,8 +1554,7 @@ static void shader_print_src_param(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
|
||||
shader_print_precision(compiler, ¶m->reg);
|
||||
shader_print_non_uniform(compiler, ¶m->reg);
|
||||
shader_dump_reg_type(compiler, ¶m->reg);
|
||||
vkd3d_string_buffer_printf(buffer, "%s", suffix);
|
||||
shader_print_reg_type(compiler, "", ¶m->reg, suffix);
|
||||
}
|
||||
|
||||
static void shader_dump_ins_modifiers(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
|
Loading…
Reference in New Issue
Block a user