From 01001d80e26143ac768115ccb2266db2b24d4fa0 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 11:28:15 -0700 Subject: Initial support of loop and subroutine instructions. New high-level flow-control instructions, both at IR level and GPU instructions for looping and subroutines. --- src/mesa/swrast/s_fragprog.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/swrast/s_fragprog.c') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 740360d460..00231aeae8 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -675,6 +675,14 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_BGNLOOP: /* begin loop */ + break; + case OPCODE_ENDLOOP: /* end loop */ + break; + case OPCODE_BGNSUB: /* begin subroutine */ + break; + case OPCODE_ENDSUB: /* end subroutine */ + break; case OPCODE_BRA: /* conditional branch */ { /* NOTE: The branch is conditional! */ @@ -692,6 +700,9 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_BRK: /* break out of loop */ + /* assert inside loop */ + break; case OPCODE_CAL: /* Call subroutine */ { /* NOTE: The call is conditional! */ @@ -722,6 +733,8 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; + case OPCODE_CONT: /* continue loop */ + break; case OPCODE_COS: { GLfloat a[4], result[4]; -- cgit v1.2.3