diff options
author | Brian <[email protected]> | 2007-02-01 08:18:03 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-01 08:18:03 -0700 |
commit | f673b24017b8b5e850a1be5c04bd28cefa811329 (patch) | |
tree | d80cf2535575ada390d24b9abef9ef57e11c4079 /src/mesa/swrast/s_fragprog.c | |
parent | d9d33b6fc883ede7ef231965e0b27792c8e58299 (diff) |
additional assertions, bump up MAX_EXEC
Diffstat (limited to 'src/mesa/swrast/s_fragprog.c')
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ab1e586f353..12afb5ea0ed 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -207,6 +207,10 @@ fetch_vector4( GLcontext *ctx, COPY_4V(result, src); } else { + ASSERT(GET_SWZ(source->Swizzle, 0) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 1) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 2) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 3) <= 3); result[0] = src[GET_SWZ(source->Swizzle, 0)]; result[1] = src[GET_SWZ(source->Swizzle, 1)]; result[2] = src[GET_SWZ(source->Swizzle, 2)]; @@ -664,7 +668,7 @@ execute_program( GLcontext *ctx, struct fp_machine *machine, const SWspan *span, GLuint column ) { - const GLuint MAX_EXEC = 5000; + const GLuint MAX_EXEC = 10000; GLuint pc, total = 0; if (DEBUG_FRAG) { @@ -1659,6 +1663,7 @@ execute_program( GLcontext *ctx, total++; if (total > MAX_EXEC) { _mesa_problem(ctx, "Infinite loop detected in fragment program"); + return GL_TRUE; abort(); } } |