From: José Fonseca Date: Thu, 3 Mar 2011 19:15:24 +0000 (+0000) Subject: tgsi: Update assert. X-Git-Tag: mesa-7.11-rc1~1687 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f3c59a35093c61fb11aab6d3ed5cb45f2b8c2a7;p=platform%2Fupstream%2Fmesa.git tgsi: Update assert. Elements(mach->Inputs) is wrong now that mach->Inputs is dynamically allocated. --- 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;