tgsi: Update assert.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Mar 2011 19:15:24 +0000 (19:15 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Mar 2011 19:23:04 +0000 (19:23 +0000)
Elements(mach->Inputs) is wrong now that mach->Inputs is dynamically
allocated.

src/gallium/auxiliary/tgsi/tgsi_exec.c

index 6576c74fbde8c31e8b0e5727d7ac154ffb6df180..9cf74a838fecad8aa8b7f278ef65449869d457fe 100644 (file)
@@ -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;