mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/dxil: Implement DX intrinsic WaveActiveAllEqual.
This commit is contained in:
parent
c770efc530
commit
9aa9b112e6
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
@ -327,6 +327,7 @@ static const char * const shader_opcode_names[] =
|
|||||||
[VKD3DSIH_UTOD ] = "utod",
|
[VKD3DSIH_UTOD ] = "utod",
|
||||||
[VKD3DSIH_UTOF ] = "utof",
|
[VKD3DSIH_UTOF ] = "utof",
|
||||||
[VKD3DSIH_UTOU ] = "utou",
|
[VKD3DSIH_UTOU ] = "utou",
|
||||||
|
[VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL ] = "wave_active_all_equal",
|
||||||
[VKD3DSIH_XOR ] = "xor",
|
[VKD3DSIH_XOR ] = "xor",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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_ACTIVE_ALL_EQUAL = 115,
|
||||||
DX_LEGACY_F32TOF16 = 130,
|
DX_LEGACY_F32TOF16 = 130,
|
||||||
DX_LEGACY_F16TOF32 = 131,
|
DX_LEGACY_F16TOF32 = 131,
|
||||||
DX_RAW_BUFFER_LOAD = 139,
|
DX_RAW_BUFFER_LOAD = 139,
|
||||||
@ -4512,6 +4513,8 @@ static enum vkd3d_shader_opcode map_dx_unary_op(enum dx_intrinsic_opcode op)
|
|||||||
return VKD3DSIH_F32TOF16;
|
return VKD3DSIH_F32TOF16;
|
||||||
case DX_LEGACY_F16TOF32:
|
case DX_LEGACY_F16TOF32:
|
||||||
return VKD3DSIH_F16TOF32;
|
return VKD3DSIH_F16TOF32;
|
||||||
|
case DX_WAVE_ACTIVE_ALL_EQUAL:
|
||||||
|
return VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL;
|
||||||
default:
|
default:
|
||||||
vkd3d_unreachable();
|
vkd3d_unreachable();
|
||||||
}
|
}
|
||||||
@ -5937,6 +5940,7 @@ struct sm6_dx_opcode_info
|
|||||||
C -> constant or undefined int8/16/32
|
C -> constant or undefined int8/16/32
|
||||||
i -> int32
|
i -> int32
|
||||||
m -> int16/32/64
|
m -> int16/32/64
|
||||||
|
n -> any numeric
|
||||||
f -> float
|
f -> float
|
||||||
d -> double
|
d -> double
|
||||||
e -> half/float
|
e -> half/float
|
||||||
@ -6040,6 +6044,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] =
|
|||||||
[DX_UMAD ] = {"m", "RRR", sm6_parser_emit_dx_ma},
|
[DX_UMAD ] = {"m", "RRR", sm6_parser_emit_dx_ma},
|
||||||
[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_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},
|
||||||
};
|
};
|
||||||
@ -6073,6 +6078,8 @@ static bool sm6_parser_validate_operand_type(struct sm6_parser *sm6, const struc
|
|||||||
return sm6_type_is_i32(type);
|
return sm6_type_is_i32(type);
|
||||||
case 'm':
|
case 'm':
|
||||||
return sm6_type_is_i16_i32_i64(type);
|
return sm6_type_is_i16_i32_i64(type);
|
||||||
|
case 'n':
|
||||||
|
return sm6_type_is_numeric(type);
|
||||||
case 'f':
|
case 'f':
|
||||||
return sm6_type_is_float(type);
|
return sm6_type_is_float(type);
|
||||||
case 'd':
|
case 'd':
|
||||||
|
@ -527,6 +527,7 @@ enum vkd3d_shader_opcode
|
|||||||
VKD3DSIH_UTOD,
|
VKD3DSIH_UTOD,
|
||||||
VKD3DSIH_UTOF,
|
VKD3DSIH_UTOF,
|
||||||
VKD3DSIH_UTOU,
|
VKD3DSIH_UTOU,
|
||||||
|
VKD3DSIH_WAVE_ACTIVE_ALL_EQUAL,
|
||||||
VKD3DSIH_XOR,
|
VKD3DSIH_XOR,
|
||||||
|
|
||||||
VKD3DSIH_INVALID,
|
VKD3DSIH_INVALID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user