vkd3d-shader/dxil: Allow constant zero values to be floating point.

This fixes commit 59fb3a7893, where
the floating point alternative was mistakenly ignored.
This commit is contained in:
Giovanni Mascellani
2025-06-12 19:22:07 +02:00
committed by Henri Verbeet
parent d08673bad1
commit 7c0da1747a
Notes: Henri Verbeet 2025-06-16 17:49:36 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1572

View File

@@ -2271,9 +2271,19 @@ static inline bool sm6_value_is_constant(const struct sm6_value *value)
static bool sm6_value_is_constant_zero(const struct sm6_value *value)
{
if (value->value_type != VALUE_TYPE_CONSTANT || value->type->class != TYPE_CLASS_INTEGER)
if (value->value_type != VALUE_TYPE_CONSTANT)
return false;
switch (value->type->class)
{
case TYPE_CLASS_INTEGER:
case TYPE_CLASS_FLOAT:
break;
default:
return false;
}
if (value->type->u.width == 64)
return value->u.constant.immconst.immconst_u64[0] == 0;
else