diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index d381d6ab1..b280c3e89 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -836,6 +836,12 @@ static void msl_break(struct msl_generator *gen) vkd3d_string_buffer_printf(gen->buffer, "break;\n"); } +static void msl_continue(struct msl_generator *gen) +{ + msl_print_indent(gen->buffer, gen->indent); + vkd3d_string_buffer_printf(gen->buffer, "continue;\n"); +} + static void msl_switch(struct msl_generator *gen, const struct vkd3d_shader_instruction *ins) { struct msl_src src; @@ -1286,6 +1292,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d case VSIR_OP_CASE: msl_case(gen, ins); break; + case VSIR_OP_CONTINUE: + msl_continue(gen); + break; case VSIR_OP_DCL_INDEXABLE_TEMP: msl_dcl_indexable_temp(gen, ins); break; diff --git a/tests/hlsl/for.shader_test b/tests/hlsl/for.shader_test index 85ded739c..e49cf09e3 100644 --- a/tests/hlsl/for.shader_test +++ b/tests/hlsl/for.shader_test @@ -54,7 +54,7 @@ float4 main(float tex : texcoord) : sv_target [test] uniform 0 uint4 10 0 0 0 -todo(msl) draw quad +draw quad 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 (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0) diff --git a/tests/hlsl/switch.shader_test b/tests/hlsl/switch.shader_test index 37c0aee92..f777e8f0a 100644 --- a/tests/hlsl/switch.shader_test +++ b/tests/hlsl/switch.shader_test @@ -574,11 +574,11 @@ float4 main() : sv_target [test] if(sm<4) uniform 0 float4 1 0 3 1 if(sm>=4) uniform 0 uint4 1 0 3 1 -todo(msl) draw quad +draw quad probe (0, 0) rgba (10.0, 11.0, 12.0, 13.0) if(sm<4) uniform 0 float4 0 0 3 1 if(sm>=4) uniform 0 uint4 0 0 3 1 -todo(msl) draw quad +draw quad probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0) % return from a switch nested in a loop