Commit af54cd43 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

midgard: Scan for breaks

parent 264a27f9
...@@ -1446,6 +1446,20 @@ emit_tex(compiler_context *ctx, nir_tex_instr *instr) ...@@ -1446,6 +1446,20 @@ emit_tex(compiler_context *ctx, nir_tex_instr *instr)
ctx->texture_op_count++; ctx->texture_op_count++;
} }
static void
emit_jump(compiler_context *ctx, nir_jump_instr *instr)
{
switch (instr->type) {
case nir_jump_break:
printf("break..\n");
break;
default:
printf("Unknown jump type %d\n", instr->type);
break;
}
}
static void static void
emit_instr(compiler_context *ctx, struct nir_instr *instr) emit_instr(compiler_context *ctx, struct nir_instr *instr)
{ {
...@@ -1471,6 +1485,10 @@ emit_instr(compiler_context *ctx, struct nir_instr *instr) ...@@ -1471,6 +1485,10 @@ emit_instr(compiler_context *ctx, struct nir_instr *instr)
emit_tex(ctx, nir_instr_as_tex(instr)); emit_tex(ctx, nir_instr_as_tex(instr));
break; break;
case nir_instr_type_jump:
emit_jump(ctx, nir_instr_as_jump(instr));
break;
case nir_instr_type_ssa_undef: case nir_instr_type_ssa_undef:
/* Spurious */ /* Spurious */
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment