vkd3d-shader/dxil: Check the destination value is invalid after calling a void function handler.

This commit is contained in:
Conor McCarthy
2025-06-18 11:07:26 +10:00
committed by Henri Verbeet
parent a410c448ce
commit c3110d2f94
Notes: Henri Verbeet 2025-06-19 20:52:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1573

View File

@@ -643,6 +643,7 @@ struct sm6_type
enum sm6_value_type
{
VALUE_TYPE_INVALID,
VALUE_TYPE_FUNCTION,
VALUE_TYPE_DATA,
VALUE_TYPE_HANDLE,
@@ -652,7 +653,6 @@ enum sm6_value_type
VALUE_TYPE_GROUPSHAREDMEM,
VALUE_TYPE_CONSTANT,
VALUE_TYPE_UNDEFINED,
VALUE_TYPE_INVALID,
};
struct sm6_index
@@ -2229,6 +2229,11 @@ static inline bool sm6_value_is_function_dcl(const struct sm6_value *value)
return value->value_type == VALUE_TYPE_FUNCTION;
}
static bool sm6_value_is_invalid(const struct sm6_value *value)
{
return value->value_type == VALUE_TYPE_INVALID;
}
static inline bool sm6_value_is_dx_intrinsic_dcl(const struct sm6_value *fn)
{
VKD3D_ASSERT(sm6_value_is_function_dcl(fn));
@@ -6732,7 +6737,7 @@ static bool sm6_parser_validate_operand_type(struct sm6_parser *sm6, const struc
case 'V':
return sm6_type_is_struct(type) && !strcmp(type->u.struc->name, "dx.types.fouri32");
case 'v':
return !type;
return sm6_value_is_invalid(value) && !type;
case 'o':
/* TODO: some type checking may be possible */
return true;