mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Generate CONSTANT values in sm6_parser_constants_init() for floating-point values.
This commit is contained in:
committed by
Henri Verbeet
parent
d36e37555a
commit
93fb51c899
Notes:
Henri Verbeet
2025-06-02 21:00:23 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1515
@@ -3409,14 +3409,15 @@ static enum vkd3d_result sm6_parser_constants_init(struct sm6_parser *sm6, const
|
|||||||
return VKD3D_ERROR_INVALID_SHADER;
|
return VKD3D_ERROR_INVALID_SHADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type->u.width == 16)
|
dst->value_type = VALUE_TYPE_CONSTANT;
|
||||||
dst->reg.u.immconst_u32[0] = record->operands[0];
|
|
||||||
else if (type->u.width == 32)
|
value = record->operands[0];
|
||||||
dst->reg.u.immconst_f32[0] = bitcast_uint_to_float(record->operands[0]);
|
if (type->u.width <= 32)
|
||||||
else if (type->u.width == 64)
|
dst->u.constant.immconst.immconst_u32[0] = value & ((1ull << type->u.width) - 1);
|
||||||
dst->reg.u.immconst_f64[0] = bitcast_uint64_to_double(record->operands[0]);
|
|
||||||
else
|
else
|
||||||
vkd3d_unreachable();
|
dst->u.constant.immconst.immconst_u64[0] = value;
|
||||||
|
|
||||||
|
sm6_register_from_value(&dst->reg, dst, sm6);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user