vkd3d-shader/msl: Implement VKD3DSIH_UTOF.

This commit is contained in:
Feifan He 2024-11-22 15:45:54 +08:00 committed by Henri Verbeet
parent ffbade9ed1
commit 9fd7f4f1ec
Notes: Henri Verbeet 2024-11-27 14:12:36 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1283
5 changed files with 6 additions and 5 deletions

View File

@ -524,6 +524,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
msl_relop(gen, ins, "!=");
break;
case VKD3DSIH_ITOF:
case VKD3DSIH_UTOF:
msl_cast(gen, ins, "float");
break;
case VKD3DSIH_MOV:

View File

@ -20,7 +20,7 @@ float4 main() : sv_target
[test]
uniform 0 int4 123 0xc00000 456 0x7fd69345
todo(msl) draw quad
draw quad
probe (320,240) rgba (123.0, 12582912.0, 456.0, 2144768896.0)
[pixel shader]

View File

@ -20,7 +20,7 @@ float4 main() : sv_target
[test]
uniform 0 uint4 123 0xc0000000 456 0x7fd69345
todo(msl) draw quad
draw quad
probe (320,240) rgba (123.0, 3221225472.0, 456.0, 2144768896.0)
@ -37,7 +37,7 @@ float4 main() : sv_target
uniform 0 uint4 11 12 0 0
uniform 4 uint4 13 14 0 0
uniform 8 uint4 20 21 22 23
todo(msl) draw quad
draw quad
probe (320,240) rgba (13.0, 21.0, 0.0, 0.0)

View File

@ -18,7 +18,7 @@ if(sm>=4) uniform 0 int -1
if(sm>=4) uniform 1 uint 3
if(sm>=4) uniform 2 int -2
if(sm>=4) uniform 3 float 0.5
todo(msl) draw quad
draw quad
probe (0, 0) rgba (0.5, 0.5, 0.5, 0.5)

View File

@ -18,7 +18,7 @@ if(sm>=4) uniform 0 int -1
if(sm>=4) uniform 1 uint 3
if(sm>=4) uniform 2 int -2
if(sm>=4) uniform 3 float 0.5
todo(msl) draw quad
draw quad
probe (0, 0) rgba (0.5, 0.5, 0.5, 0.5)