This cleans up the main funciton body and makes it easier for udmabuf and gbm alloc local branch development.
TEST: dEQP-VK.memory.* and dEQP-VK.api.external.memory.android_hardware_buffer.*
dEQP-VK.memory.*
dEQP-VK.api.external.memory.android_hardware_buffer.*
/cc @olv @ryanneph