mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Rewrite sm6_value_is_undef() in terms of the value type.
This commit is contained in:
committed by
Henri Verbeet
parent
0ac20b3029
commit
361ecd6cf5
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
@@ -2307,7 +2307,15 @@ static bool sm6_value_is_constant_zero(const struct sm6_value *value)
|
|||||||
|
|
||||||
static inline bool sm6_value_is_undef(const struct sm6_value *value)
|
static inline bool sm6_value_is_undef(const struct sm6_value *value)
|
||||||
{
|
{
|
||||||
return sm6_value_is_register(value) && value->reg.type == VKD3DSPR_UNDEF;
|
switch (value->value_type)
|
||||||
|
{
|
||||||
|
case VALUE_TYPE_UNDEFINED:
|
||||||
|
case VALUE_TYPE_INVALID:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sm6_value_vector_is_constant_or_undef(const struct sm6_value **values, unsigned int count)
|
static bool sm6_value_vector_is_constant_or_undef(const struct sm6_value **values, unsigned int count)
|
||||||
|
Reference in New Issue
Block a user