vkd3d-shader/dxil: Generate INVALID values in sm6_parser_emit_unhandled().

This commit is contained in:
Giovanni Mascellani
2025-05-02 11:14:27 +02:00
committed by Henri Verbeet
parent 44e0b17606
commit fd1f74f44d
Notes: Henri Verbeet 2025-05-06 19:05:57 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1483

View File

@@ -6605,16 +6605,13 @@ static bool sm6_parser_validate_dx_op(struct sm6_parser *sm6, enum dx_intrinsic_
static void sm6_parser_emit_unhandled(struct sm6_parser *sm6, struct vkd3d_shader_instruction *ins, static void sm6_parser_emit_unhandled(struct sm6_parser *sm6, struct vkd3d_shader_instruction *ins,
struct sm6_value *dst) struct sm6_value *dst)
{ {
const struct sm6_type *type;
ins->opcode = VKD3DSIH_NOP; ins->opcode = VKD3DSIH_NOP;
if (!dst->type) if (!dst->type)
return; return;
type = sm6_type_get_scalar_type(dst->type, 0); dst->value_type = VALUE_TYPE_INVALID;
vsir_register_init(&dst->reg, VKD3DSPR_UNDEF, vkd3d_data_type_from_sm6_type(type), 0); sm6_register_from_value(&dst->reg, dst);
/* dst->is_undefined is not set here because it flags only explicitly undefined values. */
} }
static void sm6_parser_decode_dx_op(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, static void sm6_parser_decode_dx_op(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,