vkd3d-shader/dxil: Implement DX intrinsic WavePrefixBitCount.

This commit is contained in:
Conor McCarthy 2024-04-23 22:01:37 +10:00 committed by Alexandre Julliard
parent 065ef0c5e4
commit 2810edf45b
Notes: Alexandre Julliard 2024-05-13 22:56:53 +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/856
3 changed files with 6 additions and 0 deletions

View File

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

View File

@ -459,6 +459,7 @@ enum dx_intrinsic_opcode
DX_LEGACY_F32TOF16 = 130,
DX_LEGACY_F16TOF32 = 131,
DX_WAVE_ALL_BIT_COUNT = 135,
DX_WAVE_PREFIX_BIT_COUNT = 136,
DX_RAW_BUFFER_LOAD = 139,
DX_RAW_BUFFER_STORE = 140,
};
@ -4582,6 +4583,8 @@ static enum vkd3d_shader_opcode map_dx_unary_op(enum dx_intrinsic_opcode op)
return VKD3DSIH_WAVE_ALL_TRUE;
case DX_WAVE_ANY_TRUE:
return VKD3DSIH_WAVE_ANY_TRUE;
case DX_WAVE_PREFIX_BIT_COUNT:
return VKD3DSIH_WAVE_PREFIX_BIT_COUNT;
default:
vkd3d_unreachable();
}
@ -6262,6 +6265,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] =
[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_IS_FIRST_LANE ] = {"1", "", sm6_parser_emit_dx_void},
[DX_WAVE_PREFIX_BIT_COUNT ] = {"i", "1", sm6_parser_emit_dx_unary},
[DX_WAVE_PREFIX_OP ] = {"n", "Rcc", sm6_parser_emit_dx_wave_op},
};

View File

@ -545,6 +545,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_WAVE_OP_MUL,
VKD3DSIH_WAVE_OP_UMAX,
VKD3DSIH_WAVE_OP_UMIN,
VKD3DSIH_WAVE_PREFIX_BIT_COUNT,
VKD3DSIH_XOR,
VKD3DSIH_INVALID,