mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Implement VKD3DSIH_ABS.
This commit is contained in:
parent
9a222d2be1
commit
172cb75872
Notes:
Alexandre Julliard
2024-03-27 23:07:31 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/724
@ -7123,6 +7123,7 @@ static enum GLSLstd450 spirv_compiler_map_ext_glsl_instruction(
|
||||
}
|
||||
glsl_insts[] =
|
||||
{
|
||||
{VKD3DSIH_ABS, GLSLstd450FAbs},
|
||||
{VKD3DSIH_ACOS, GLSLstd450Acos},
|
||||
{VKD3DSIH_ASIN, GLSLstd450Asin},
|
||||
{VKD3DSIH_ATAN, GLSLstd450Atan},
|
||||
@ -9814,6 +9815,7 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
|
||||
case VKD3DSIH_ISFINITE:
|
||||
spirv_compiler_emit_isfinite(compiler, instruction);
|
||||
break;
|
||||
case VKD3DSIH_ABS:
|
||||
case VKD3DSIH_ACOS:
|
||||
case VKD3DSIH_ASIN:
|
||||
case VKD3DSIH_ATAN:
|
||||
|
@ -8,8 +8,8 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.7 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.1, 0.7, 0.4, 0.4)
|
||||
uniform 0 float4 -0.7 0.1 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.7, 0.1, 1.2, 0.4)
|
||||
|
@ -107,7 +107,7 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float4 1e-37 1e-37 1e+38 1e+38
|
||||
uniform 4 float4 0 -1e-37 1e+38 -1e+38
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe all rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
||||
|
||||
|
@ -18,9 +18,9 @@ float4 main(float4 pos : sv_position) : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<4 | glsl) draw quad
|
||||
probe (10, 10) rgba (8.0, 8.0, 8.0, 8.0)
|
||||
probe (11, 10) rgba (8.0, 8.0, 8.0, 8.0)
|
||||
probe (12, 10) rgba (10.0, 10.0, 10.0, 10.0)
|
||||
probe (16, 16) rgba (12.0, 12.0, 12.0, 12.0)
|
||||
probe (150, 150) rgba (92.0, 92.0, 92.0, 92.0)
|
||||
todo(glsl) draw quad
|
||||
todo(sm<4) probe (10, 10) rgba (8.0, 8.0, 8.0, 8.0)
|
||||
todo(sm<4) probe (11, 10) rgba (8.0, 8.0, 8.0, 8.0)
|
||||
todo(sm<4) probe (12, 10) rgba (10.0, 10.0, 10.0, 10.0)
|
||||
todo(sm<4) probe (16, 16) rgba (12.0, 12.0, 12.0, 12.0)
|
||||
todo(sm<4) probe (150, 150) rgba (92.0, 92.0, 92.0, 92.0)
|
||||
|
@ -13,23 +13,23 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (3.14159274, 0.0, 0.0, 0.0) 128
|
||||
|
||||
uniform 0 float4 -0.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (2.094441441, 0.0, 0.0, 0.0) 256
|
||||
|
||||
uniform 0 float4 0.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.57072878, 0.0, 0.0, 0.0) 1024
|
||||
|
||||
uniform 0 float4 0.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.04715133, 0.0, 0.0, 0.0) 512
|
||||
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.0, 0.0, 0.0, 0.0) 128
|
||||
|
||||
[pixel shader]
|
||||
@ -44,7 +44,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (-31416.0, 0.0, 0.0, 0.0)
|
||||
|
||||
[require]
|
||||
@ -52,15 +52,15 @@ shader model < 6.0
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -0.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (-10473.0, 0.0, 0.0, 0.0)
|
||||
|
||||
uniform 0 float4 0.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.0, 0.0, 0.0, 0.0)
|
||||
|
||||
uniform 0 float4 0.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (10473.0, 0.0, 0.0, 0.0)
|
||||
|
||||
[require]
|
||||
@ -88,7 +88,7 @@ probe all rgba (10472.0, 0.0, 0.0, 0.0) 4096
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (31416.0, 0.0, 0.0, 0.0)
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ float4 main() : sv_target
|
||||
uniform 0 float4 0.0 1.0 0.0 -3.0
|
||||
uniform 4 float4 1.0 2.0 3.0 4.0
|
||||
uniform 8 float4 5.0 6.0 7.0 8.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (5.0, 2.0, 7.0, 4.0)
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@ float4 main() : sv_target
|
||||
uniform 0 float4 1.0 0.0 1.0 0.0
|
||||
uniform 4 float4 1.0 2.0 3.0 4.0
|
||||
uniform 8 float4 5.0 6.0 7.0 8.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.0, 5.0, 1.0, 5.0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user