WIP: vulkan: Move some Android code to a common place
@tpalli, could you please finish this up and make it "real"? There's a couple ToDo items:
- Build system bits for the new common code. It adds android-specific stuff to vulkan/util and I'm not really sure what to do there.
- Look harder at
AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM. ANV maps it to R8G8B8 and RADV maps it to R8G8B8A8. I suspect RADV is more correct here but I'm not 100% sure. It really should map to our HW format for it, probably, but there's no Vulkan format for that.
- Look at making
QueueSignalReleaseImageANDROID()common as well. From a brief skim, it looks like RADV probably has the best implementation here but I'm not sure if ANV would like
GetSemaphoreFdKHR()to be called on just any semaphore. It should be ok whenever we have syncobj but not on older kernels. No idea if that's a problem for ChromeOS or not.
Incidentally, I'm 90% sure the current implementation of
QueueSignalReleaseImageANDROID() in ANV is actually broken because we don't implicit-sync any buffers by default anymore.
@chadversary tagging you for review on points 2 and 3.