OSDN Git Service

nir/lower_returns: Fix a bug in loop lowering
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 28 Dec 2015 21:22:09 +0000 (13:22 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 28 Dec 2015 21:22:09 +0000 (13:22 -0800)
src/glsl/nir/nir_lower_returns.c

index 178e454..dcdd14e 100644 (file)
@@ -160,7 +160,7 @@ lower_returns_in_block(nir_block *block, struct lower_returns_state *state)
 
    if (state->loop) {
       /* We're in a loop.  Make the return a break. */
-      jump->type = nir_jump_return;
+      jump->type = nir_jump_break;
    } else {
       /* Not in a loop.  Just delete the return; we'll deal with
        * predicating later.