Commit Graph

28407 Commits

Author SHA1 Message Date
espes 0772f947c9 get rid of texture state struct 2014-05-29 00:32:48 +10:00
espes 56df8b58e3 fix compilation with gcc 2014-05-29 00:25:43 +10:00
espes 4ea5b61461 Correct 16-bit color formats.. 2014-05-28 01:16:28 +10:00
espes 344f0b2e2f move vertex dmas out of kelvin 2014-05-27 16:05:09 +10:00
espes ece3b714fa somewhat more correct vertex program output fix... 2014-05-27 16:05:02 +10:00
espes dad84440f9 silly log2 rounded the wrong way 2014-05-26 23:05:56 +10:00
espes 88de3488d9 texture format fixes; swizzled surface, courtesy of JayFoxRox 2014-05-26 05:08:30 +10:00
Jannik Vogel dc70d18040 Close opened files 2014-05-26 05:04:52 +10:00
espes 2c4571a3cd Initial integration of JayFoxRox's GLSL vertex program translator 2014-05-26 05:04:47 +10:00
espes 7eb49195f0 initial support for PVIDEO 2014-05-03 03:03:13 +10:00
espes b6bf7e751c few extra texture formats courtesy of blueshogun 2014-05-02 04:06:46 +10:00
espes ce9d484ab0 minor nv2a fixes 2014-04-27 15:16:53 +10:00
espes 308a719ef5 hack up rtc for xbox :/ 2014-04-27 15:15:51 +10:00
espes a604e498e4 nope 2014-04-27 15:12:07 +10:00
espes 06f324848d things are even *less* broken if we undo the perspecive divide proper 2013-11-23 11:31:58 +11:00
espes fa46a9eaa5 nv2a_psh tweaks 2013-11-23 11:17:30 +11:00
espes 720b776eda mipmaps, fix inline diffuse 2013-11-23 09:56:10 +11:00
espes 7792a89829 things are a lot less broken if we assume shaders preform the perspective divide... 2013-11-22 16:49:29 +11:00
espes c769f3de88 memory leak... 2013-11-22 16:39:53 +11:00
espes e98ca035ee fixed function viewport handling; implement flip_stall; cleanups... 2013-11-21 07:56:16 +11:00
espes b062d9f4a6 fixed function composite transform; combiner constants 2013-11-18 06:45:38 +11:00
espes dd7f22b07d initial fixed function stuff; texture unswizzling 2013-11-17 16:26:24 +11:00
espes ef7f80bb86 kinda handle immediate-mode vertex stuff; refactoring 2013-11-15 13:47:24 +11:00
Marc-André Lureau 7af215ee16 vga: fix invalid read after free
After calling dpy_gfx_replace_surface(s->con, surface), the outer
surface is invalid.

==5370== Invalid read of size 4
==5370==    at 0x460229: surface_bits_per_pixel (console.h:250)
==5370==    by 0x466A81: get_depth_index (vga.c:1173)
==5370==    by 0x467EC2: vga_draw_graphic (vga.c:1718)
==5370==    by 0x4687A5: vga_update_display (vga.c:1914)
==5370==    by 0x2A782E: qxl_hw_update (qxl.c:1766)
==5370==    by 0x3EB83B: graphic_hw_update (console.c:254)
==5370==    by 0x3FBE31: qemu_spice_display_refresh (spice-display.c:418)
==5370==    by 0x2A7D01: display_refresh (qxl.c:1886)
==5370==    by 0x3EEE1C: dpy_refresh (console.c:1436)
==5370==    by 0x3EB543: gui_update (console.c:192)
==5370==    by 0x3C43B3: timerlist_run_timers (qemu-timer.c:488)
==5370==    by 0x3C4416: qemu_clock_run_timers (qemu-timer.c:499)
==5370==  Address 0x22ffb1e0 is 0 bytes inside a block of size 56 free'd
==5370==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==5370==    by 0x4245FC: free_and_trace (vl.c:2771)
==5370==    by 0x50899AE: g_free (gmem.c:252)
==5370==    by 0x3EE8D3: qemu_free_displaysurface (console.c:1332)
==5370==    by 0x3EEDB7: dpy_gfx_replace_surface (console.c:1427)
==5370==    by 0x467EB6: vga_draw_graphic (vga.c:1714)
==5370==    by 0x4687A5: vga_update_display (vga.c:1914)
==5370==    by 0x2A782E: qxl_hw_update (qxl.c:1766)
==5370==    by 0x3EB83B: graphic_hw_update (console.c:254)
==5370==    by 0x3FBE31: qemu_spice_display_refresh (spice-display.c:418)
==5370==    by 0x2A7D01: display_refresh (qxl.c:1886)
==5370==    by 0x3EEE1C: dpy_refresh (console.c:1436)

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1383664554-15248-1-git-send-email-marcandre.lureau@gmail.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-11-14 23:30:15 +11:00
espes 0611af4d25 LOL ram 2013-11-14 10:00:35 +11:00
espes 755005cb8c shader caching 2013-11-14 09:53:39 +11:00
espes 14ac13f70b terrible fragment shader generation 2013-11-14 09:52:30 +11:00
espes 8b3628cb39 cleanups.. 2013-11-13 21:15:52 +11:00
espes 41fda5fc25 share more graphics state proper or something 2013-11-13 21:14:13 +11:00
espes 7116f4eb13 cleanups to context creation; handle 0 viewport z scale 2013-09-12 04:04:11 +10:00
espes ca76432648 nv2a: clear rectangles; fix surface upload; start unfucking pgraph state 2013-09-06 06:01:27 +10:00
espes 35c578eedf ...and I still screw it up 2013-09-05 08:07:44 +10:00
espes b37d82f35c functional gamepad emulation :) 2013-09-05 07:46:46 +10:00
espes 761d06bab6 ohci: fix handling of transfer underruns
See:
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/USB/DevOHCI.cpp#L2343
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/USB/DevOHCI.cpp#L2363
2013-09-05 01:45:37 +10:00
espes 7b4fdbb60b finally fix up irq routing 2013-08-29 16:47:33 +10:00
espes 2c88de84af initial skeleton xid driver 2013-08-29 16:32:34 +10:00
espes 10d5d5925c push cpu-modified backbuffer to opengl and debug cleanups 2013-08-25 15:33:19 +10:00
espes 37b20e9b14 fix IMAGE_BLIT derp 2013-08-24 16:16:42 +10:00
espes 5cc6ebf9bd let lpc47m157 control its own serial devices 2013-08-24 16:11:26 +10:00
espes 4a23de0a88 move xbox hardware to hw/xbox 2013-08-21 18:06:10 +10:00
espes 8b5cf2082a significant windpl modifications 2013-08-20 23:34:49 +10:00
espes 63fcf45a9b commit windpl 2013-08-20 23:29:08 +10:00
espes 3a7b7d4978 build fixes for merge 2013-08-20 16:46:49 +10:00
espes ff3f9be0e2 Merge tag 'v1.6.0' into xbox
Conflicts:
	block/Makefile.objs
	configure
	hw/Makefile.objs
	hw/audio/ac97.c
	hw/i386/Makefile.objs
	hw/ide/core.c
	ui/console.c
2013-08-19 22:46:10 +10:00
espes 7e5839472d super barebones xdk superio chip 2013-08-19 22:06:51 +10:00
Anthony Liguori 5a5b5e74ce main-loop: drop the BQL if the I/O appears to be spinning
The char-flow refactoring introduced a busy-wait that depended on
an action from the VCPU thread.  However, the VCPU thread could
never take that action because the busy-wait starved the VCPU thread
of the BQL because it never dropped the mutex while running select.

Paolo doesn't want to drop this optimization for fear that we will
stop detecting these busy waits.  I'm afraid to keep this optimization
even with the busy-wait fixed because I think a similar problem can
occur just with heavy I/O thread load manifesting itself as VCPU pauses.

As a compromise, introduce an artificial timeout after a thousand
iterations but print a rate limited warning when this happens.  This
let's us still detect when this condition occurs without it being
a fatal error.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1365169560-11012-1-git-send-email-aliguori@us.ibm.com
2013-08-19 21:50:41 +10:00
Anthony Liguori 1ee2daeb64 Update version for 1.6.0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-15 13:41:43 -05:00
Aurelien Jarno cc413a3935 mips_malta: do not raise exceptions when accessing invalid memory
Since commit c658b94f6e, MIPS raises
exceptions when accessing invalid memory. This is not the correct
behaviour for MIPS Malta Core LV, as the GT-64120A system controller
just ignore undecoded access. This feature is used by the Linux kernel
to probe for some devices.

Emulate the correct behaviour in QEMU by adding an empty slot covering
the entire memory space decoded by the GT-64120A.

Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-08-14 16:47:30 +02:00
M. Mohan Kumar 8b7a5415f9 block: Dont ignore previously set bdrv_flags
bdrv_flags is set by bdrv_parse_discard_flags(), but later it is reset
to zero.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Message-id: 1376483201-13466-1-git-send-email-mohan@in.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-14 08:34:00 -05:00
James Hogan 3a3567d337 qemu-char: fix infinite recursion connecting to monitor pty
Since commit bd5c51e (qemu-char: don't issue CHR_EVENT_OPEN in a BH), an
infinite recursion occurs when putting the monitor on a pty (-monitor
pty) and connecting a terminal to the slave port.

This is because of the qemu_chr_be_event(s, CHR_EVENT_OPENED) added to
qemu_chr_be_generic_open(). This event is captured by monitor_event()
which prints a welcome message to the character device. The flush of
that welcome message retriggers another open event in pty_chr_state()
because it checks s->connected, but only sets it to 1 after calling
qemu_chr_be_generic_open().

I've fixed this by setting s->connected = 1 before the call to
qemu_chr_be_generic_open() instead of after, so that the recursive
pty_chr_state() doesn't call it again.

An example snippet of repeating backtrace:
 ...
 #107486 0x007aec58 in monitor_flush (mon=0xf418b0) at qemu/monitor.c:288
 #107487 0x007aee7c in monitor_puts (mon=0xf418b0, str=0x1176d07 "") at qemu/monitor.c:322
 #107488 0x007aef20 in monitor_vprintf (mon=0xf418b0, fmt=0x8d4820 "QEMU %s monitor - type 'help' for more information\n",
     ap=0x7f432be0) at qemu/monitor.c:339
 #107489 0x007aefac in monitor_printf (mon=0xf418b0, fmt=0x8d4820 "QEMU %s monitor - type 'help' for more information\n")
     at qemu/monitor.c:347
 #107490 0x007ba4bc in monitor_event (opaque=0xf418b0, event=2) at qemu/monitor.c:4699
 #107491 0x00684c28 in qemu_chr_be_event (s=0xf37788, event=2) at qemu/qemu-char.c:108
 #107492 0x00684c70 in qemu_chr_be_generic_open (s=0xf37788) at qemu/qemu-char.c:113
 #107493 0x006880a4 in pty_chr_state (chr=0xf37788, connected=1) at qemu/qemu-char.c:1145
 #107494 0x00687fa4 in pty_chr_update_read_handler (chr=0xf37788) at qemu/qemu-char.c:1121
 #107495 0x00687c9c in pty_chr_write (chr=0xf37788, buf=0x70b3c008 <Address 0x70b3c008 out of bounds>, len=538720)
     at qemu/qemu-char.c:1063
 #107496 0x00684cc4 in qemu_chr_fe_write (s=0xf37788, buf=0x70b3c008 <Address 0x70b3c008 out of bounds>, len=538720)
     at qemu/qemu-char.c:118
 ...

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Message-id: 1375960178-10882-1-git-send-email-james.hogan@imgtec.com
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-13 13:24:50 -05:00