|
|
|
@ -1,21 +1,18 @@
|
|
|
|
|
Index: git/Makefile.target
|
|
|
|
|
Index: qemu/Makefile.target
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/Makefile.target 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/Makefile.target 2010-01-14 16:34:58.000000000 +0000
|
|
|
|
|
@@ -153,6 +153,10 @@
|
|
|
|
|
CPPFLAGS+=-I$(SRC_PATH)/fpu
|
|
|
|
|
LIBOBJS+= op_helper.o helper.o
|
|
|
|
|
--- qemu.orig/Makefile.target 2010-05-11 18:05:22.955784896 -0400
|
|
|
|
|
+++ qemu/Makefile.target 2010-05-14 13:34:07.721301429 -0400
|
|
|
|
|
@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
|
|
|
|
|
libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
|
|
|
|
|
libobj-y += op_helper.o helper.o
|
|
|
|
|
libobj-$(CONFIG_NEED_MMU) += mmu.o
|
|
|
|
|
+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
|
|
|
|
|
libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
|
|
|
|
|
libobj-$(TARGET_ALPHA) += alpha_palcode.o
|
|
|
|
|
|
|
|
|
|
+ifeq ($(TARGET_BASE_ARCH), i386)
|
|
|
|
|
+LIBOBJS+=helper_opengl.o opengl_exec.o
|
|
|
|
|
+endif
|
|
|
|
|
+
|
|
|
|
|
ifeq ($(TARGET_BASE_ARCH), arm)
|
|
|
|
|
LIBOBJS+= neon_helper.o iwmmxt_helper.o
|
|
|
|
|
endif
|
|
|
|
|
@@ -224,6 +228,21 @@
|
|
|
|
|
|
|
|
|
|
cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
|
|
|
|
|
@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
|
|
|
|
|
# cpu_signal_handler() in cpu-exec.c.
|
|
|
|
|
signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
|
|
|
|
|
|
|
|
|
|
+parse_gl_h: parse_gl_h.c
|
|
|
|
|
+ $(HOST_CC) -g -o $@ $<
|
|
|
|
@ -35,29 +32,31 @@ Index: git/Makefile.target
|
|
|
|
|
#########################################################
|
|
|
|
|
# Linux user emulator target
|
|
|
|
|
|
|
|
|
|
@@ -584,7 +603,7 @@
|
|
|
|
|
OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
|
|
|
|
|
OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
|
|
|
|
|
OBJS += device-hotplug.o pci-hotplug.o
|
|
|
|
|
-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
|
|
|
|
|
+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(TARGET_BASE_ARCH), ppc)
|
|
|
|
|
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
|
|
|
|
|
@@ -727,7 +746,7 @@
|
|
|
|
|
$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
|
|
|
|
|
@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
|
|
|
|
|
obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
|
|
|
|
|
obj-i386-y += ne2000-isa.o
|
|
|
|
|
|
|
|
|
|
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
|
|
|
|
|
- $(LINK)
|
|
|
|
|
+ $(LINK) -lGL -lGLU
|
|
|
|
|
+ifeq ($(TARGET_BASE_ARCH), i386)
|
|
|
|
|
+QEMU_CFLAGS += -DTARGET_OPENGL_OK
|
|
|
|
|
+endif
|
|
|
|
|
+
|
|
|
|
|
# shared objects
|
|
|
|
|
obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
|
|
|
|
|
obj-ppc-y += ide/cmd646.o
|
|
|
|
|
@@ -303,6 +323,8 @@ vl.o: qemu-options.h
|
|
|
|
|
|
|
|
|
|
endif # !CONFIG_USER_ONLY
|
|
|
|
|
monitor.o: qemu-monitor.h
|
|
|
|
|
|
|
|
|
|
Index: git/hw/pixel_ops.h
|
|
|
|
|
+LIBS += -lGL -lGLU
|
|
|
|
|
+
|
|
|
|
|
ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
|
|
|
|
|
|
|
|
|
|
endif # CONFIG_SOFTMMU
|
|
|
|
|
Index: qemu/hw/pixel_ops.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/hw/pixel_ops.h 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/hw/pixel_ops.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -4,6 +4,12 @@
|
|
|
|
|
--- qemu.orig/hw/pixel_ops.h 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/hw/pixel_ops.h 2010-05-12 12:10:40.092908994 -0400
|
|
|
|
|
@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
|
|
|
|
|
return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -70,11 +69,11 @@ Index: git/hw/pixel_ops.h
|
|
|
|
|
static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
|
|
|
|
|
unsigned int b)
|
|
|
|
|
{
|
|
|
|
|
Index: git/hw/vmware_vga.c
|
|
|
|
|
Index: qemu/hw/vmware_vga.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/hw/vmware_vga.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/hw/vmware_vga.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -484,6 +484,8 @@
|
|
|
|
|
--- qemu.orig/hw/vmware_vga.c 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/hw/vmware_vga.c 2010-05-12 12:10:40.124785891 -0400
|
|
|
|
|
@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
|
|
|
|
|
|
|
|
|
|
#define CMD(f) le32_to_cpu(s->cmd->f)
|
|
|
|
|
|
|
|
|
@ -83,7 +82,7 @@ Index: git/hw/vmware_vga.c
|
|
|
|
|
static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
|
|
|
|
|
{
|
|
|
|
|
if (!s->config || !s->enable)
|
|
|
|
|
@@ -493,11 +495,18 @@
|
|
|
|
|
@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
|
|
|
|
|
|
|
|
|
|
static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
|
|
|
|
|
{
|
|
|
|
@ -106,7 +105,7 @@ Index: git/hw/vmware_vga.c
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
|
|
|
|
|
@@ -507,12 +516,12 @@
|
|
|
|
|
@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
|
|
|
|
|
|
|
|
|
|
static void vmsvga_fifo_run(struct vmsvga_state_s *s)
|
|
|
|
|
{
|
|
|
|
@ -121,7 +120,7 @@ Index: git/hw/vmware_vga.c
|
|
|
|
|
case SVGA_CMD_UPDATE:
|
|
|
|
|
case SVGA_CMD_UPDATE_VERBOSE:
|
|
|
|
|
x = vmsvga_fifo_read(s);
|
|
|
|
|
@@ -612,7 +621,7 @@
|
|
|
|
|
@@ -617,7 +626,7 @@ static void vmsvga_fifo_run(struct vmsvg
|
|
|
|
|
while (args --)
|
|
|
|
|
vmsvga_fifo_read(s);
|
|
|
|
|
printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
|
|
|
|
@ -130,71 +129,24 @@ Index: git/hw/vmware_vga.c
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -914,8 +923,9 @@
|
|
|
|
|
s->width = -1;
|
|
|
|
|
s->height = -1;
|
|
|
|
|
s->svgaid = SVGA_ID;
|
|
|
|
|
- s->depth = 24;
|
|
|
|
|
+ s->depth = 32;
|
|
|
|
|
s->bypp = (s->depth + 7) >> 3;
|
|
|
|
|
+ s->bypp = 4; /* XXX: until we can get host's actual depth */
|
|
|
|
|
s->cursor.on = 0;
|
|
|
|
|
s->redraw_fifo_first = 0;
|
|
|
|
|
s->redraw_fifo_last = 0;
|
|
|
|
|
@@ -1140,6 +1150,12 @@
|
|
|
|
|
/* XXX: use optimized standard vga accesses */
|
|
|
|
|
cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
|
|
|
|
|
vga_ram_size, vga_ram_offset);
|
|
|
|
|
+
|
|
|
|
|
@@ -1136,6 +1145,12 @@ static void vmsvga_init(struct vmsvga_st
|
|
|
|
|
|
|
|
|
|
vga_init_vbe(&s->vga);
|
|
|
|
|
|
|
|
|
|
+#ifdef EMBED_STDVGA
|
|
|
|
|
+ s->map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
|
|
|
|
|
+ s->map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
|
|
|
|
|
+ vga_dirty_log_start((VGAState *) s);
|
|
|
|
|
+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
|
|
|
|
|
+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
|
|
|
|
|
+ vga_dirty_log_start(s);
|
|
|
|
|
+#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
+
|
|
|
|
|
rom_add_vga(VGABIOS_FILENAME);
|
|
|
|
|
|
|
|
|
|
Index: git/kqemu.c
|
|
|
|
|
vmsvga_reset(s);
|
|
|
|
|
Index: qemu/qemu-char.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/kqemu.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/kqemu.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -93,6 +93,8 @@
|
|
|
|
|
int qpi_io_memory;
|
|
|
|
|
uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
|
|
|
|
|
|
|
|
|
|
+extern int enable_gl;
|
|
|
|
|
+
|
|
|
|
|
#define cpuid(index, eax, ebx, ecx, edx) \
|
|
|
|
|
asm volatile ("cpuid" \
|
|
|
|
|
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
|
|
|
|
|
@@ -860,6 +862,22 @@
|
|
|
|
|
else
|
|
|
|
|
env->hflags &= ~HF_OSFXSR_MASK;
|
|
|
|
|
|
|
|
|
|
+ /* OPENGL Stuff */
|
|
|
|
|
+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
|
|
|
|
|
+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
|
|
|
|
|
+ if (env->segs[R_CS].base != 0)
|
|
|
|
|
+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
|
|
|
|
|
+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
|
|
|
|
|
+ (env->eip & TARGET_PAGE_MASK), 0))
|
|
|
|
|
+ ldub_code(env->eip);
|
|
|
|
|
+
|
|
|
|
|
+ if (env->tlb_table[1][index].addend) {
|
|
|
|
|
+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
|
|
|
|
|
+ if (ptr[0] == 0xcd && ptr[1] == 0x99)
|
|
|
|
|
+ helper_opengl();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
|
|
|
|
|
if (ret == KQEMU_RET_SYSCALL) {
|
|
|
|
|
/* syscall instruction */
|
|
|
|
|
Index: git/qemu-char.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/qemu-char.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/qemu-char.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -2112,6 +2112,69 @@
|
|
|
|
|
--- qemu.orig/qemu-char.c 2010-05-11 18:05:22.955784896 -0400
|
|
|
|
|
+++ qemu/qemu-char.c 2010-05-12 17:20:54.280909040 -0400
|
|
|
|
|
@@ -2232,6 +2232,69 @@ static CharDriverState *qemu_chr_open_so
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -253,7 +205,7 @@ Index: git/qemu-char.c
|
|
|
|
|
+ chr->opaque = chr;
|
|
|
|
|
+ chr->chr_write = opengl_chr_write;
|
|
|
|
|
+
|
|
|
|
|
+ qemu_chr_reset(chr);
|
|
|
|
|
+ qemu_chr_generic_open(chr);
|
|
|
|
|
+
|
|
|
|
|
+ return chr;
|
|
|
|
|
+}
|
|
|
|
@ -261,57 +213,66 @@ Index: git/qemu-char.c
|
|
|
|
|
+#define qemu_chr_open_opengl() 0
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s))
|
|
|
|
|
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
|
|
|
|
|
{
|
|
|
|
|
const char *p;
|
|
|
|
|
@@ -2192,6 +2255,9 @@
|
|
|
|
|
chr = chr_baum_init();
|
|
|
|
|
} else
|
|
|
|
|
#endif
|
|
|
|
|
+ if (!strcmp(filename, "opengl")) {
|
|
|
|
|
+ chr = qemu_chr_open_opengl();
|
|
|
|
|
+ } else
|
|
|
|
|
{
|
|
|
|
|
chr = NULL;
|
|
|
|
|
char host[65], port[33], width[8], height[8];
|
|
|
|
|
@@ -2352,6 +2415,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
|
|
|
|
|
qemu_opt_set(opts, "path", filename);
|
|
|
|
|
return opts;
|
|
|
|
|
}
|
|
|
|
|
Index: git/sdl.c
|
|
|
|
|
+ if (!strcmp(filename, "opengl")){
|
|
|
|
|
+ qemu_opt_set(opts, "backend", "opengl");
|
|
|
|
|
+ return opts;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
fail:
|
|
|
|
|
fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
|
|
|
|
|
@@ -2368,6 +2435,7 @@ static const struct {
|
|
|
|
|
{ .name = "udp", .open = qemu_chr_open_udp },
|
|
|
|
|
{ .name = "msmouse", .open = qemu_chr_open_msmouse },
|
|
|
|
|
{ .name = "vc", .open = text_console_init },
|
|
|
|
|
+ { .name = "opengl", .open = qemu_chr_open_opengl },
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
{ .name = "file", .open = qemu_chr_open_win_file_out },
|
|
|
|
|
{ .name = "pipe", .open = qemu_chr_open_win_pipe },
|
|
|
|
|
Index: qemu/sdl.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/sdl.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/sdl.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -54,6 +54,8 @@
|
|
|
|
|
static int guest_x, guest_y;
|
|
|
|
|
static SDL_Cursor *guest_sprite = 0;
|
|
|
|
|
--- qemu.orig/sdl.c 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/sdl.c 2010-05-12 12:10:40.128783931 -0400
|
|
|
|
|
@@ -58,6 +58,8 @@ static uint8_t allocator;
|
|
|
|
|
static SDL_PixelFormat host_format;
|
|
|
|
|
static int scaling_active = 0;
|
|
|
|
|
|
|
|
|
|
+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
|
|
|
|
|
+
|
|
|
|
|
static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
SDL_Rect rec;
|
|
|
|
|
@@ -85,7 +87,9 @@
|
|
|
|
|
// printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
|
|
|
|
|
@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
|
|
|
|
|
|
|
|
|
|
static void sdl_resize(DisplayState *ds)
|
|
|
|
|
{
|
|
|
|
|
- if (!allocator) {
|
|
|
|
|
+ SDL_SysWMinfo info;
|
|
|
|
|
int flags;
|
|
|
|
|
+ static Display *dpy;
|
|
|
|
|
|
|
|
|
|
// printf("resizing to %d %d\n", w, h);
|
|
|
|
|
|
|
|
|
|
@@ -104,6 +108,13 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sdl_setdata(ds);
|
|
|
|
|
+
|
|
|
|
|
+ SDL_GetWMInfo(&info);
|
|
|
|
|
+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
|
|
|
|
|
+ (!dpy || dpy == info.info.x11.display)) {
|
|
|
|
|
+ dpy = info.info.x11.display;
|
|
|
|
|
+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
|
|
|
|
|
+ }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* generic keyboard conversion */
|
|
|
|
|
@@ -323,7 +334,7 @@
|
|
|
|
|
+ if (!allocator) {
|
|
|
|
|
if (!scaling_active)
|
|
|
|
|
do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
|
|
|
|
|
else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
|
|
|
|
|
do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
|
|
|
|
|
sdl_setdata(ds);
|
|
|
|
|
+
|
|
|
|
|
+ SDL_GetWMInfo(&info);
|
|
|
|
|
+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
|
|
|
|
|
+ (!dpy || dpy == info.info.x11.display)) {
|
|
|
|
|
+ dpy = info.info.x11.display;
|
|
|
|
|
+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
|
|
|
|
|
+ }
|
|
|
|
|
} else {
|
|
|
|
|
if (guest_screen != NULL) {
|
|
|
|
|
SDL_FreeSurface(guest_screen);
|
|
|
|
|
@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
|
|
|
|
|
|
|
|
|
|
if (!kbd_mouse_is_absolute()) {
|
|
|
|
|
SDL_ShowCursor(1);
|
|
|
|
@ -320,7 +281,7 @@ Index: git/sdl.c
|
|
|
|
|
(gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
|
|
|
|
|
SDL_SetCursor(guest_sprite);
|
|
|
|
|
else
|
|
|
|
|
@@ -334,7 +345,8 @@
|
|
|
|
|
@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
|
|
|
|
|
static void sdl_grab_start(void)
|
|
|
|
|
{
|
|
|
|
|
if (guest_cursor) {
|
|
|
|
@ -330,7 +291,7 @@ Index: git/sdl.c
|
|
|
|
|
if (!kbd_mouse_is_absolute() && !absolute_enabled)
|
|
|
|
|
SDL_WarpMouse(guest_x, guest_y);
|
|
|
|
|
} else
|
|
|
|
|
@@ -375,8 +387,8 @@
|
|
|
|
|
@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
|
|
|
|
|
absolute_enabled = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -341,7 +302,7 @@ Index: git/sdl.c
|
|
|
|
|
} else if (absolute_enabled) {
|
|
|
|
|
sdl_show_cursor();
|
|
|
|
|
absolute_enabled = 0;
|
|
|
|
|
@@ -606,7 +618,8 @@
|
|
|
|
|
@@ -760,7 +773,8 @@ static void sdl_mouse_warp(int x, int y,
|
|
|
|
|
if (!guest_cursor)
|
|
|
|
|
sdl_show_cursor();
|
|
|
|
|
if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
|
|
|
|
@ -351,18 +312,7 @@ Index: git/sdl.c
|
|
|
|
|
if (!kbd_mouse_is_absolute() && !absolute_enabled)
|
|
|
|
|
SDL_WarpMouse(x, y);
|
|
|
|
|
}
|
|
|
|
|
@@ -631,6 +644,10 @@
|
|
|
|
|
line = image;
|
|
|
|
|
for (x = 0; x < width; x ++, dst ++) {
|
|
|
|
|
switch (bpp) {
|
|
|
|
|
+ case 32:
|
|
|
|
|
+ src = *(line ++); src |= *(line ++);
|
|
|
|
|
+ src = *(line ++); src |= *(line ++);
|
|
|
|
|
+ break;
|
|
|
|
|
case 24:
|
|
|
|
|
src = *(line ++); src |= *(line ++); src |= *(line ++);
|
|
|
|
|
break;
|
|
|
|
|
@@ -657,7 +674,7 @@
|
|
|
|
|
@@ -814,7 +828,7 @@ static void sdl_mouse_define(int width,
|
|
|
|
|
}
|
|
|
|
|
guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
|
|
|
|
|
|
|
|
|
@ -371,17 +321,17 @@ Index: git/sdl.c
|
|
|
|
|
(gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
|
|
|
|
|
SDL_SetCursor(guest_sprite);
|
|
|
|
|
}
|
|
|
|
|
@@ -673,6 +690,7 @@
|
|
|
|
|
{
|
|
|
|
|
@@ -831,6 +845,7 @@ void sdl_display_init(DisplayState *ds,
|
|
|
|
|
int flags;
|
|
|
|
|
uint8_t data = 0;
|
|
|
|
|
DisplayAllocator *da;
|
|
|
|
|
+ SDL_SysWMinfo info;
|
|
|
|
|
const SDL_VideoInfo *vi;
|
|
|
|
|
|
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
|
/* always use generic keymaps */
|
|
|
|
|
@@ -694,6 +712,12 @@
|
|
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
@@ -855,6 +870,12 @@ void sdl_display_init(DisplayState *ds,
|
|
|
|
|
vi = SDL_GetVideoInfo();
|
|
|
|
|
host_format = *(vi->vfmt);
|
|
|
|
|
|
|
|
|
|
+ SDL_GetWMInfo(&info);
|
|
|
|
|
+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
|
|
|
|
@ -392,7 +342,7 @@ Index: git/sdl.c
|
|
|
|
|
dcl = qemu_mallocz(sizeof(DisplayChangeListener));
|
|
|
|
|
dcl->dpy_update = sdl_update;
|
|
|
|
|
dcl->dpy_resize = sdl_resize;
|
|
|
|
|
@@ -717,4 +741,9 @@
|
|
|
|
|
@@ -890,4 +911,9 @@ void sdl_display_init(DisplayState *ds,
|
|
|
|
|
gui_fullscreen_initial_grab = 1;
|
|
|
|
|
sdl_grab_start();
|
|
|
|
|
}
|
|
|
|
@ -402,31 +352,19 @@ Index: git/sdl.c
|
|
|
|
|
+ opengl_exec_set_parent_window(info.info.x11.display,
|
|
|
|
|
+ info.info.x11.window);
|
|
|
|
|
}
|
|
|
|
|
Index: git/slirp/ctl.h
|
|
|
|
|
Index: qemu/slirp/udp.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/slirp/ctl.h 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/slirp/ctl.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
#define CTL_EXEC 1
|
|
|
|
|
#define CTL_ALIAS 2
|
|
|
|
|
#define CTL_DNS 3
|
|
|
|
|
+#define CTL_OPENGL 6
|
|
|
|
|
|
|
|
|
|
#define CTL_SPECIAL "10.0.2.0"
|
|
|
|
|
#define CTL_LOCAL "10.0.2.15"
|
|
|
|
|
Index: git/slirp/udp.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/slirp/udp.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/slirp/udp.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
--- qemu.orig/slirp/udp.c 2010-05-11 18:05:22.955784896 -0400
|
|
|
|
|
+++ qemu/slirp/udp.c 2010-05-12 12:10:40.129784123 -0400
|
|
|
|
|
@@ -40,6 +40,7 @@
|
|
|
|
|
|
|
|
|
|
#include <slirp.h>
|
|
|
|
|
#include "ip_icmp.h"
|
|
|
|
|
+#include "bswap.h"
|
|
|
|
|
|
|
|
|
|
#ifdef LOG_ENABLED
|
|
|
|
|
struct udpstat udpstat;
|
|
|
|
|
@@ -153,6 +154,11 @@
|
|
|
|
|
static u_int8_t udp_tos(struct socket *so);
|
|
|
|
|
|
|
|
|
|
@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
|
|
|
|
|
goto bad;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -435,25 +373,25 @@ Index: git/slirp/udp.c
|
|
|
|
|
+ goto bad;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
if (slirp_restrict)
|
|
|
|
|
if (slirp->restricted) {
|
|
|
|
|
goto bad;
|
|
|
|
|
|
|
|
|
|
Index: git/sysemu.h
|
|
|
|
|
}
|
|
|
|
|
Index: qemu/sysemu.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/sysemu.h 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/sysemu.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -96,6 +96,7 @@
|
|
|
|
|
extern int no_quit;
|
|
|
|
|
extern int semihosting_enabled;
|
|
|
|
|
--- qemu.orig/sysemu.h 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/sysemu.h 2010-05-12 12:10:40.129784123 -0400
|
|
|
|
|
@@ -141,6 +141,7 @@ extern int semihosting_enabled;
|
|
|
|
|
extern int old_param;
|
|
|
|
|
extern int boot_menu;
|
|
|
|
|
extern QEMUClock *rtc_clock;
|
|
|
|
|
+extern int force_pointer;
|
|
|
|
|
extern const char *bootp_filename;
|
|
|
|
|
|
|
|
|
|
#ifdef USE_KQEMU
|
|
|
|
|
Index: git/target-i386/beginend_funcs.sh
|
|
|
|
|
#define MAX_NODES 64
|
|
|
|
|
extern int nb_numa_nodes;
|
|
|
|
|
Index: qemu/target-i386/beginend_funcs.sh
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/beginend_funcs.sh 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/beginend_funcs.sh 2010-05-12 12:10:40.129784123 -0400
|
|
|
|
|
@@ -0,0 +1,23 @@
|
|
|
|
|
+#! /bin/sh
|
|
|
|
|
+# Copyright 2008 (C) Intel Corporation
|
|
|
|
@ -478,10 +416,10 @@ Index: git/target-i386/beginend_funcs.sh
|
|
|
|
|
+echo -e MAGIC_MACRO\(glCallList\)\\n
|
|
|
|
|
+echo -e MAGIC_MACRO\(glCallLists\)\\n
|
|
|
|
|
+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
|
|
|
|
|
Index: git/target-i386/ghash.c
|
|
|
|
|
Index: qemu/target-i386/ghash.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/ghash.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/ghash.c 2010-05-12 12:10:40.130781590 -0400
|
|
|
|
|
@@ -0,0 +1,347 @@
|
|
|
|
|
+/* This is a modified and simplified version of original ghash.c */
|
|
|
|
|
+
|
|
|
|
@ -830,10 +768,10 @@ Index: git/target-i386/ghash.c
|
|
|
|
|
+ hash_node = next;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/ghash.h
|
|
|
|
|
Index: qemu/target-i386/ghash.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/ghash.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/ghash.h 2010-05-12 12:10:40.130781590 -0400
|
|
|
|
|
@@ -0,0 +1,59 @@
|
|
|
|
|
+/* This is a modified and simplified version of original ghash.h */
|
|
|
|
|
+
|
|
|
|
@ -894,10 +832,10 @@ Index: git/target-i386/ghash.h
|
|
|
|
|
+
|
|
|
|
|
+#endif /* __SIMPLE_HASH_H__ */
|
|
|
|
|
+
|
|
|
|
|
Index: git/target-i386/gl_func_perso.h
|
|
|
|
|
Index: qemu/target-i386/gl_func_perso.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/gl_func_perso.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/gl_func_perso.h 2010-05-12 12:10:40.130781590 -0400
|
|
|
|
|
@@ -0,0 +1,135 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Hand-implemented GL/GLX API
|
|
|
|
@ -1034,11 +972,11 @@ Index: git/target-i386/gl_func_perso.h
|
|
|
|
|
+MAGIC_MACRO(_glGetSelectBuffer_fake),
|
|
|
|
|
+MAGIC_MACRO(_glFeedbackBuffer_fake),
|
|
|
|
|
+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
|
|
|
|
|
Index: git/target-i386/helper.c
|
|
|
|
|
Index: qemu/target-i386/helper.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/target-i386/helper.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/target-i386/helper.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -1326,7 +1326,7 @@
|
|
|
|
|
--- qemu.orig/target-i386/helper.c 2010-05-11 18:05:22.955784896 -0400
|
|
|
|
|
+++ qemu/target-i386/helper.c 2010-05-12 12:10:40.131781711 -0400
|
|
|
|
|
@@ -1433,7 +1433,7 @@ target_phys_addr_t cpu_get_phys_page_deb
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
|
|
|
|
@ -1047,21 +985,21 @@ Index: git/target-i386/helper.c
|
|
|
|
|
return paddr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Index: git/target-i386/helper.h
|
|
|
|
|
Index: qemu/target-i386/helper.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/target-i386/helper.h 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/target-i386/helper.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -214,4 +214,6 @@
|
|
|
|
|
--- qemu.orig/target-i386/helper.h 2010-05-11 18:05:22.956804503 -0400
|
|
|
|
|
+++ qemu/target-i386/helper.h 2010-05-12 12:10:40.131781711 -0400
|
|
|
|
|
@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
|
|
|
|
|
DEF_HELPER_2(rcrq, tl, tl, tl)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
+DEF_HELPER_0(opengl, void)
|
|
|
|
|
+
|
|
|
|
|
#include "def-helper.h"
|
|
|
|
|
Index: git/target-i386/helper_opengl.c
|
|
|
|
|
Index: qemu/target-i386/helper_opengl.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/helper_opengl.c 2010-01-14 16:36:59.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/helper_opengl.c 2010-05-12 12:10:40.132781622 -0400
|
|
|
|
|
@@ -0,0 +1,1207 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Host-side implementation of GL/GLX API
|
|
|
|
@ -1148,16 +1086,16 @@ Index: git/target-i386/helper_opengl.c
|
|
|
|
|
+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
|
|
|
|
|
+ return NULL;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
|
|
|
|
|
+ return phys_ram_base + ret +
|
|
|
|
|
+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
|
|
|
|
|
+ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
|
|
|
|
|
+ return qemu_get_ram_ptr(ret +
|
|
|
|
|
+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fprintf(stderr,
|
|
|
|
|
+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
|
|
|
|
|
+ TARGET_FMT_lx "\n", addr, ret);
|
|
|
|
|
+ fprintf(stderr,
|
|
|
|
|
+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
|
|
|
|
|
+ "\n", ret, (target_ulong) phys_ram_size);
|
|
|
|
|
+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
|
|
|
|
|
+ "\n", ret, (target_ulong) last_ram_offset);
|
|
|
|
|
+ return NULL;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
@ -2270,11 +2208,11 @@ Index: git/target-i386/helper_opengl.c
|
|
|
|
|
+ io_register();
|
|
|
|
|
+}
|
|
|
|
|
+#endif
|
|
|
|
|
Index: git/target-i386/kvm.c
|
|
|
|
|
Index: qemu/target-i386/kvm.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/target-i386/kvm.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/target-i386/kvm.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -480,7 +480,7 @@
|
|
|
|
|
--- qemu.orig/target-i386/kvm.c 2010-05-11 18:05:22.956804503 -0400
|
|
|
|
|
+++ qemu/target-i386/kvm.c 2010-05-12 12:10:40.132781622 -0400
|
|
|
|
|
@@ -528,7 +528,7 @@ static int kvm_get_fpu(CPUState *env)
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2283,10 +2221,10 @@ Index: git/target-i386/kvm.c
|
|
|
|
|
{
|
|
|
|
|
struct kvm_sregs sregs;
|
|
|
|
|
uint32_t hflags;
|
|
|
|
|
Index: git/target-i386/mesa_enums.c
|
|
|
|
|
Index: qemu/target-i386/mesa_enums.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_enums.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_enums.c 2010-05-12 12:10:40.163783695 -0400
|
|
|
|
|
@@ -0,0 +1,4890 @@
|
|
|
|
|
+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
|
|
|
|
|
+
|
|
|
|
@ -7178,10 +7116,10 @@ Index: git/target-i386/mesa_enums.c
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
Index: git/target-i386/mesa_get.c
|
|
|
|
|
Index: qemu/target-i386/mesa_get.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_get.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_get.c 2010-05-12 12:10:40.171781452 -0400
|
|
|
|
|
@@ -0,0 +1,5563 @@
|
|
|
|
|
+
|
|
|
|
|
+/***
|
|
|
|
@ -12746,10 +12684,10 @@ Index: git/target-i386/mesa_get.c
|
|
|
|
|
+ params[i] = (GLdouble) values[i];
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
Index: git/target-i386/mesa_gl.h
|
|
|
|
|
Index: qemu/target-i386/mesa_gl.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_gl.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_gl.h 2010-05-12 12:10:40.173780926 -0400
|
|
|
|
|
@@ -0,0 +1,2251 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Mesa 3-D graphics library
|
|
|
|
@ -15002,10 +14940,10 @@ Index: git/target-i386/mesa_gl.h
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#endif /* __gl_h_ */
|
|
|
|
|
Index: git/target-i386/mesa_glext.h
|
|
|
|
|
Index: qemu/target-i386/mesa_glext.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_glext.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_glext.h 2010-05-12 12:10:40.180780867 -0400
|
|
|
|
|
@@ -0,0 +1,7279 @@
|
|
|
|
|
+#ifndef __glext_h_
|
|
|
|
|
+#define __glext_h_
|
|
|
|
@ -22286,10 +22224,10 @@ Index: git/target-i386/mesa_glext.h
|
|
|
|
|
+
|
|
|
|
|
+/* ERO */
|
|
|
|
|
+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
|
|
|
|
|
Index: git/target-i386/mesa_glu.h
|
|
|
|
|
Index: qemu/target-i386/mesa_glu.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_glu.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_glu.h 2010-05-12 12:10:40.181781686 -0400
|
|
|
|
|
@@ -0,0 +1,354 @@
|
|
|
|
|
+/*
|
|
|
|
|
+** License Applicability. Except to the extent portions of this file are
|
|
|
|
@ -22645,10 +22583,10 @@ Index: git/target-i386/mesa_glu.h
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#endif /* __glu_h__ */
|
|
|
|
|
Index: git/target-i386/mesa_glx.h
|
|
|
|
|
Index: qemu/target-i386/mesa_glx.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_glx.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_glx.h 2010-05-12 12:10:40.181781686 -0400
|
|
|
|
|
@@ -0,0 +1,510 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Mesa 3-D graphics library
|
|
|
|
@ -23160,10 +23098,10 @@ Index: git/target-i386/mesa_glx.h
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
Index: git/target-i386/mesa_glxext.h
|
|
|
|
|
Index: qemu/target-i386/mesa_glxext.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_glxext.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_glxext.h 2010-05-12 12:10:40.182781668 -0400
|
|
|
|
|
@@ -0,0 +1,785 @@
|
|
|
|
|
+#ifndef __glxext_h_
|
|
|
|
|
+#define __glxext_h_
|
|
|
|
@ -23950,10 +23888,10 @@ Index: git/target-i386/mesa_glxext.h
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
Index: git/target-i386/mesa_mipmap.c
|
|
|
|
|
Index: qemu/target-i386/mesa_mipmap.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/mesa_mipmap.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/mesa_mipmap.c 2010-05-12 12:10:40.183781579 -0400
|
|
|
|
|
@@ -0,0 +1,824 @@
|
|
|
|
|
+
|
|
|
|
|
+/*
|
|
|
|
@ -24779,10 +24717,10 @@ Index: git/target-i386/mesa_mipmap.c
|
|
|
|
|
+
|
|
|
|
|
+ return retval;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/opengl_exec.c
|
|
|
|
|
Index: qemu/target-i386/opengl_exec.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/opengl_exec.c 2010-01-14 16:34:53.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/opengl_exec.c 2010-05-14 13:34:05.506295624 -0400
|
|
|
|
|
@@ -0,0 +1,3931 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Host-side implementation of GL/GLX API
|
|
|
|
@ -28715,10 +28653,10 @@ Index: git/target-i386/opengl_exec.c
|
|
|
|
|
+
|
|
|
|
|
+ return ret_int;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/opengl_func.h
|
|
|
|
|
Index: qemu/target-i386/opengl_func.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/opengl_func.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/opengl_func.h 2010-05-12 12:10:40.187781086 -0400
|
|
|
|
|
@@ -0,0 +1,1108 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Main header for both host and guest sides
|
|
|
|
@ -29828,10 +29766,10 @@ Index: git/target-i386/opengl_func.h
|
|
|
|
|
+#error Unsupported ABI
|
|
|
|
|
+#endif
|
|
|
|
|
+#endif
|
|
|
|
|
Index: git/target-i386/opengl_player.c
|
|
|
|
|
Index: qemu/target-i386/opengl_player.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/opengl_player.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/opengl_player.c 2010-05-12 12:10:40.188781627 -0400
|
|
|
|
|
@@ -0,0 +1,1461 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
|
|
|
|
@ -31294,10 +31232,10 @@ Index: git/target-i386/opengl_player.c
|
|
|
|
|
+ }
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/opengl_server.c
|
|
|
|
|
Index: qemu/target-i386/opengl_server.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/opengl_server.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/opengl_server.c 2010-05-12 12:10:40.188781627 -0400
|
|
|
|
|
@@ -0,0 +1,826 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * TCP/IP OpenGL server
|
|
|
|
@ -32125,10 +32063,10 @@ Index: git/target-i386/opengl_server.c
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/opengl_utils.h
|
|
|
|
|
Index: qemu/target-i386/opengl_utils.h
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/opengl_utils.h 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/opengl_utils.h 2010-05-12 12:10:40.189781608 -0400
|
|
|
|
|
@@ -0,0 +1,453 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Functions used by host & client sides
|
|
|
|
@ -32583,10 +32521,10 @@ Index: git/target-i386/opengl_utils.h
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
Index: git/target-i386/parse_gl_h.c
|
|
|
|
|
Index: qemu/target-i386/parse_gl_h.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/parse_gl_h.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/parse_gl_h.c 2010-05-12 12:10:40.190781520 -0400
|
|
|
|
|
@@ -0,0 +1,1496 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Parse gl.h et glx.h to auto-generate source code
|
|
|
|
@ -34084,10 +34022,10 @@ Index: git/target-i386/parse_gl_h.c
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/parse_mesa_get_c.c
|
|
|
|
|
Index: qemu/target-i386/parse_mesa_get_c.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
|
+++ git/target-i386/parse_mesa_get_c.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
+++ qemu/target-i386/parse_mesa_get_c.c 2010-05-12 12:10:40.190781520 -0400
|
|
|
|
|
@@ -0,0 +1,225 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
|
|
|
|
@ -34314,11 +34252,11 @@ Index: git/target-i386/parse_mesa_get_c.c
|
|
|
|
|
+ fclose(outf);
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
Index: git/target-i386/translate.c
|
|
|
|
|
Index: qemu/target-i386/translate.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/target-i386/translate.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/target-i386/translate.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -741,6 +741,8 @@
|
|
|
|
|
--- qemu.orig/target-i386/translate.c 2010-05-11 18:05:22.957804134 -0400
|
|
|
|
|
+++ qemu/target-i386/translate.c 2010-05-12 12:10:40.192781553 -0400
|
|
|
|
|
@@ -743,6 +743,8 @@ static void gen_check_io(DisasContext *s
|
|
|
|
|
int state_saved;
|
|
|
|
|
target_ulong next_eip;
|
|
|
|
|
|
|
|
|
@ -34327,7 +34265,7 @@ Index: git/target-i386/translate.c
|
|
|
|
|
state_saved = 0;
|
|
|
|
|
if (s->pe && (s->cpl > s->iopl || s->vm86)) {
|
|
|
|
|
if (s->cc_op != CC_OP_DYNAMIC)
|
|
|
|
|
@@ -2592,11 +2594,18 @@
|
|
|
|
|
@@ -2676,11 +2678,18 @@ static void gen_exception(DisasContext *
|
|
|
|
|
s->is_jmp = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -34346,78 +34284,36 @@ Index: git/target-i386/translate.c
|
|
|
|
|
if (s->cc_op != CC_OP_DYNAMIC)
|
|
|
|
|
gen_op_set_cc_op(s->cc_op);
|
|
|
|
|
gen_jmp_im(cur_eip);
|
|
|
|
|
Index: git/vl.c
|
|
|
|
|
Index: qemu/vl.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- git.orig/vl.c 2009-12-02 13:13:56.000000000 +0000
|
|
|
|
|
+++ git/vl.c 2010-01-14 15:55:40.000000000 +0000
|
|
|
|
|
@@ -245,6 +245,7 @@
|
|
|
|
|
--- qemu.orig/vl.c 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/vl.c 2010-05-12 17:10:46.174909450 -0400
|
|
|
|
|
@@ -238,6 +238,7 @@ int semihosting_enabled = 0;
|
|
|
|
|
#ifdef TARGET_ARM
|
|
|
|
|
int old_param = 0;
|
|
|
|
|
#endif
|
|
|
|
|
+int force_pointer = 0;
|
|
|
|
|
const char *qemu_name;
|
|
|
|
|
int alt_grab = 0;
|
|
|
|
|
#if defined(TARGET_SPARC) || defined(TARGET_PPC)
|
|
|
|
|
@@ -253,6 +254,7 @@
|
|
|
|
|
int ctrl_grab = 0;
|
|
|
|
|
@@ -246,6 +247,7 @@ unsigned int nb_prom_envs = 0;
|
|
|
|
|
const char *prom_envs[MAX_PROM_ENVS];
|
|
|
|
|
#endif
|
|
|
|
|
int nb_drives_opt;
|
|
|
|
|
struct drive_opt drives_opt[MAX_DRIVES];
|
|
|
|
|
int boot_menu;
|
|
|
|
|
+extern int enable_gl;
|
|
|
|
|
|
|
|
|
|
static CPUState *cur_cpu;
|
|
|
|
|
static CPUState *next_cpu;
|
|
|
|
|
@@ -4208,12 +4210,14 @@
|
|
|
|
|
QEMU_OPTION_clock,
|
|
|
|
|
QEMU_OPTION_localtime,
|
|
|
|
|
QEMU_OPTION_startdate,
|
|
|
|
|
+ QEMU_OPTION_enable_gl,
|
|
|
|
|
QEMU_OPTION_icount,
|
|
|
|
|
QEMU_OPTION_echr,
|
|
|
|
|
QEMU_OPTION_virtiocon,
|
|
|
|
|
QEMU_OPTION_show_cursor,
|
|
|
|
|
QEMU_OPTION_semihosting,
|
|
|
|
|
QEMU_OPTION_old_param,
|
|
|
|
|
+ QEMU_OPTION_force_pointer,
|
|
|
|
|
QEMU_OPTION_tb_size,
|
|
|
|
|
QEMU_OPTION_incoming,
|
|
|
|
|
QEMU_OPTION_chroot,
|
|
|
|
|
@@ -4344,6 +4348,8 @@
|
|
|
|
|
#if defined(TARGET_ARM)
|
|
|
|
|
{ "old-param", 0, QEMU_OPTION_old_param },
|
|
|
|
|
#endif
|
|
|
|
|
+ { "force-pointer", 0, QEMU_OPTION_force_pointer },
|
|
|
|
|
+ { "enable-gl", 0, QEMU_OPTION_enable_gl },
|
|
|
|
|
{ "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
|
|
|
|
|
{ "incoming", HAS_ARG, QEMU_OPTION_incoming },
|
|
|
|
|
{ "chroot", HAS_ARG, QEMU_OPTION_chroot },
|
|
|
|
|
@@ -4496,22 +4502,17 @@
|
|
|
|
|
{
|
|
|
|
|
const char *opts;
|
|
|
|
|
|
|
|
|
|
+ std_vga_enabled = 0;
|
|
|
|
|
+ cirrus_vga_enabled = 0;
|
|
|
|
|
+ vmsvga_enabled = 0;
|
|
|
|
|
+
|
|
|
|
|
if (strstart(p, "std", &opts)) {
|
|
|
|
|
std_vga_enabled = 1;
|
|
|
|
|
- cirrus_vga_enabled = 0;
|
|
|
|
|
- vmsvga_enabled = 0;
|
|
|
|
|
} else if (strstart(p, "cirrus", &opts)) {
|
|
|
|
|
cirrus_vga_enabled = 1;
|
|
|
|
|
- std_vga_enabled = 0;
|
|
|
|
|
- vmsvga_enabled = 0;
|
|
|
|
|
} else if (strstart(p, "vmware", &opts)) {
|
|
|
|
|
- cirrus_vga_enabled = 0;
|
|
|
|
|
- std_vga_enabled = 0;
|
|
|
|
|
vmsvga_enabled = 1;
|
|
|
|
|
} else if (strstart(p, "none", &opts)) {
|
|
|
|
|
- cirrus_vga_enabled = 0;
|
|
|
|
|
- std_vga_enabled = 0;
|
|
|
|
|
- vmsvga_enabled = 0;
|
|
|
|
|
} else {
|
|
|
|
|
int nb_numa_nodes;
|
|
|
|
|
uint64_t node_mem[MAX_NODES];
|
|
|
|
|
@@ -4418,6 +4420,8 @@ static void select_vgahw (const char *p)
|
|
|
|
|
} else if (strstart(p, "xenfb", &opts)) {
|
|
|
|
|
vga_interface_type = VGA_XENFB;
|
|
|
|
|
} else if (!strstart(p, "none", &opts)) {
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
invalid_vga:
|
|
|
|
|
fprintf(stderr, "Unknown vga type: %s\n", p);
|
|
|
|
|
@@ -5220,6 +5221,9 @@
|
|
|
|
|
exit(1);
|
|
|
|
|
@@ -5540,6 +5544,9 @@ int main(int argc, char **argv, char **e
|
|
|
|
|
old_param = 1;
|
|
|
|
|
break;
|
|
|
|
|
#endif
|
|
|
|
@ -34427,20 +34323,21 @@ Index: git/vl.c
|
|
|
|
|
case QEMU_OPTION_clock:
|
|
|
|
|
configure_alarms(optarg);
|
|
|
|
|
break;
|
|
|
|
|
@@ -5261,6 +5265,11 @@
|
|
|
|
|
}
|
|
|
|
|
@@ -5554,6 +5561,12 @@ int main(int argc, char **argv, char **e
|
|
|
|
|
}
|
|
|
|
|
configure_rtc(opts);
|
|
|
|
|
break;
|
|
|
|
|
+#ifdef TARGET_OPENGL_OK
|
|
|
|
|
+ case QEMU_OPTION_enable_gl:
|
|
|
|
|
+ fprintf(stderr, "Enabling opengl\n");
|
|
|
|
|
+ enable_gl = 1;
|
|
|
|
|
+ break;
|
|
|
|
|
+#endif
|
|
|
|
|
case QEMU_OPTION_tb_size:
|
|
|
|
|
tb_size = strtol(optarg, NULL, 0);
|
|
|
|
|
if (tb_size < 0)
|
|
|
|
|
@@ -5545,6 +5554,17 @@
|
|
|
|
|
exit(1);
|
|
|
|
|
@@ -5907,6 +5920,14 @@ int main(int argc, char **argv, char **e
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
+#ifdef TARGET_OPENGL_OK
|
|
|
|
@ -34448,12 +34345,32 @@ Index: git/vl.c
|
|
|
|
|
+ /* Use second serial port */
|
|
|
|
|
+ int opengl_serial = 1;
|
|
|
|
|
+
|
|
|
|
|
+ if (serial_devices[opengl_serial])
|
|
|
|
|
+ fprintf(stderr, "overriding second serial "
|
|
|
|
|
+ "port for OpenGL use\n");
|
|
|
|
|
+ serial_devices[opengl_serial] = "opengl";
|
|
|
|
|
+ add_device_config(DEV_SERIAL, "opengl");
|
|
|
|
|
+ }
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
if (monitor_device) {
|
|
|
|
|
monitor_hd = qemu_chr_open("monitor", monitor_device, NULL);
|
|
|
|
|
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
|
|
|
|
|
exit(1);
|
|
|
|
|
Index: qemu/qemu-options.hx
|
|
|
|
|
===================================================================
|
|
|
|
|
--- qemu.orig/qemu-options.hx 2010-05-11 18:05:22.959804376 -0400
|
|
|
|
|
+++ qemu/qemu-options.hx 2010-05-12 17:18:10.420907903 -0400
|
|
|
|
|
@@ -1783,6 +1783,18 @@ many timer interrupts were not processed
|
|
|
|
|
re-inject them.
|
|
|
|
|
ETEXI
|
|
|
|
|
|
|
|
|
|
+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
|
|
|
|
|
+ "-enable-gl\n")
|
|
|
|
|
+STEXI
|
|
|
|
|
+@item -enable-gl
|
|
|
|
|
+ETEXI
|
|
|
|
|
+
|
|
|
|
|
+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
|
|
|
|
|
+ "-force-pointer\n")
|
|
|
|
|
+STEXI
|
|
|
|
|
+@item -force-pointer
|
|
|
|
|
+ETEXI
|
|
|
|
|
+
|
|
|
|
|
DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
|
|
|
|
|
"-icount [N|auto]\n" \
|
|
|
|
|
" enable virtual instruction counter with 2^N clock ticks per\n" \
|
|
|
|
|