summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-01 08:18:03 -0700
committerBrian <[email protected]>2007-02-01 08:18:03 -0700
commitf673b24017b8b5e850a1be5c04bd28cefa811329 (patch)
treed80cf2535575ada390d24b9abef9ef57e11c4079 /src
parentd9d33b6fc883ede7ef231965e0b27792c8e58299 (diff)
additional assertions, bump up MAX_EXEC
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_fragprog.c7
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();
}
}