v3dv/pipeline: fix combined_index_map insertions

We were inserting as key directly the local key variable used to
search for entries, but hash_table expect a real pointer. Fixed by
using the array of keys that we already had at v3dv_pipeline.

Fixed failures on the rpi4 like:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.a1r5g5b5_unorm_pack16.a1r5g5b5_unorm_pack16.general_general_linear

but fwiw, this tests on the simulator, and several other tests on both
the simulator and rpi4, were working just by luck.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Alejandro Piñeiro 2020-08-07 02:21:45 +02:00 committed by Marge Bot
parent edec743e8d
commit 5a59a331e2
1 changed files with 4 additions and 3 deletions

View File

@ -643,11 +643,12 @@ get_combined_index(struct v3dv_pipeline *pipeline,
return (uint32_t)(uintptr_t) (entry->data);
uint32_t new_index = pipeline->next_combined_index;
_mesa_hash_table_insert(ht, &key, (void *)(uintptr_t) (new_index));
pipeline->combined_index_to_key_map[new_index] = key;
pipeline->next_combined_index++;
pipeline->combined_index_to_key_map[new_index] = key;
_mesa_hash_table_insert(ht, &pipeline->combined_index_to_key_map[new_index],
(void *)(uintptr_t) (new_index));
return new_index;
}