[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] OpenGL for OS X
From: |
Philip Boulain |
Subject: |
Re: [Qemu-devel] [PATCH] OpenGL for OS X |
Date: |
Wed, 6 Feb 2008 12:39:36 +0000 |
On 6 Feb 2008, at 06:00, Gwenole Beauchesne wrote:
2008/2/5, Fabrice Bellard <address@hidden>:
This is an SDL related issue (i.e. SDL may or may not use OpenGL to
display graphics). Fixing SDL for Mac OS X would also be interesting.
I think SDL trunk (1.3) supports OpenGL rendering more specifically
for various platforms.
Besides, on my MacBook, fullscreen SDL with a HW surface can indeed
perform much better (550 Mpixels/sec) than fullscreen GL (190
Mpixels/sec). With a SW surface, results are equivalent to GL though.
In windowed (800x600) mode, SDL performs at 28 Mpixels/sec and GL at
150 Mpixels/sec. So, SDL 1.2 for OSX (CG?) in windowed mode is indeed
sub-optimal. I have not tried with SDL trunk yet.
You can get my tests as svn co
http://svn.beauchesne.info/svn/gwenole/projects/blitter-tests/trunk
blitter-tests
After some more figures? Modern MacBook Pro (ATI Radeon X1600),
just ./configure'd and make'd with defaults:
WINDOWED
X11 (Apple's server, circa OS X 10.4) best:
* Testing XShmPutImage()
607 frames in 10.0 secs, 60.53 fps, 47.600 Mpixels/sec
SDL (1.2.12 stable release) best:
* Testing SDL_Blit() with RGB masks 00ff0000,0000ff00,000000ff
600 frames in 10.0 secs, 59.86 fps, 47.078 Mpixels/sec
OpenGL (without pixel buffer objects; with was slower) best:
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
2628 frames in 10.0 secs, 262.67 fps, 206.571 Mpixels/sec
FULLSCREEN
X11 could only produce a screen-size window; it achieved 28.1 Mp/s
for comparison.
* Testing SDL_Blit() with RGB masks 00ff0000,0000ff00,000000ff
1379 frames in 10.0 secs, 137.78 fps, 178.558 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1845 frames in 10.0 secs, 184.37 fps, 238.945 Mpixels/sec
So, yes, can confirm that stable SDL is currently slooow in windowed
mode compared to OGL, and still slower in fullscreen. Interestingly,
use of pixel buffer objects made things /slower/ here. I noted very
heavy CPU activity for glperf for the GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE case, too (also the fastest, RECTANGLE_ARB
case, but this may have just been that it was shunting so much more
data).
Full details below.
LionsPhil
--- WINDOWED ---
#
# Running program x11perf
#
Global test configuration:
Per-test duration: 10 seconds
Display size: 1024x768, 24 bpp, windowed mode
* Testing XPutImage()
361 frames in 10.0 secs, 35.96 fps, 28.279 Mpixels/sec
* Testing XShmPutImage()
607 frames in 10.0 secs, 60.53 fps, 47.600 Mpixels/sec
#
# Running program sdlperf
#
Test global configuration:
Per-test duration: 10 seconds
Display size: 1024x768, 32 bpp, windowed mode, SW surface
* Testing SDL_Blit() with RGB masks 00ff0000,0000ff00,000000ff
600 frames in 10.0 secs, 59.86 fps, 47.078 Mpixels/sec
* Testing SDL_Blit() with RGB masks 000000ff,0000ff00,00ff0000
303 frames in 10.1 secs, 30.11 fps, 23.677 Mpixels/sec
#
# Running program glperf
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1024x768, 32 bpp, windowed mode
Use non-power-of-two textures : yes
Use pixel buffer objects : no
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
257 frames in 10.0 secs, 25.58 fps, 20.115 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
2397 frames in 10.0 secs, 239.56 fps, 188.395 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
1034 frames in 10.0 secs, 103.21 fps, 81.171 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
2618 frames in 10.0 secs, 261.62 fps, 205.744 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
259 frames in 10.1 secs, 25.75 fps, 20.251 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
2377 frames in 10.0 secs, 237.53 fps, 186.804 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
1034 frames in 10.0 secs, 103.22 fps, 81.179 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
2628 frames in 10.0 secs, 262.67 fps, 206.571 Mpixels/sec
#
# Running program glperf --pbo
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1024x768, 32 bpp, windowed mode
Use non-power-of-two textures : yes
Use pixel buffer objects : yes, copy mode
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
250 frames in 10.1 secs, 24.80 fps, 19.507 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
1579 frames in 10.0 secs, 157.79 fps, 124.091 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
1580 frames in 10.0 secs, 157.83 fps, 124.120 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
1580 frames in 10.0 secs, 157.91 fps, 124.182 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
251 frames in 10.1 secs, 24.95 fps, 19.620 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
1579 frames in 10.0 secs, 157.79 fps, 124.091 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
1580 frames in 10.0 secs, 157.87 fps, 124.157 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1579 frames in 10.0 secs, 157.79 fps, 124.091 Mpixels/sec
#
# Running program glperf --persistent-pbo
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1024x768, 32 bpp, windowed mode
Use non-power-of-two textures : yes
Use pixel buffer objects : yes, persistent mode
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
259 frames in 10.1 secs, 25.70 fps, 20.215 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
1469 frames in 10.0 secs, 146.78 fps, 115.435 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
1522 frames in 10.0 secs, 152.06 fps, 119.587 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
1522 frames in 10.0 secs, 152.06 fps, 119.587 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
260 frames in 10.0 secs, 25.87 fps, 20.348 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
1516 frames in 10.0 secs, 151.45 fps, 119.104 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
1521 frames in 10.0 secs, 151.96 fps, 119.509 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1521 frames in 10.0 secs, 151.99 fps, 119.533 Mpixels/sec
--- FULLSCREEN ---
#
# Running program x11perf
#
Global test configuration:
Per-test duration: 10 seconds
Display size: 1440x900, 24 bpp, fullscreen mode
* Testing XPutImage()
219 frames in 10.0 secs, 21.81 fps, 28.261 Mpixels/sec
* Testing XShmPutImage()
X SHM extension returned an error, disabling
218 frames in 10.1 secs, 21.68 fps, 28.100 Mpixels/sec
#
# Running program sdlperf
#
Test global configuration:
Per-test duration: 10 seconds
Display size: 1440x900, 32 bpp, fullscreen mode, SW surface
* Testing SDL_Blit() with RGB masks 00ff0000,0000ff00,000000ff
1379 frames in 10.0 secs, 137.78 fps, 178.558 Mpixels/sec
* Testing SDL_Blit() with RGB masks 000000ff,0000ff00,00ff0000
322 frames in 10.1 secs, 32.02 fps, 41.503 Mpixels/sec
#
# Running program glperf
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1440x900, 32 bpp, fullscreen mode
Use non-power-of-two textures : yes
Use pixel buffer objects : no
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
158 frames in 10.1 secs, 15.60 fps, 20.222 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
1412 frames in 10.0 secs, 141.06 fps, 182.812 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
669 frames in 10.0 secs, 66.71 fps, 86.460 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
1843 frames in 10.0 secs, 184.12 fps, 238.614 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
159 frames in 10.1 secs, 15.73 fps, 20.390 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
1532 frames in 10.0 secs, 153.06 fps, 198.369 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
668 frames in 10.0 secs, 66.67 fps, 86.409 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1845 frames in 10.0 secs, 184.37 fps, 238.945 Mpixels/sec
#
# Running program glperf --pbo
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1440x900, 32 bpp, fullscreen mode
Use non-power-of-two textures : yes
Use pixel buffer objects : yes, copy mode
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
152 frames in 10.1 secs, 15.00 fps, 19.446 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
1068 frames in 10.0 secs, 106.68 fps, 138.261 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
1071 frames in 10.0 secs, 106.94 fps, 138.594 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
1071 frames in 10.0 secs, 106.96 fps, 138.621 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
152 frames in 10.1 secs, 15.10 fps, 19.566 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
1072 frames in 10.0 secs, 107.05 fps, 138.737 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
1072 frames in 10.0 secs, 107.10 fps, 138.806 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1072 frames in 10.0 secs, 107.05 fps, 138.737 Mpixels/sec
#
# Running program glperf --persistent-pbo
#
OpenGL version : 2.0 ATI-1.4.56
OpenGL vendor : ATI Technologies Inc.
OpenGL renderer : ATI Radeon X1600 OpenGL Engine
OpenGL extensions:
GL_APPLE_client_storage
GL_APPLE_texture_range
GL_APPLE_packed_pixels
GL_EXT_abgr
GL_EXT_bgra
GL_ARB_shading_language_100
GL_ARB_fragment_program
GL_ARB_fragment_shader
GL_ARB_pixel_buffer_object
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_ARB_texture_non_power_of_two
GL_ARB_imaging
GL_SGI_color_matrix
Global test configuration:
Per-test duration: 10 seconds
Display size: 1440x900, 32 bpp, fullscreen mode
Use non-power-of-two textures : yes
Use pixel buffer objects : yes, persistent mode
Use Apple client storage extension : no
Use Apple texture range extension : no
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGB,
type GL_UNSIGNED_BYTE
158 frames in 10.1 secs, 15.64 fps, 20.270 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_RGBA,
type GL_UNSIGNED_BYTE
1038 frames in 10.0 secs, 103.63 fps, 134.310 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_BYTE
1038 frames in 10.0 secs, 103.64 fps, 134.323 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_2D, format GL_BGRA,
type GL_UNSIGNED_INT_8_8_8_8_REV
1039 frames in 10.0 secs, 103.77 fps, 134.480 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGB, type GL_UNSIGNED_BYTE
158 frames in 10.1 secs, 15.70 fps, 20.349 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_RGBA, type GL_UNSIGNED_BYTE
1015 frames in 10.0 secs, 101.39 fps, 131.399 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_BYTE
1039 frames in 10.0 secs, 103.74 fps, 134.453 Mpixels/sec
* Testing glTexSubImage2D with target GL_TEXTURE_RECTANGLE_ARB,
format GL_BGRA, type GL_UNSIGNED_INT_8_8_8_8_REV
1040 frames in 10.0 secs, 103.82 fps, 134.555 Mpixels/sec
Re: [Qemu-devel] [PATCH] OpenGL for OS X, Mike Kronenberg, 2008/02/16