mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Prefer overload candidates with matching component types.
This commit is contained in:
Notes:
Henri Verbeet
2024-12-16 17:26:51 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1313
@@ -17,7 +17,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
/* Test a basic overload. */
|
||||
float func(int arg)
|
||||
{
|
||||
@@ -37,11 +37,11 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (0.1, 0.2, 0.1, 0.2)
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
[pixel shader fail todo]
|
||||
float func(int arg)
|
||||
{
|
||||
return 1.0;
|
||||
@@ -58,7 +58,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float func(int arg)
|
||||
{
|
||||
return 1.0;
|
||||
@@ -78,8 +78,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
todo(sm<6) probe (0,0) rgba (1.0, 2.0, 2.0, 2.0)
|
||||
draw quad
|
||||
probe (0, 0) rgba(1.0, 2.0, 2.0, 2.0)
|
||||
|
||||
|
||||
% float and float1 can be defined separately...
|
||||
@@ -307,7 +307,7 @@ probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
% E.g. in the following example, C is "int" in both cases, but "int" <-> "uint"
|
||||
% casts are preferred.
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
|
||||
float4 func(uint x)
|
||||
{
|
||||
@@ -325,12 +325,12 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
draw quad
|
||||
todo(sm<6) probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
% Same as above.
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
|
||||
float4 func(int x)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
draw quad
|
||||
todo(sm<6) probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
% An exact match is preferred for minimum precision types as well.
|
||||
@@ -448,7 +448,7 @@ probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
[require]
|
||||
% Reset
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
|
||||
float4 func(float2 x)
|
||||
{
|
||||
@@ -466,8 +466,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
todo(sm<6) probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
draw quad
|
||||
probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
% Some matrices are implicitly compatible with vectors and will ambiguate with them.
|
||||
|
||||
|
Reference in New Issue
Block a user