Mesa (master): tgsi: Update assert.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Mar 3 19:23:18 UTC 2011
Module: Mesa
Branch: master
Commit: 9f3c59a35093c61fb11aab6d3ed5cb45f2b8c2a7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f3c59a35093c61fb11aab6d3ed5cb45f2b8c2a7
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Mar 3 19:15:24 2011 +0000
tgsi: Update assert.
Elements(mach->Inputs) is wrong now that mach->Inputs is dynamically
allocated.
---
src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 6576c74..9cf74a8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1084,7 +1084,7 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
}*/
int pos = index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i];
assert(pos >= 0);
- assert(pos < Elements(mach->Inputs));
+ assert(pos < TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS);
chan->u[i] = mach->Inputs[pos].xyzw[swizzle].u[i];
}
break;
More information about the mesa-commit
mailing list