VirGL.h 658 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2022, Sahan Fernando <sahan.h.fernando@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Types.h>
  8. struct VirGL3DResourceSpec {
  9. u32 target;
  10. u32 format;
  11. u32 bind;
  12. u32 width;
  13. u32 height;
  14. u32 depth;
  15. u32 array_size;
  16. u32 last_level;
  17. u32 nr_samples;
  18. u32 flags;
  19. u32 created_resource_id;
  20. };
  21. struct VirGLCommandBuffer {
  22. u32 const* data;
  23. u32 num_elems;
  24. };
  25. #define VIRGL_DATA_DIR_GUEST_TO_HOST 1
  26. #define VIRGL_DATA_DIR_HOST_TO_GUEST 2
  27. struct VirGLTransferDescriptor {
  28. void* data;
  29. size_t offset_in_region;
  30. size_t num_bytes;
  31. int direction;
  32. };