Skip to content
Snippets Groups Projects
Commit def87539 authored by Conor McCarthy's avatar Conor McCarthy Committed by Alexandre Julliard
Browse files

vkd3d-shader/dxil: Delete bool not-equal-to-false comparison instructions.

parent f47ac703
No related branches found
No related tags found
1 merge request!857vkd3d-shader: Miscellaneous SM 6 patches.
......@@ -6726,6 +6726,15 @@ static void sm6_parser_emit_cmp2(struct sm6_parser *sm6, const struct dxil_recor
code = record->operands[i++];
/* dxcompiler occasionally emits bool not-equal-to-false, which is a no-op. Bool comparisons
* do not otherwise occur, so deleting these avoids the need for backend support. */
if (sm6_type_is_bool(type_a) && code == ICMP_NE && sm6_value_is_constant_zero(b))
{
ins->handler_idx = VKD3DSIH_NOP;
*dst = *a;
return;
}
if ((!is_int && !is_fp) || is_int != (code >= ICMP_EQ))
{
FIXME("Invalid operation %"PRIu64" on type class %u.\n", code, type_a->class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment