You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

extern "C" {
#include "host-common/goldfish_pipe.h"
#include "virtio-gpu-gfxstream-renderer.h"
#include "virgl_hw.h"
} // extern "C"
enum BackendFlags {
GFXSTREAM_BACKEND_FLAGS_NO_VK_BIT = 1 << 0,
GFXSTREAM_BACKEND_FLAGS_EGL2EGL_BIT = 1 << 1,
};
// based on VIRGL_RENDERER_USE* and friends
enum RendererFlags {
GFXSTREAM_RENDERER_FLAGS_USE_EGL_BIT = 1 << 0,
GFXSTREAM_RENDERER_FLAGS_THREAD_SYNC = 1 << 1,
GFXSTREAM_RENDERER_FLAGS_USE_GLX_BIT = 1 << 2,
GFXSTREAM_RENDERER_FLAGS_USE_SURFACELESS_BIT = 1 << 3,
GFXSTREAM_RENDERER_FLAGS_USE_GLES_BIT = 1 << 4,
GFXSTREAM_RENDERER_FLAGS_NO_VK_BIT = 1 << 5, // for disabling vk
GFXSTREAM_RENDERER_FLAGS_NO_SYNCFD_BIT = 1 << 20, // for disabling syncfd
GFXSTREAM_RENDERER_FLAGS_VULKAN_NATIVE_SWAPCHAIN_BIT = 1 << 22,
};
extern "C" VG_EXPORT void gfxstream_backend_init(
uint32_t display_width,
uint32_t display_height,
uint32_t display_type,
void* renderer_cookie,
int renderer_flags,
struct virgl_renderer_callbacks* virglrenderer_callbacks);
extern "C" VG_EXPORT void gfxstream_backend_setup_window(
void* native_window_handle,
int32_t window_x,
int32_t window_y,
int32_t window_width,
int32_t window_height,
int32_t fb_width,
int32_t fb_height);
extern "C" VG_EXPORT void gfxstream_backend_teardown(void);