glsl: remove test for loop unrolling when we hit conditional cont/break
authorBrian Paul <brianp@vmware.com>
Thu, 25 Jun 2009 15:30:53 +0000 (09:30 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 26 Jun 2009 19:16:34 +0000 (13:16 -0600)
This is no longer needed since we added the new
_slang_loop_contains_continue_or_break() function/test.

src/mesa/shader/slang/slang_codegen.c

index f182ae6e06a3d8ca58f76e826e8c01405c34234f..aa8e44cf60281a130c42ba1e59560dd6dc81c951 100644 (file)
@@ -3465,8 +3465,6 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper)
    if (is_operation_type(&oper->children[1], SLANG_OPER_BREAK)
        && !haveElseClause) {
       /* Special case: generate a conditional break */
-      if (!A->CurLoop) /* probably trying to unroll */
-         return NULL;
       ifBody = new_break_if_true(A, cond);
       return ifBody;
    }
@@ -3475,8 +3473,6 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper)
             && A->CurLoopOper
             && A->CurLoopOper->type != SLANG_OPER_FOR) {
       /* Special case: generate a conditional continue */
-      if (!A->CurLoop) /* probably trying to unroll */
-         return NULL;
       ifBody = new_cont_if_true(A, cond);
       return ifBody;
    }