diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-01-08 05:41:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-01-08 05:41:41 +0000 |
commit | 28b1530fee42a3fea77d7918f5f612e2e052f659 (patch) | |
tree | 08a228d317d8f1d7fe500b868d3334e371cf3102 /lib/mesa/src/util/hash_table.h | |
parent | e0bf2746b74787c4c07df1bb7b1585d70397b9cb (diff) |
Revert to Mesa 13.0.6 again.
Corruption has again been reported on Intel hardware running Xorg with
the modesetting driver (which uses OpenGL based acceleration instead of
SNA acceleration the intel driver defaults to).
Reported in various forms on Sandy Bridge (X220), Ivy Bridge (X230) and
Haswell (X240). Confirmed to not occur with the intel driver but the
xserver was changed to default to the modesetting driver on >= gen4
hardware (except Ironlake).
One means of triggering this is to open a large pdf with xpdf on an
idle machine and highlight a section of the document.
There have been reports of gpu hangs on gen4 intel hardware
(T500 with GM45, X61 with 965GM) when starting Xorg as well.
Diffstat (limited to 'lib/mesa/src/util/hash_table.h')
-rw-r--r-- | lib/mesa/src/util/hash_table.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/mesa/src/util/hash_table.h b/lib/mesa/src/util/hash_table.h index eb9dbc333..b35ee871b 100644 --- a/lib/mesa/src/util/hash_table.h +++ b/lib/mesa/src/util/hash_table.h @@ -64,9 +64,16 @@ _mesa_hash_table_create(void *mem_ctx, const void *b)); void _mesa_hash_table_destroy(struct hash_table *ht, void (*delete_function)(struct hash_entry *entry)); +void _mesa_hash_table_clear(struct hash_table *ht, + void (*delete_function)(struct hash_entry *entry)); void _mesa_hash_table_set_deleted_key(struct hash_table *ht, const void *deleted_key); +static inline uint32_t _mesa_hash_table_num_entries(struct hash_table *ht) +{ + return ht->entries; +} + struct hash_entry * _mesa_hash_table_insert(struct hash_table *ht, const void *key, void *data); struct hash_entry * @@ -101,7 +108,9 @@ static inline uint32_t _mesa_hash_pointer(const void *pointer) return _mesa_hash_data(&pointer, sizeof(pointer)); } -static const uint32_t _mesa_fnv32_1a_offset_bias = 2166136261u; +enum { + _mesa_fnv32_1a_offset_bias = 2166136261u, +}; static inline uint32_t _mesa_fnv32_1a_accumulate_block(uint32_t hash, const void *data, size_t size) @@ -130,6 +139,19 @@ _mesa_fnv32_1a_accumulate_block(uint32_t hash, const void *data, size_t size) entry != NULL; \ entry = _mesa_hash_table_next_entry(ht, entry)) +static inline void +hash_table_call_foreach(struct hash_table *ht, + void (*callback)(const void *key, + void *data, + void *closure), + void *closure) +{ + struct hash_entry *entry; + + hash_table_foreach(ht, entry) + callback(entry->key, entry->data, closure); +} + #ifdef __cplusplus } /* extern C */ #endif |