[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] OpenGL for OS X
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH] OpenGL for OS X |
Date: |
Tue, 5 Feb 2008 10:05:38 +0100 |
On Feb 1, 2008, at 5:45 PM, Mike Kronenberg wrote:
After a little discussion on the list, I made this patch for
cocoa.m, to replace CoreGraphic by OpenGL.
Great! Thank you.
It's way faster than CG, but it requires a Mac with OpenGL capable
Graphics Card and at least 8mb of VRAM.
I think starting with G4 and Highend G3, this requirements are met.
Maybe I will try if I find some spare time, but as far as I know Apple
provides a quite powerful OpenGL emulation. Last time I ran osx on
Vesa output, everything worked just fine.
features:
[new] draws dirty lines of the window as needed, implemented with
OpenGL (used the extensions as proposed by Pierre)
[new] window can be resized
[fix] conditional builds for Leopard, without linking to a specific
sdk
[fix] lineflicker in fullscreen mode
The Question is, where to draw the line - or - if it needs a switch
for CG/OpenGL support for cocoa.
As this OpenGL implementation is based on the Apple pass-through
extensions, I don't think it'd make a good start for a generic
implementation. Additionally I believe SDL is a good choice for the
output too, as they implement optimizations for the specific
platforms. The only sad part is that I have not seen a 64-bit capable
SDL on Mac OS X ;-).
Please test and comment.
Mike
[1] http://www.kberg.ch/qemu/091patches/cocoa_m_OpenGL.diff.gz
Apart from this core dump which I received after playing a bit with an
ubuntu image, the patch looks fine to me. It's a lot faster than the
previous one.
Regards,
Alex
Process: qemu-system-x86_64 [58929]
Path: /Users/alex/Documents/business/suse/qemu.patches.mac/
qemu.nonpatched/qemu/x86_64-softmmu/qemu-system-x86_64
Identifier: qemu-system-x86_64
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [1763]
Date/Time: 2008-02-05 09:56:07.071 +0100
OS Version: Mac OS X 10.5.1 (9B18)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000239ae600
Crashed Thread: 0
Thread 0 Crashed:
0 libGLImage.dylib 0x00007fff8464e490 void
glgConvertTo_32<GLGConverter_ABGR8_ARGB8, (GLGMemory)1>(GLGOperation
const*, GLDPixelMode const*) + 96
1 libGLImage.dylib 0x00007fff84627eb3
glgProcessPixelsWithProcessor + 1187
2 ...er.AppleIntelGMA950GLDriver 0x0000000003599adc
glrLoadSysTexture + 4188
3 ...er.AppleIntelGMA950GLDriver 0x000000000357f8cc
glrLoadCurrentTextures + 556
4 ...er.AppleIntelGMA950GLDriver 0x00000000035b2f0a
gldUpdateDispatch + 394
5 GLEngine 0x0000000014cd8fee glBegin_Exec + 302
6 qemu-system-x86_64 0x0000000001089dca -[QemuCocoaView
drawRect:] + 506 (cocoa.m:384)
7 com.apple.AppKit 0x00007fff8396f479 -[NSView
_drawRect:clip:] + 3618
8 com.apple.AppKit 0x00007fff8396dfeb -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1234
9 com.apple.AppKit 0x00007fff8396e37e -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2149
10 com.apple.AppKit 0x00007fff8396c7c5 -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView
:] + 806
11 com.apple.AppKit 0x00007fff8396c06c -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView
:] + 328
12 com.apple.AppKit 0x00007fff839688dc -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] +
3008
13 com.apple.AppKit 0x00007fff838a63cd -[NSView
displayIfNeeded] + 1190
14 com.apple.AppKit 0x00007fff8395b90b -[NSWindow
_setFrameCommon:display:stashSize:] + 1615
15 com.apple.AppKit 0x00007fff839ae2e8
_NSMoveHelperTimerCallBack + 1115
16 com.apple.CoreFoundation 0x00007fff821ff5f5
CFRunLoopRunSpecific + 3813
17 com.apple.AppKit 0x00007fff83b0a5c6 -[NSMoveHelper
_doAnimation] + 1012
18 com.apple.AppKit 0x00007fff83b86af3 -[NSMoveHelper
_resizeWindow:toFrame:display:] + 535
19 com.apple.AppKit 0x00007fff83996c68 -[NSWindow
setFrame:display:animate:] + 955
20 qemu-system-x86_64 0x0000000001089979 -[QemuCocoaView
resizeContentToWidth:height:displayState:] + 1065 (cocoa.m:463)
21 qemu-system-x86_64 0x0000000001030957
vga_update_display + 2679 (vga.c:1495)
22 qemu-system-x86_64 0x0000000001007e4f gui_update + 15
(vl.c:7173)
23 qemu-system-x86_64 0x0000000001001cc6 qemu_run_timers
+ 54 (vl.c:1069)
24 qemu-system-x86_64 0x0000000001008b3a main_loop_wait +
650 (vl.c:7445)
25 qemu-system-x86_64 0x0000000001009ee1 qemu_main + 4817
(vl.c:7527)
26 qemu-system-x86_64 0x00000000010879fe -
[QemuCocoaAppController startEmulationWithArgc:argv:] + 14 (cocoa.m:855)
27 com.apple.Foundation 0x00007fff810399e0 _nsnote_callback
+ 112
28 com.apple.CoreFoundation 0x00007fff821e2846
_CFXNotificationPostNotification + 566
29 com.apple.Foundation 0x00007fff81036de6 -
[NSNotificationCenter postNotificationName:object:userInfo:] + 102
30 com.apple.AppKit 0x00007fff83930454 -[NSApplication
_postDidFinishNotification] + 104
31 com.apple.AppKit 0x00007fff8393037f -[NSApplication
_sendFinishLaunchingNotification] + 78
32 com.apple.AppKit 0x00007fff838a6c9d -
[NSApplication(NSAppleEventHandling) _handleAEOpen:] + 239
33 com.apple.AppKit 0x00007fff838a6582 -
[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
+ 84
34 com.apple.Foundation 0x00007fff8105dc27 -
[NSAppleEventManager
dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 375
35 com.apple.Foundation 0x00007fff8105da45
_NSAppleEventManagerGenericHandler + 117
36 com.apple.AE 0x00007fff833d3717
aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned
char*) + 123
37 com.apple.AE 0x00007fff833c138b
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 41
38 com.apple.AE 0x00007fff833c122d
aeProcessAppleEvent + 179
39 com.apple.HIToolbox 0x00007fff81659a77
AEProcessAppleEvent + 34
40 com.apple.AppKit 0x00007fff838a41d2 _DPSNextEvent +
1068
41 com.apple.AppKit 0x00007fff838a39fc -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 136
42 com.apple.AppKit 0x00007fff8389d796 -[NSApplication
run] + 455
43 qemu-system-x86_64 0x0000000001088313 main + 1651
(cocoa.m:982)
44 qemu-system-x86_64 0x0000000001001124 start + 52
Thread 1:
0 libSystem.B.dylib 0x00007fff819657de __semwait_signal
+ 10
1 libGLProgrammability.dylib 0x00007fff824aba7b glvmDoWork + 155
2 libSystem.B.dylib 0x00007fff8198c1e3 _pthread_start +
316
3 libSystem.B.dylib 0x00007fff8198c0a5 thread_start + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000280 rbx: 0x0000000000000a00 rcx:
0x0000000000000000 rdx: 0x00000000239ae600
rdi: 0x00007fff5fbf89f0 rsi: 0x0000000023adbf40 rbp:
0x00007fff5fbf8740 rsp: 0x00007fff5fbf8728
r8: 0x00000000239ae600 r9: 0x0000000023adc940 r10:
0x0000000023adbf40 r11: 0x00000000000001e1
r12: 0x0000000000000a00 r13: 0x0000000000000a00 r14:
0x00007fff5fbf87e0 r15: 0x0000000003894338
rip: 0x00007fff8464e490 rfl: 0x0000000000010246 cr2:
0x00000000239ae600
- [Qemu-devel] [PATCH] OpenGL for OS X, Mike Kronenberg, 2008/02/01
- Re: [Qemu-devel] [PATCH] OpenGL for OS X,
Alexander Graf <=
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Anthony Liguori, 2008/02/05
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Johannes Schindelin, 2008/02/05
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Anthony Liguori, 2008/02/05
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Fabrice Bellard, 2008/02/05
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Gwenole Beauchesne, 2008/02/06
- Re: [Qemu-devel] [PATCH] OpenGL for OS X, Philip Boulain, 2008/02/06
Re: [Qemu-devel] [PATCH] OpenGL for OS X, Mike Kronenberg, 2008/02/16