vkd3d-shader/dxil: Implement DX intrinsic WaveAllTrue.

This commit is contained in:
Conor McCarthy 2024-04-18 11:32:52 +10:00 committed by Alexandre Julliard
parent 78f2d2936d
commit 8e2b351538
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

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

View File

@ -429,6 +429,7 @@ enum dx_intrinsic_opcode
DX_PRIMITIVE_ID = 108, DX_PRIMITIVE_ID = 108,
DX_WAVE_GET_LANE_INDEX = 111, DX_WAVE_GET_LANE_INDEX = 111,
DX_WAVE_GET_LANE_COUNT = 112, DX_WAVE_GET_LANE_COUNT = 112,
DX_WAVE_ALL_TRUE = 114,
DX_WAVE_ACTIVE_ALL_EQUAL = 115, DX_WAVE_ACTIVE_ALL_EQUAL = 115,
DX_LEGACY_F32TOF16 = 130, DX_LEGACY_F32TOF16 = 130,
DX_LEGACY_F16TOF32 = 131, DX_LEGACY_F16TOF32 = 131,
@ -4515,6 +4516,8 @@ static enum vkd3d_shader_opcode map_dx_unary_op(enum dx_intrinsic_opcode op)
return VKD3DSIH_F16TOF32; return VKD3DSIH_F16TOF32;
case DX_WAVE_ACTIVE_ALL_EQUAL: case DX_WAVE_ACTIVE_ALL_EQUAL:
return VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL; return VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL;
case DX_WAVE_ALL_TRUE:
return VKD3DSIH_WAVE_ALL_TRUE;
default: default:
vkd3d_unreachable(); vkd3d_unreachable();
} }
@ -6045,6 +6048,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] =
[DX_UMAX ] = {"m", "RR", sm6_parser_emit_dx_binary}, [DX_UMAX ] = {"m", "RR", sm6_parser_emit_dx_binary},
[DX_UMIN ] = {"m", "RR", sm6_parser_emit_dx_binary}, [DX_UMIN ] = {"m", "RR", sm6_parser_emit_dx_binary},
[DX_WAVE_ACTIVE_ALL_EQUAL ] = {"1", "n", sm6_parser_emit_dx_unary}, [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_GET_LANE_COUNT ] = {"i", "", sm6_parser_emit_dx_wave_builtin}, [DX_WAVE_GET_LANE_COUNT ] = {"i", "", sm6_parser_emit_dx_wave_builtin},
[DX_WAVE_GET_LANE_INDEX ] = {"i", "", sm6_parser_emit_dx_wave_builtin}, [DX_WAVE_GET_LANE_INDEX ] = {"i", "", sm6_parser_emit_dx_wave_builtin},
}; };

View File

@ -528,6 +528,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_UTOF, VKD3DSIH_UTOF,
VKD3DSIH_UTOU, VKD3DSIH_UTOU,
VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL, VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL,
VKD3DSIH_WAVE_ALL_TRUE,
VKD3DSIH_XOR, VKD3DSIH_XOR,
VKD3DSIH_INVALID, VKD3DSIH_INVALID,