> struct panfrost_bo { > - struct pipe_reference reference; > + int refcnt; > > /* Mapping for the entire object (all levels) */
Why are we open-coding this instead of using pipe_reference? > + pthread_mutex_lock(&screen->handle_table_lock); > + _mesa_hash_table_insert(screen->handle_table, &bo->gem_handle, bo); > + pthread_mutex_unlock(&screen->handle_table_lock); Use the u64 hash table variants. > > +static uint32_t > +u32_hash(const void *key) > +{ > + return _mesa_hash_data(key, sizeof(uint32_t)); > +} > + > +static bool > +u32_equals(const void *key1, const void *key2) > +{ > + return *(const uint32_t *)key1 == *(const uint32_t *)key2; > +} Again, use the u64 hash table variants and all of this goes away.
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev