vkd3d-shader: Add asserts() to vkd3d_dxbc_compiler_emit_control_flow_instruction().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-10-26 15:06:52 +02:00 committed by Alexandre Julliard
parent 85521c2f82
commit b909a5fe04

View File

@ -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");