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 type classes.
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
@@ -280,7 +280,7 @@ float4 main() : sv_target
|
||||
return f(half(0.0));
|
||||
}
|
||||
|
||||
[pixel shader todo(sm<6)]
|
||||
[pixel shader]
|
||||
|
||||
float4 func(min16int x)
|
||||
{
|
||||
@@ -298,8 +298,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)
|
||||
|
||||
% Let C be the common type that would be produced in an arithmetic expression
|
||||
% between the parameter and argument types. If C is "int" and the parameter is "uint", the
|
||||
@@ -376,7 +376,7 @@ shader model >= 5.0
|
||||
% E.g. in the following example, C is "double" for the first function (a promoted
|
||||
% type of the "float" argument) and "float" for the second function.
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
|
||||
float4 func(double x)
|
||||
{
|
||||
@@ -394,8 +394,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)
|
||||
|
||||
% Component type widening is preferred over component type narrowing.
|
||||
[pixel shader todo]
|
||||
@@ -426,7 +426,7 @@ todo(sm<6) draw quad
|
||||
probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
% Component count widening is preferred over component type class conversion.
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float f(int x) { return 1.0; }
|
||||
float f(double2 x) { return 2.0; }
|
||||
|
||||
@@ -436,7 +436,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba(2.0, 2.0, 2.0, 2.0)
|
||||
% Let C be the common type that would be produced in an arithmetic expression
|
||||
% between the parameter and argument types. If C has the same base type as the argument,
|
||||
|
Reference in New Issue
Block a user