gfxstream: guest: plumb the descriptor everywhere

This change does two things:
    - Makes sure the descriptor is passed through to
      EmulatedGralloc, where it makes a difference

    - Makes sure descriptor is always used when creating
      a VirtioGpuPipeStream.  The VirtioGpuPipeStream
      API where the descriptor is not passed in has
      been nuked.

GLES, VK, Gralloc, and RenderControl can all pass in
a descriptor via their APIs with this change.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Gurchetan Singh 2024-08-02 14:03:13 -07:00 committed by Marge Bot
parent 132ed7b81c
commit e64534bd64

View file

@ -576,7 +576,13 @@ int EmulatedGralloc::getId(const AHardwareBuffer* ahb, uint64_t* id) {
return 0;
}
Gralloc* createPlatformGralloc(int /*deviceFd*/) {
Gralloc* createPlatformGralloc(int32_t descriptor) {
auto device = VirtGpuDevice::getInstance(kCapsetNone, descriptor);
if (!device) {
ALOGE("no virtio gpu device.");
return nullptr;
}
return new EmulatedGralloc();
}