mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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:
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
@@ -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
|
||||
|
Reference in New Issue
Block a user