mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Skip implicit conversion if types are equal.
Otherwise we get false in implicit_compatible_data_types() when passing types that are equal but not convertible according to convertible_data_type(); e.g. getting: "Can't implicitly convert from Texture2D<float4> to Texture2D<float4>." Signed-off-by: Francisco Casas <fcasas@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
732f1737f4
commit
a8b77b85ca
Notes:
Alexandre Julliard
2022-10-18 00:13:00 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7
@ -370,6 +370,9 @@ static struct hlsl_ir_node *add_implicit_conversion(struct hlsl_ctx *ctx, struct
|
|||||||
{
|
{
|
||||||
struct hlsl_type *src_type = node->data_type;
|
struct hlsl_type *src_type = node->data_type;
|
||||||
|
|
||||||
|
if (hlsl_types_are_equal(src_type, dst_type))
|
||||||
|
return node;
|
||||||
|
|
||||||
if (!implicit_compatible_data_types(src_type, dst_type))
|
if (!implicit_compatible_data_types(src_type, dst_type))
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *src_string, *dst_string;
|
struct vkd3d_string_buffer *src_string, *dst_string;
|
||||||
|
@ -25,8 +25,8 @@ float4 main() : sv_target
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo draw quad
|
draw quad
|
||||||
todo probe all rgba (0.2, 0.2, 0.2, 0.1)
|
probe all rgba (0.2, 0.2, 0.2, 0.1)
|
||||||
|
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
|
Reference in New Issue
Block a user