mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Print abs(x) as |x|.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
171f25e6a5
commit
cf02e942eb
@ -1033,7 +1033,7 @@ static void shader_dump_src_param(struct vkd3d_string_buffer *buffer,
|
||||
shader_addline(buffer, "!");
|
||||
|
||||
if (src_modifier == VKD3DSPSM_ABS || src_modifier == VKD3DSPSM_ABSNEG)
|
||||
shader_addline(buffer, "abs(");
|
||||
shader_addline(buffer, "|");
|
||||
|
||||
shader_dump_register(buffer, ¶m->reg, shader_version);
|
||||
|
||||
@ -1051,8 +1051,8 @@ static void shader_dump_src_param(struct vkd3d_string_buffer *buffer,
|
||||
case VKD3DSPSM_X2NEG: shader_addline(buffer, "_x2"); break;
|
||||
case VKD3DSPSM_DZ: shader_addline(buffer, "_dz"); break;
|
||||
case VKD3DSPSM_DW: shader_addline(buffer, "_dw"); break;
|
||||
case VKD3DSPSM_ABSNEG: shader_addline(buffer, ")"); break;
|
||||
case VKD3DSPSM_ABS: shader_addline(buffer, ")"); break;
|
||||
case VKD3DSPSM_ABSNEG:
|
||||
case VKD3DSPSM_ABS: /* handled later */ break;
|
||||
default: shader_addline(buffer, "_unknown_modifier(%#x)", src_modifier);
|
||||
}
|
||||
|
||||
@ -1076,6 +1076,8 @@ static void shader_dump_src_param(struct vkd3d_string_buffer *buffer,
|
||||
swizzle_chars[swizzle_z], swizzle_chars[swizzle_w]);
|
||||
}
|
||||
}
|
||||
if (src_modifier == VKD3DSPSM_ABS || src_modifier == VKD3DSPSM_ABSNEG)
|
||||
shader_addline(buffer, "|");
|
||||
}
|
||||
|
||||
static void shader_dump_ins_modifiers(struct vkd3d_string_buffer *buffer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user