vkr: validate object ids
My goal is to validate object ids in vkr_context_add_object
. Because vkr_context_add_object
can fail on validation errors, I need to fix all callers to cleanup on errors. It makes sense for me to minimize the callers first, which leads to a major refacoring of the device object creation/destruction.
The first commit allows util_hash_table_set_u64
to fail when a key already exists. We don't use that at this point.
The following commits overhauls our object creation/destruction macros. The idea is to have small-ish macros that define helper functions for each object type. With the helper functions defined, we can call them directly and remove the old macros which are monstrous and unmaintainable.
The last three commits allow vkr_context_add_object
to fail and clean up on errors.
I am still validating the MR with CTS. But I would like to get the MR out to get early feedbacks.