beproudstandupcom / pyglet

Automatically exported from code.google.com/p/pyglet
0 stars 0 forks source link

Awful framerate on Ubuntu with an Intel 945GM/GMS/940GML Express chipset #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The tests were running at, seriously, 2-3 seconds per frame.

I did a little digging and I found out that glXWaitVideoSyncSGI is blocking
for a second or so each call.
I add some debugging statements to flip() in
pyglet/window/xlib/__init__.py and this is what I discovered;
 - glXWaitVideoSyncSGI is returning GLX_BAD_CONTEXT, which means the
context isn't direct according to the documentation.
 - but a call to self._context.is_direct() {which just calls
glXIsDirect()} returns True.

Paste in the output of tools/info.py:
bonfyre@xxarg:~/programming/pyglet/pyglet$ env PYTHONPATH=. python
tools/info.py
Platform instance is <pyglet.window.xlib.XlibPlatform object at 0xb768db2c>
Display instance is <pyglet.window.xlib.XlibDisplayDevice object at 0xb7d9a08c>
Screens:
  XlibScreen(screen=0, x=0, y=0, width=1280, height=800, xinerama=0)
Creating default context...
GL attributes:
double_buffer=1 stereo=0 buffer_size=32 aux_buffers=0 sample_buffers=0
samples=0 red_size=8 green_size=8 blue_size=8 alpha_size=8
depth_size=24 stencil_size=8 accum_red_size=0 accum_green_size=0
accum_blue_size=0 accum_alpha_size=0
GL version: 1.3 Mesa 6.5.2
GL vendor: Tungsten Graphics, Inc
GL renderer: Mesa DRI Intel(R) 945GM 20061017 x86/MMX/SSE2
GL extensions:
  GL_ARB_texture_compression GL_SGI_color_matrix GL_EXT_cull_vertex
  GL_IBM_rasterpos_clip GL_EXT_clip_volume_hint GL_SGIX_depth_texture
  GL_MESA_window_pos GL_OES_read_format GL_EXT_blend_color
  GL_EXT_blend_subtract GL_EXT_subtexture GL_NV_texgen_reflection
  GL_EXT_stencil_wrap GL_EXT_texture_edge_clamp GL_EXT_texture_rectangle
  GL_IBM_texture_mirrored_repeat GL_ARB_window_pos
  GL_APPLE_packed_pixels GL_EXT_compiled_vertex_array GL_ARB_shadow
  GL_ARB_texture_mirrored_repeat GL_ARB_vertex_program GL_EXT_histogram
  GL_ARB_texture_env_dot3 GL_3DFX_texture_compression_FXT1 GL_EXT_bgra
  GL_SGIS_texture_edge_clamp GL_ARB_depth_texture GL_EXT_copy_texture
  GL_ARB_texture_env_combine GL_NV_vertex_program1_1
  GL_ARB_vertex_buffer_object GL_EXT_rescale_normal
  GL_SGIS_texture_border_clamp GL_EXT_shadow_funcs GL_ARB_imaging
  GL_EXT_point_parameters GL_SUN_multi_draw_arrays GL_EXT_convolution
  GL_APPLE_client_storage GL_ARB_fragment_program
  GL_EXT_separate_specular_color GL_NV_vertex_program
  GL_EXT_texture_env_add GL_EXT_texture3D GL_EXT_packed_pixels
  GL_ARB_multitexture GL_NV_blend_square GL_EXT_secondary_color
  GL_EXT_blend_func_separate GL_EXT_texture GL_EXT_texture_env_combine
  GL_EXT_blend_equation_separate GL_EXT_texture_object
  GL_ARB_texture_rectangle GL_EXT_texture_lod_bias GL_EXT_vertex_array
  GL_MESA_pack_invert GL_NV_texture_rectangle GL_SGI_color_table
  GL_ARB_transpose_matrix GL_EXT_abgr GL_MESA_ycbcr_texture
  GL_EXT_multi_draw_arrays GL_ARB_texture_env_add GL_ARB_multisample
  GL_SGIS_generate_mipmap GL_ARB_texture_border_clamp GL_EXT_fog_coord
  GL_EXT_polygon_offset GL_EXT_texture_filter_anisotropic
  GL_NV_light_max_exponent GL_EXT_blend_minmax GL_ARB_texture_cube_map
  GL_INGR_blend_func_separate GL_ARB_texture_env_crossbar
  GL_SGIS_texture_lod GL_EXT_draw_range_elements
  GL_ATI_blend_equation_separate GL_ARB_point_parameters
  GL_EXT_texture_env_dot3
GLU version: 1.3
GLU extensions:
  GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess

Context is XlibGLContext()
GLX is direct
GLX server vendor: SGI
GLX server version: 1.2
GLX server extensions:
  GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_texture_from_pixmap
  GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_copy_sub_buffer
  GLX_OML_swap_method GLX_SGI_make_current_read GLX_SGI_swap_control
  GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_visual_select_group
GLX client vendor: SGI
GLX client version: 1.4
GLX client extensions:
  GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context
  GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_allocate_memory
  GLX_MESA_copy_sub_buffer GLX_MESA_swap_control
  GLX_MESA_swap_frame_usage GLX_OML_swap_method GLX_OML_sync_control
  GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync
  GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer
  GLX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap
GLX extensions:
  GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context
  GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_allocate_memory
  GLX_MESA_copy_sub_buffer GLX_MESA_swap_control
  GLX_MESA_swap_frame_usage GLX_OML_swap_method
  GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync
  GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_visual_select_group

Any additional info (platform/language/hardware) that may be relevant?
bonfyre@xxarg:~/programming/pyglet/pyglet$ uname -a
Linux xxarg 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686
GNU/Linux
bonfyre@xxarg:~/programming/pyglet/pyglet$ lspci | grep Display
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML
Express Integrated Graphics Controller (rev 03)

Original issue reported on code.google.com by Bonf...@gmail.com on 18 Jul 2007 at 9:35

GoogleCodeExporter commented 9 years ago
This doesn't occur on the Windows XP installation of the same machine. Driver 
issue 
I guess.

Original comment by Bonf...@gmail.com on 18 Jul 2007 at 11:39

GoogleCodeExporter commented 9 years ago
Try r1052, I've added support for MESA_swap_control and SGI_swap_control.  Use::

python tests/test.py WINDOW_SET_VSYNC

Original comment by Alex.Hol...@gmail.com on 18 Jul 2007 at 1:30

GoogleCodeExporter commented 9 years ago
It runs at a decent speed now. But WINDOW_SET_VSYNC doesn't quite pass. With 
vsync
off there is tearing as expected; but with it on, the window is a dithered 
browny
colour with occasional tearing.

Original comment by Bonf...@gmail.com on 19 Jul 2007 at 11:54

GoogleCodeExporter commented 9 years ago
Sounds ok to me, closing issue.

Original comment by Alex.Hol...@gmail.com on 19 Jul 2007 at 12:44