/* The following functions send requests to the VirtIo GPU device model, await the answer from the host, and return a status. They share the following interface details: */
EFI_STATUS VirtioGpuResourceCreate2d(IN OUT VGPU_DEV *VgpuDev, IN UINT32 ResourceId, IN VIRTIO_GPU_FORMATS Format, IN UINT32 Width, IN UINT32 Height)
/* The following functions send requests to the VirtIo GPU device model, await the answer from the host, and return a status. They share the following interface details: */
EFI_STATUS VirtioGpuResourceCreate2d(IN OUT VGPU_DEV *VgpuDev, IN UINT32 ResourceId, IN VIRTIO_GPU_FORMATS Format, IN UINT32 Width, IN UINT32 Height)
{
  volatile VIRTIO_GPU_RESOURCE_CREATE_2D  Request;
  if (ResourceId == 0) {
    return EFI_INVALID_PARAMETER;
  }
  Request.ResourceId = ResourceId;
  Request.Format     = (UINT32)Format;
  Request.Width      = Width;
  Request.Height     = Height;
  return VirtioGpuSendCommand (
           VgpuDev,
           VirtioGpuCmdResourceCreate2d,
           FALSE,
           &Request.Header,
           sizeof Request
           );
}