mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Introduce a helper to print d3d-asm boolean literals.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
11915f2431
commit
54092b944c
@ -726,6 +726,12 @@ static void shader_print_hex_literal(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
vkd3d_string_buffer_printf(&compiler->buffer, "%s0x%08x%s", prefix, i, suffix);
|
||||
}
|
||||
|
||||
static void shader_print_bool_literal(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
const char *prefix, unsigned int b, const char *suffix)
|
||||
{
|
||||
vkd3d_string_buffer_printf(&compiler->buffer, "%s%s%s", prefix, b ? "true" : "false", suffix);
|
||||
}
|
||||
|
||||
static void shader_print_subscript(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
unsigned int offset, const struct vkd3d_shader_src_param *rel_addr)
|
||||
{
|
||||
@ -1601,9 +1607,9 @@ static void shader_dump_instruction(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
break;
|
||||
|
||||
case VKD3DSIH_DEFB:
|
||||
vkd3d_string_buffer_printf(buffer, " %sb%u%s = %s", compiler->colours.reg,
|
||||
ins->dst[0].reg.idx[0].offset, compiler->colours.reset,
|
||||
ins->src[0].reg.u.immconst_uint[0] ? "true" : "false");
|
||||
vkd3d_string_buffer_printf(buffer, " %sb%u%s", compiler->colours.reg,
|
||||
ins->dst[0].reg.idx[0].offset, compiler->colours.reset);
|
||||
shader_print_bool_literal(compiler, " = ", ins->src[0].reg.u.immconst_uint[0], "");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user