special libGL installed on the guest OS.
ETEXI
+DEF("enable-yagl", 0, QEMU_OPTION_enable_yagl, \
+ "-enable-yagl enable OpenGLES passthrough support\n", QEMU_ARCH_ALL)
+STEXI
+@item -enable-yagl
+@findex -enable-yagl
+Enable EGL and OpenGLES passthrough support. This option requires special
+libEGL, libGLES_CM and libGLESv2 to be installed on the guest OS. Corresponding
+EGL and openGLES calls on target system are translated to host openGL calls.
+ETEXI
DEF("enable-hax", 0, QEMU_OPTION_enable_hax, \
"-enable-hax enable HAX virtualization support\n", QEMU_ARCH_I386)
#if defined(CONFIG_MARU) && (!defined(CONFIG_DARWIN))
extern int gl_acceleration_capability_check(void);
int enable_gl = 0;
+int enable_yagl = 0;
int capability_check_gl = 0;
#endif
#if defined(CONFIG_MARU) && (!defined(CONFIG_DARWIN))
#endif
#else
fprintf(stderr, "Virtio GL support is disabled, ignoring -enable-gl\n");
+#endif
+ break;
+ case QEMU_OPTION_enable_yagl:
+#if defined(CONFIG_YAGL) && !defined(CONFIG_DARWIN)
+ enable_yagl = 1;
+#else
+ fprintf(stderr, "YaGL openGLES passthrough support is disabled,"
+ " ignoring -enable-yagl\n");
#endif
break;
case QEMU_OPTION_machine:
exit(0);
}
-#ifdef CONFIG_GL_BACKEND
#if defined(CONFIG_MARU) && (!defined(CONFIG_DARWIN))
- if (enable_gl) {
+ if (enable_gl && enable_yagl) {
+ fprintf (stderr, "Error: only one openGL passthrough device can be used at one time!\n");
+ exit(1);
+ }
+
+ if (enable_gl || enable_yagl) {
capability_check_gl = gl_acceleration_capability_check();
if (capability_check_gl != 0) {
- enable_gl = 0;
+ enable_gl = enable_yagl = 0;
fprintf (stderr, "Warn: GL acceleration was disabled due to the fail of GL check!\n");
}
// To check host gl driver capability and notify to guest.
gchar *tmp = tmp_cmdline;
- tmp_cmdline = g_strdup_printf("%s gles=%d", tmp, enable_gl);
+ tmp_cmdline = g_strdup_printf("%s gles=%d yagl=%d", tmp, enable_gl, enable_yagl);
qemu_opts_set(qemu_find_opts("machine"), 0, "append", tmp_cmdline);
fprintf(stdout, "kernel command : %s\n", tmp_cmdline);
g_free(tmp);
}
}
}
-#endif
#endif
/* Open the logfile at this point, if necessary. We can't open the logfile