mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Support SM1 non-floating point CMP expressions.
This commit is contained in:
Notes:
Henri Verbeet
2025-09-04 14:11:18 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1703
@@ -9772,8 +9772,6 @@ static bool sm1_generate_vsir_instr_expr(struct hlsl_ctx *ctx, struct vsir_progr
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HLSL_OP3_CMP:
|
case HLSL_OP3_CMP:
|
||||||
if (!hlsl_type_is_floating_point(type))
|
|
||||||
goto err;
|
|
||||||
generate_vsir_instr_expr_single_instr_op(ctx, program, expr, VSIR_OP_CMP, 0, 0, true);
|
generate_vsir_instr_expr_single_instr_op(ctx, program, expr, VSIR_OP_CMP, 0, 0, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ uniform 8 float4 5.0 6.0 7.0 8.0
|
|||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (5.0, 2.0, 7.0, 4.0)
|
probe (0, 0) rgba (5.0, 2.0, 7.0, 4.0)
|
||||||
|
|
||||||
[pixel shader todo(sm<4)]
|
[pixel shader]
|
||||||
int4 x, y, z;
|
int4 x, y, z;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
@@ -85,10 +85,10 @@ if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0
|
|||||||
if(sm>=4) uniform 0 int4 0 1 0 -3
|
if(sm>=4) uniform 0 int4 0 1 0 -3
|
||||||
if(sm>=4) uniform 4 int4 1 2 3 4
|
if(sm>=4) uniform 4 int4 1 2 3 4
|
||||||
if(sm>=4) uniform 8 int4 5 6 7 8
|
if(sm>=4) uniform 8 int4 5 6 7 8
|
||||||
todo(sm<4) draw quad
|
draw quad
|
||||||
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
|
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
|
||||||
|
|
||||||
[pixel shader todo(sm<4)]
|
[pixel shader]
|
||||||
uint4 x, y, z;
|
uint4 x, y, z;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
@@ -103,7 +103,7 @@ if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0
|
|||||||
if(sm>=4) uniform 0 uint4 0 1 0 3
|
if(sm>=4) uniform 0 uint4 0 1 0 3
|
||||||
if(sm>=4) uniform 4 uint4 1 2 3 4
|
if(sm>=4) uniform 4 uint4 1 2 3 4
|
||||||
if(sm>=4) uniform 8 uint4 5 6 7 8
|
if(sm>=4) uniform 8 uint4 5 6 7 8
|
||||||
todo(sm<4) draw quad
|
draw quad
|
||||||
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
|
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
|
||||||
|
|
||||||
% The usual type conversion is applied to the first and second expression, as
|
% The usual type conversion is applied to the first and second expression, as
|
||||||
@@ -222,7 +222,7 @@ uniform 0 float4 1.0 2.0 0.0 0.0
|
|||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) f32(2.0, 1.0, 0.0, 0.0)
|
probe (0, 0) f32(2.0, 1.0, 0.0, 0.0)
|
||||||
|
|
||||||
[pixel shader todo(sm<4)]
|
[pixel shader]
|
||||||
uniform float c;
|
uniform float c;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
@@ -233,7 +233,7 @@ float4 main() : sv_target
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
uniform 0 float -1.0
|
uniform 0 float -1.0
|
||||||
todo(sm<4) draw quad
|
draw quad
|
||||||
probe (0, 0) f32(0.0, 1.0, 0.0, 0.0)
|
probe (0, 0) f32(0.0, 1.0, 0.0, 0.0)
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
|
Reference in New Issue
Block a user