mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/dxil: Handle missing flags as zero for BINOP.
The flag operand is omitted if IEEE strictness is specified.
This commit is contained in:
committed by
Alexandre Julliard
parent
9de793f180
commit
f1e9f40061
Notes:
Alexandre Julliard
2023-11-14 23:09:40 +01: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/469
@ -2821,8 +2821,9 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
|
|||||||
struct vkd3d_shader_src_param *src_params;
|
struct vkd3d_shader_src_param *src_params;
|
||||||
enum vkd3d_shader_opcode handler_idx;
|
enum vkd3d_shader_opcode handler_idx;
|
||||||
const struct sm6_value *a, *b;
|
const struct sm6_value *a, *b;
|
||||||
|
uint64_t code, flags;
|
||||||
|
bool silence_warning;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
uint64_t code;
|
|
||||||
|
|
||||||
a = sm6_parser_get_value_by_ref(sm6, record, NULL, &i);
|
a = sm6_parser_get_value_by_ref(sm6, record, NULL, &i);
|
||||||
b = sm6_parser_get_value_by_ref(sm6, record, a->type, &i);
|
b = sm6_parser_get_value_by_ref(sm6, record, a->type, &i);
|
||||||
@ -2838,10 +2839,8 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
|
|||||||
|
|
||||||
vsir_instruction_init(ins, &sm6->p.location, handler_idx);
|
vsir_instruction_init(ins, &sm6->p.location, handler_idx);
|
||||||
|
|
||||||
if (record->operand_count > i && record->operands[i])
|
flags = (record->operand_count > i) ? record->operands[i] : 0;
|
||||||
{
|
silence_warning = false;
|
||||||
uint64_t flags = record->operands[i];
|
|
||||||
bool silence_warning = false;
|
|
||||||
|
|
||||||
switch (handler_idx)
|
switch (handler_idx)
|
||||||
{
|
{
|
||||||
@ -2880,7 +2879,6 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
|
|||||||
vkd3d_shader_parser_warning(&sm6->p, VKD3D_SHADER_WARNING_DXIL_IGNORING_OPERANDS,
|
vkd3d_shader_parser_warning(&sm6->p, VKD3D_SHADER_WARNING_DXIL_IGNORING_OPERANDS,
|
||||||
"Ignoring flags %#"PRIx64" for a binary operation.", flags);
|
"Ignoring flags %#"PRIx64" for a binary operation.", flags);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
src_params = instruction_src_params_alloc(ins, 2, sm6);
|
src_params = instruction_src_params_alloc(ins, 2, sm6);
|
||||||
src_param_init_from_value(&src_params[0], a);
|
src_param_init_from_value(&src_params[0], a);
|
||||||
|
Reference in New Issue
Block a user