# Pastebin AmapB933 static int get_capset(int fd, struct virgl_renderer_capset_drm *caps) { struct drm_virtgpu_get_caps args = { .cap_set_id = VIRGL_RENDERER_CAPSET_DRM, .cap_set_ver = 0, .addr = (uintptr_t)caps, .size = sizeof(*caps), }; memset(caps, 0, sizeof(*caps)); return virtgpu_ioctl(fd, VIRTGPU_GET_CAPS, &args); }