mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Call register_get_float_value() directly in sm6_value_get_constant_float().
sm6_metadata_get_float_value() already calls sm6_value_is_constant() itself, and some compilers (rightly) emit a warning that the conversion of UINT_MAX to float changes the value.
This commit is contained in:
committed by
Henri Verbeet
parent
820430001f
commit
dd34899e97
Notes:
Henri Verbeet
2025-05-12 15:44:26 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1490
@@ -3058,13 +3058,6 @@ static float register_get_float_value(const struct vkd3d_shader_register *reg)
|
||||
return bitcast_uint_to_float(reg->u.immconst_u32[0]);
|
||||
}
|
||||
|
||||
static inline float sm6_value_get_constant_float(const struct sm6_value *value)
|
||||
{
|
||||
if (!sm6_value_is_constant(value))
|
||||
return UINT_MAX;
|
||||
return register_get_float_value(&value->reg);
|
||||
}
|
||||
|
||||
static enum vkd3d_result value_allocate_constant_array(struct sm6_value *dst, const struct sm6_type *type,
|
||||
const uint64_t *operands, struct sm6_parser *sm6)
|
||||
{
|
||||
@@ -7773,7 +7766,7 @@ static bool sm6_metadata_get_float_value(const struct sm6_parser *sm6,
|
||||
if (!sm6_type_is_floating_point(value->type))
|
||||
return false;
|
||||
|
||||
*f = sm6_value_get_constant_float(value);
|
||||
*f = register_get_float_value(&value->reg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user