vkd3d-shader/dxil: Implement DX intrinsic WaveAnyTrue.

This commit is contained in:
Conor McCarthy 2024-04-18 11:32:52 +10:00 committed by Alexandre Julliard
parent 77ec2a5caa
commit fb5eb3159d
Notes: Alexandre Julliard 2024-05-02 22:40:21 +02: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/800
3 changed files with 6 additions and 0 deletions

View File

@ -329,6 +329,7 @@ static const char * const shader_opcode_names[] =
[VKD3DSIH_UTOU ] = "utou",
[VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL ] = "wave_active_all_equal",
[VKD3DSIH_WAVE_ALL_TRUE ] = "wave_all_true",
[VKD3DSIH_WAVE_ANY_TRUE ] = "wave_any_true",
[VKD3DSIH_XOR ] = "xor",
};

View File

@ -429,6 +429,7 @@ enum dx_intrinsic_opcode
DX_PRIMITIVE_ID = 108,
DX_WAVE_GET_LANE_INDEX = 111,
DX_WAVE_GET_LANE_COUNT = 112,
DX_WAVE_ANY_TRUE = 113,
DX_WAVE_ALL_TRUE = 114,
DX_WAVE_ACTIVE_ALL_EQUAL = 115,
DX_LEGACY_F32TOF16 = 130,
@ -4518,6 +4519,8 @@ static enum vkd3d_shader_opcode map_dx_unary_op(enum dx_intrinsic_opcode op)
return VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL;
case DX_WAVE_ALL_TRUE:
return VKD3DSIH_WAVE_ALL_TRUE;
case DX_WAVE_ANY_TRUE:
return VKD3DSIH_WAVE_ANY_TRUE;
default:
vkd3d_unreachable();
}
@ -6049,6 +6052,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] =
[DX_UMIN ] = {"m", "RR", sm6_parser_emit_dx_binary},
[DX_WAVE_ACTIVE_ALL_EQUAL ] = {"1", "n", sm6_parser_emit_dx_unary},
[DX_WAVE_ALL_TRUE ] = {"1", "1", sm6_parser_emit_dx_unary},
[DX_WAVE_ANY_TRUE ] = {"1", "1", sm6_parser_emit_dx_unary},
[DX_WAVE_GET_LANE_COUNT ] = {"i", "", sm6_parser_emit_dx_wave_builtin},
[DX_WAVE_GET_LANE_INDEX ] = {"i", "", sm6_parser_emit_dx_wave_builtin},
};

View File

@ -529,6 +529,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_UTOU,
VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL,
VKD3DSIH_WAVE_ALL_TRUE,
VKD3DSIH_WAVE_ANY_TRUE,
VKD3DSIH_XOR,
VKD3DSIH_INVALID,