mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-26 17:02:24 +00:00
vkd3d-shader/hlsl: Implement cast from bool to int for SM1.
This commit is contained in:
parent
1a6409cd5b
commit
9f3bbab2f0
Notes:
Henri Verbeet
2024-11-21 19:35:39 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1263
@ -7297,13 +7297,10 @@ static bool sm1_generate_vsir_instr_expr_cast(struct hlsl_ctx *ctx,
|
||||
|
||||
case HLSL_TYPE_INT:
|
||||
case HLSL_TYPE_UINT:
|
||||
case HLSL_TYPE_BOOL:
|
||||
generate_vsir_instr_expr_single_instr_op(ctx, program, expr, VKD3DSIH_MOV, 0, 0, true);
|
||||
return true;
|
||||
|
||||
case HLSL_TYPE_BOOL:
|
||||
hlsl_fixme(ctx, &instr->loc, "SM1 cast from bool to integer.");
|
||||
break;
|
||||
|
||||
case HLSL_TYPE_DOUBLE:
|
||||
hlsl_fixme(ctx, &instr->loc, "SM1 cast from double to integer.");
|
||||
break;
|
||||
|
@ -14,7 +14,7 @@ todo(msl) draw quad
|
||||
probe (0, 0) rgba (0.0, 0.0, 1.0, 1.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float4 x;
|
||||
uniform int4 y;
|
||||
|
||||
@ -27,11 +27,11 @@ float4 main() : SV_TARGET
|
||||
uniform 0 float4 0.0 0.0 2.0 4.0
|
||||
if(sm<4) uniform 4 float4 0 1 0 10
|
||||
if(sm>=4) uniform 4 int4 0 1 0 10
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (0.0, 10.0, 1.0, 11.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform bool4 b;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -42,5 +42,5 @@ float4 main() : sv_target
|
||||
[test]
|
||||
if(sm<4) uniform 0 float4 1.0 1.0 1.0 0.0
|
||||
if(sm>=4) uniform 0 uint4 0x00000001 0x00000002 0x80000000 0x00000000
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (2.0, 2.0, 2.0, 0.0)
|
||||
|
@ -65,7 +65,7 @@ todo(msl) draw quad
|
||||
probe (0, 0) rgba (3, 3, 3, 3)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float i;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
@ -77,16 +77,16 @@ float4 main() : SV_TARGET
|
||||
|
||||
[test]
|
||||
uniform 0 float 0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (21.0, 1.0, 24.0, 0.0)
|
||||
uniform 0 float 1
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (22.0, 0.0, 23.0, 1.0)
|
||||
uniform 0 float 2
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (23.0, 1.0, 22.0, 0.0)
|
||||
uniform 0 float 3
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (24.0, 0.0, 21.0, 1.0)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -8,17 +8,17 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
|
||||
uniform 0 float4 -1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (-1.0, -1.0, -1.0, -1.0)
|
||||
uniform 0 float4 0.0 0.0 0.0 0.0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float4 f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -28,11 +28,11 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.0 2.0 3.0 4.0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float2x2 f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -43,11 +43,11 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float4 1.0 2.0 0.0 0.0
|
||||
uniform 4 float4 3.0 4.0 0.0 0.0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform int f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -58,19 +58,19 @@ float4 main() : sv_target
|
||||
[test]
|
||||
if(sm<4) uniform 0 float4 1 0 0 0
|
||||
if(sm>=4) uniform 0 int4 1 0 0 0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1, 1, 1, 1)
|
||||
if(sm<4) uniform 0 float4 -1 0 0 0
|
||||
if(sm>=4) uniform 0 int4 -1 0 0 0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (-1, -1, -1, -1)
|
||||
if(sm<4) uniform 0 float4 0 0 0 0
|
||||
if(sm>=4) uniform 0 int4 0 0 0 0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (0, 0, 0, 0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform int4 f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -81,11 +81,11 @@ float4 main() : sv_target
|
||||
[test]
|
||||
if(sm<4) uniform 0 float4 1 2 3 4
|
||||
if(sm>=4) uniform 0 int4 1 2 3 4
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1, 1, 1, 1)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform int2x2 f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -98,5 +98,5 @@ if(sm<4) uniform 0 float4 1 2 0 0
|
||||
if(sm<4) uniform 4 float4 3 4 0 0
|
||||
if(sm>=4) uniform 0 int4 1 2 0 0
|
||||
if(sm>=4) uniform 4 int4 3 4 0 0
|
||||
todo(sm<4 | msl) draw quad
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) rgba (1, 1, 1, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user