Skip to content

vkr: add helpers to manipulate the object table

Chia-I Wu requested to merge olv/virglrenderer:vkr-obj into master

This adds vkr_device_{add,remove}_object for device objects and vkr_context_{add,remove}_object for non-device objects.

This MR only identifies whether an object is a device object or not, and picks the appropriate helper. Based on this, I plan to

  • make sure we don't hit the asserts (id is non-zero and unused) in vkr_context_add_object
  • automatically add device objects to dev->objects in vkr_device_add_object
  • optionally and unlikely, add a complete set of helpers
    • vkr_context_add_instance
    • vkr_instance_add_physical_device
    • vkr_physical_device_add_device
    • vkr_device_add_queue
    • vkr_descriptor_pool_add_descriptor_set
    • vkr_command_pool_add_command_buffer

/cc @zzyiwei @ryanneph

Merge request reports