mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Reinterpret minimum precision types as their regular counterparts.
Reinterpret min16float, min10float, min16int, min12int, and min16uint as their regular counterparts: float, float, int, int, uint, respectively. A proper implementation would require adding minimum precision indicators to all the dxbc-tpf instructions that use these types. Consider the output of fxc 10.1 with the following shader: uniform int i; float4 main() : sv_target { min16float4 a = {0, 1, 2, i}; min16int2 b = {4, i}; min10float3 c = {6.4, 7, i}; min12int d = 9.4; min16uint4x2 e = {14.4, 15, 16, 17, 18, 19, 20, i}; return mul(e, b) + a + c.xyzx + d; } However, if the graphics driver doesn't have minimum precision support, it ignores the minimum precision indicators and runs at 32-bit precision, which is equivalent as working with regular types.
This commit is contained in:
committed by
Alexandre Julliard
parent
4ce6a17053
commit
404a2d6a3d
Notes:
Alexandre Julliard
2023-01-25 22:43:55 +01:00
Approved-by: Giovanni Mascellani (@giomasce) 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/58
@@ -2,7 +2,7 @@
|
||||
shader model >= 4.0
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
min16float4 a = {0, 1, 2, 3};
|
||||
@@ -17,5 +17,5 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
todo probe all rgba (197.0, 218.0, 238.0, 257.0)
|
||||
draw quad
|
||||
probe all rgba (197.0, 218.0, 238.0, 257.0)
|
||||
|
Reference in New Issue
Block a user