vkd3d-shader/dxil: Implement DX intrinsic WaveReadLaneAt.

This commit is contained in:
Conor McCarthy 2024-05-09 12:24:02 +10:00 committed by Alexandre Julliard
parent 5790056c44
commit e41643ab8f
Notes: Alexandre Julliard 2024-05-14 23:00:18 +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/863
3 changed files with 6 additions and 0 deletions

View File

@ -345,6 +345,7 @@ static const char * const shader_opcode_names[] =
[VKD3DSIH_WAVE_OP_UMAX ] = "wave_op_umax", [VKD3DSIH_WAVE_OP_UMAX ] = "wave_op_umax",
[VKD3DSIH_WAVE_OP_UMIN ] = "wave_op_umin", [VKD3DSIH_WAVE_OP_UMIN ] = "wave_op_umin",
[VKD3DSIH_WAVE_PREFIX_BIT_COUNT ] = "wave_prefix_bit_count", [VKD3DSIH_WAVE_PREFIX_BIT_COUNT ] = "wave_prefix_bit_count",
[VKD3DSIH_WAVE_READ_LANE_AT ] = "wave_read_lane_at",
[VKD3DSIH_XOR ] = "xor", [VKD3DSIH_XOR ] = "xor",
}; };

View File

@ -453,6 +453,7 @@ enum dx_intrinsic_opcode
DX_WAVE_ALL_TRUE = 114, DX_WAVE_ALL_TRUE = 114,
DX_WAVE_ACTIVE_ALL_EQUAL = 115, DX_WAVE_ACTIVE_ALL_EQUAL = 115,
DX_WAVE_ACTIVE_BALLOT = 116, DX_WAVE_ACTIVE_BALLOT = 116,
DX_WAVE_READ_LANE_AT = 117,
DX_WAVE_ACTIVE_OP = 119, DX_WAVE_ACTIVE_OP = 119,
DX_WAVE_ACTIVE_BIT = 120, DX_WAVE_ACTIVE_BIT = 120,
DX_WAVE_PREFIX_OP = 121, DX_WAVE_PREFIX_OP = 121,
@ -4620,6 +4621,8 @@ static enum vkd3d_shader_opcode map_dx_binary_op(enum dx_intrinsic_opcode op, co
return VKD3DSIH_UMAX; return VKD3DSIH_UMAX;
case DX_UMIN: case DX_UMIN:
return VKD3DSIH_UMIN; return VKD3DSIH_UMIN;
case DX_WAVE_READ_LANE_AT:
return VKD3DSIH_WAVE_READ_LANE_AT;
default: default:
vkd3d_unreachable(); vkd3d_unreachable();
} }
@ -6267,6 +6270,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] =
[DX_WAVE_IS_FIRST_LANE ] = {"1", "", sm6_parser_emit_dx_void}, [DX_WAVE_IS_FIRST_LANE ] = {"1", "", sm6_parser_emit_dx_void},
[DX_WAVE_PREFIX_BIT_COUNT ] = {"i", "1", sm6_parser_emit_dx_unary}, [DX_WAVE_PREFIX_BIT_COUNT ] = {"i", "1", sm6_parser_emit_dx_unary},
[DX_WAVE_PREFIX_OP ] = {"n", "Rcc", sm6_parser_emit_dx_wave_op}, [DX_WAVE_PREFIX_OP ] = {"n", "Rcc", sm6_parser_emit_dx_wave_op},
[DX_WAVE_READ_LANE_AT ] = {"n", "Ri", sm6_parser_emit_dx_binary},
}; };
static bool sm6_parser_validate_operand_type(struct sm6_parser *sm6, const struct sm6_value *value, char info_type, static bool sm6_parser_validate_operand_type(struct sm6_parser *sm6, const struct sm6_value *value, char info_type,

View File

@ -546,6 +546,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_WAVE_OP_UMAX, VKD3DSIH_WAVE_OP_UMAX,
VKD3DSIH_WAVE_OP_UMIN, VKD3DSIH_WAVE_OP_UMIN,
VKD3DSIH_WAVE_PREFIX_BIT_COUNT, VKD3DSIH_WAVE_PREFIX_BIT_COUNT,
VKD3DSIH_WAVE_READ_LANE_AT,
VKD3DSIH_XOR, VKD3DSIH_XOR,
VKD3DSIH_INVALID, VKD3DSIH_INVALID,