summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-07 11:18:04 -0700
committerBrian Paul <brianp@vmware.com>2010-01-07 11:18:12 -0700
commit7335d8006fdc065c8dbe6b63007ffa77ffd53470 (patch)
tree28565f9ebfef275be8c577e76e0d5b390228216c
parent0c6794c46fdd1225bb1d8ece77ea937cb822a1a3 (diff)
tgsi: add assertion to verify legal register file
This assertion fails with piglit glsl-vs-mov-after-deref test because we're double freeing the memory. It seems there's some confusion between what's placed in the hash table and what isn't.
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sanity.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index 6aeb9efb94..7f1c8e5dd6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -515,6 +515,7 @@ regs_hash_destroy(struct cso_hash *hash)
while (!cso_hash_iter_is_null(iter)) {
scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
iter = cso_hash_erase(hash, iter);
+ assert(reg->file < TGSI_FILE_COUNT);
FREE(reg);
}
cso_hash_delete(hash);