=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d-shader: Add asserts() to vkd3d_dxbc_compiler_emit_control_flow_instruction().
Alexandre Julliard
julliard at winehq.org
Fri Oct 26 14:08:06 CDT 2018
Module: vkd3d
Branch: master
Commit: b909a5fe0491b9221937ad214bda86ab4611634e
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=b909a5fe0491b9221937ad214bda86ab4611634e
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Oct 26 15:06:52 2018 +0200
vkd3d-shader: Add asserts() to vkd3d_dxbc_compiler_emit_control_flow_instruction().
Signed-off-by: Józef Kucia <jkucia 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, 6 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index f6e5746..f2ed8b8 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -5287,6 +5287,8 @@ static void vkd3d_dxbc_compiler_emit_control_flow_instruction(struct vkd3d_dxbc_
{
struct vkd3d_control_flow_info *breakable_cf_info;
+ assert(compiler->control_flow_depth);
+
if (!(breakable_cf_info = vkd3d_dxbc_compiler_find_innermost_breakable_cf_construct(compiler)))
{
FIXME("Unhandled break instruction.\n");
@@ -5311,6 +5313,8 @@ static void vkd3d_dxbc_compiler_emit_control_flow_instruction(struct vkd3d_dxbc_
{
struct vkd3d_control_flow_info *loop_cf_info;
+ assert(compiler->control_flow_depth);
+
if (!(loop_cf_info = vkd3d_dxbc_compiler_find_innermost_loop(compiler)))
{
ERR("Invalid 'breakc' instruction outside loop.\n");
@@ -5327,6 +5331,8 @@ static void vkd3d_dxbc_compiler_emit_control_flow_instruction(struct vkd3d_dxbc_
{
struct vkd3d_control_flow_info *loop_cf_info;
+ assert(compiler->control_flow_depth);
+
if (!(loop_cf_info = vkd3d_dxbc_compiler_find_innermost_loop(compiler)))
{
ERR("Invalid 'continue' instruction outside loop.\n");
More information about the wine-cvs
mailing list