Philip Rebohle : vkd3d-shader/spirv: Ignore break instructions outside active blocks.
Alexandre Julliard
julliard at winehq.org
Mon Nov 8 15:44:34 CST 2021
Module: vkd3d
Branch: master
Commit: 45ccf85ae611ad0809c854580cdf77a63a01a9be
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=45ccf85ae611ad0809c854580cdf77a63a01a9be
Author: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Date: Mon Nov 8 14:50:19 2021 +0100
vkd3d-shader/spirv: Ignore break instructions outside active blocks.
Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
libs/vkd3d-shader/spirv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index e5b9ef0..698c305 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -7802,8 +7802,10 @@ static int vkd3d_dxbc_compiler_emit_control_flow_instruction(struct vkd3d_dxbc_c
}
else if (breakable_cf_info->current_block == VKD3D_BLOCK_SWITCH)
{
- assert(breakable_cf_info->inside_block);
- vkd3d_spirv_build_op_branch(builder, breakable_cf_info->u.switch_.merge_block_id);
+ /* The current case block may have already been ended by an
+ * unconditional continue instruction. */
+ if (breakable_cf_info->inside_block)
+ vkd3d_spirv_build_op_branch(builder, breakable_cf_info->u.switch_.merge_block_id);
}
cf_info->inside_block = false;
More information about the wine-cvs
mailing list