vkd3d-shader/tpf: Write 'continue' instruction.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-09-25 20:44:05 +02:00 committed by Alexandre Julliard
parent e4b423d6b5
commit c5414fa92f
Notes: Alexandre Julliard 2023-10-09 23:10:18 +02: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/245
3 changed files with 12 additions and 8 deletions

View File

@ -5200,6 +5200,10 @@ static void write_sm4_jump(const struct tpf_writer *tpf, const struct hlsl_ir_ju
instr.opcode = VKD3D_SM4_OP_BREAK; instr.opcode = VKD3D_SM4_OP_BREAK;
break; break;
case HLSL_IR_JUMP_CONTINUE:
instr.opcode = VKD3D_SM4_OP_CONTINUE;
break;
case HLSL_IR_JUMP_DISCARD_NZ: case HLSL_IR_JUMP_DISCARD_NZ:
{ {
instr.opcode = VKD3D_SM4_OP_DISCARD | VKD3D_SM4_CONDITIONAL_NZ; instr.opcode = VKD3D_SM4_OP_DISCARD | VKD3D_SM4_CONDITIONAL_NZ;

View File

@ -4,7 +4,7 @@ void main(out float tex : texcoord, inout float4 pos : sv_position)
tex = pos.x; tex = pos.x;
} }
[pixel shader todo] [pixel shader]
float4 main(float tex : texcoord) : sv_target float4 main(float tex : texcoord) : sv_target
{ {
int i; int i;
@ -22,7 +22,7 @@ float4 main(float tex : texcoord) : sv_target
} }
[test] [test]
todo draw quad draw quad
probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0) probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0)
probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0) probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0)
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0) probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)

View File

@ -42,7 +42,7 @@ uniform 0 float 4.0
draw quad draw quad
probe all rgba (20.0, 20.0, 20.0, 20.0) probe all rgba (20.0, 20.0, 20.0, 20.0)
[pixel shader todo] [pixel shader]
float a; float a;
float4 main() : sv_target float4 main() : sv_target
@ -68,10 +68,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 4.0 uniform 0 float 4.0
todo draw quad draw quad
todo probe all rgba (409.1, 409.1, 409.1, 409.1) probe all rgba (409.1, 409.1, 409.1, 409.1)
[pixel shader todo] [pixel shader]
float a; float a;
float4 main() : sv_target float4 main() : sv_target
@ -98,5 +98,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 4.0 uniform 0 float 4.0
todo draw quad draw quad
todo probe all rgba (410.1, 410.1, 410.1, 410.1) probe all rgba (410.1, 410.1, 410.1, 410.1)