add_uniform(struct hash_table *ht, struct qreg reg)
{
struct hash_entry *entry;
- void *key = (void *)(uintptr_t)reg.index;
+ void *key = (void *)(uintptr_t)(reg.index + 1);
entry = _mesa_hash_table_search(ht, key);
if (entry) {
remove_uniform(struct hash_table *ht, struct qreg reg)
{
struct hash_entry *entry;
- void *key = (void *)(uintptr_t)reg.index;
+ void *key = (void *)(uintptr_t)(reg.index + 1);
entry = _mesa_hash_table_search(ht, key);
assert(entry);
struct hash_entry *entry;
hash_table_foreach(ht, entry) {
uint32_t count = (uintptr_t)entry->data;
- uint32_t index = (uintptr_t)entry->key;
+ uint32_t index = (uintptr_t)entry->key - 1;
if (count > max_count) {
max_count = count;
max_index = index;