mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/dxil: Rewrite sm6_value_is_constant_zero() in terms of the SM6 value.
Instead of using the VSIR register.
This commit is contained in:
committed by
Henri Verbeet
parent
31e4cbba2e
commit
59fb3a7893
Notes:
Henri Verbeet
2025-06-10 18:06:02 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1546
@@ -2272,8 +2272,13 @@ static inline bool sm6_value_is_constant(const struct sm6_value *value)
|
||||
|
||||
static bool sm6_value_is_constant_zero(const struct sm6_value *value)
|
||||
{
|
||||
/* Constant vectors do not occur. */
|
||||
return sm6_value_is_register(value) && register_is_scalar_constant_zero(&value->reg);
|
||||
if (value->value_type != VALUE_TYPE_CONSTANT || value->type->class != TYPE_CLASS_INTEGER)
|
||||
return false;
|
||||
|
||||
if (value->type->u.width == 64)
|
||||
return value->u.constant.immconst.immconst_u64[0] == 0;
|
||||
else
|
||||
return value->u.constant.immconst.immconst_u32[0] == 0;
|
||||
}
|
||||
|
||||
static inline bool sm6_value_is_undef(const struct sm6_value *value)
|
||||
|
||||
Reference in New Issue
Block a user