User avatar
dan_in_sd
Posts: 35
Joined: Tue Jul 10, 2012 11:19 pm
Location: San Diego, CA, USA

GLX optimizations?

Sun Dec 28, 2014 11:33 pm

hello,

Not sure if this is the place for this, but i installed the Raspian 'wheezy' image 2014-12-22 and then installed mesa utilitiiies with sudo apt-get install mesa-utils

Performance of glxgears command shows just 20 fps as seen here :( . while 'top' shows 56% CPU utilization for glxgears

94 frames in 5.0 seconds = 18.744 FPS
95 frames in 5.0 seconds = 18.850 FPS
95 frames in 5.0 seconds = 18.928 FPS
97 frames in 5.0 seconds = 19.362 FPS

Q: Is there something that can be done to improve GLX performance?

H/W info: R-pi model B+ , overclocked to 1.0Ghz,

UPDATE: I ran rpi-update. It did not help

Output from glxgears -info:

Code: Select all

[email protected] ~ $ glxgears -info
GL_RENDERER   = Software Rasterizer
GL_VERSION    = 2.1 Mesa 8.0.5
GL_VENDOR     = Mesa Project
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture .................snip....
Output from glxinfo:

Code: Select all

[email protected] ~ $ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, 
    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_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_multithread_makecurrent, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_EXT_texture_from_pixmap
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 8.0.5
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture, 
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object, 
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture, 
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters, 
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters, 
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color, 
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_ARB_multitexture, GL_IBM_multimode_draw_arrays, 
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix, 
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 
    GL_EXT_secondary_color, GL_EXT_texture_env_add, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias, 
    GL_INGR_blend_func_separate, GL_MESA_resize_buffers, GL_NV_blend_square, 
    GL_NV_light_max_exponent, GL_NV_texgen_reflection, 
    GL_NV_texture_env_combine4, GL_SUN_multi_draw_arrays, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_EXT_framebuffer_object, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_MESA_window_pos, GL_NV_packed_depth_stencil, 
    GL_NV_texture_rectangle, GL_NV_vertex_program, GL_ARB_depth_texture, 
    GL_ARB_occlusion_query, GL_ARB_shadow, GL_ARB_shadow_ambient, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_window_pos, GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, 
    ....snip...
RPI #1: Model B | Over-clocked | XBMC | RPI #2: Model B+ 512MB | Beautiful metal case from Lukse.LT | RPI #3: PI2 with Camera, 64GB USB Flash and Wi-Fi

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: GLX optimizations?

Mon Dec 29, 2014 7:26 am

Overclock some more... ;-)

And stop watching "Reefer Madness"
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

User avatar
PeterO
Posts: 5152
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLX optimizations?

Mon Dec 29, 2014 8:41 am

AFAIK OpenGL is software rendered. If you want faster performance currently you need to switch to OpenGL-ES (until the OpenGL gpu integration is done).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: GLX optimizations?

Mon Dec 29, 2014 8:45 am

dan_in_sd wrote:hello,

Not sure if this is the place for this, but i installed the Raspian 'wheezy' image 2014-12-22 and then installed mesa utilitiiies with sudo apt-get install mesa-utils

Performance of glxgears command shows just 20 fps as seen here :( . while 'top' shows 56% CPU utilization for glxgears

94 frames in 5.0 seconds = 18.744 FPS
95 frames in 5.0 seconds = 18.850 FPS
95 frames in 5.0 seconds = 18.928 FPS
97 frames in 5.0 seconds = 19.362 FPS

Q: Is there something that can be done to improve GLX performance?

H/W info: R-pi model B+ , overclocked to 1.0Ghz,

UPDATE: I ran rpi-update. It did not help

Output from glxgears -info:

Code: Select all

[email protected] ~ $ glxgears -info
GL_RENDERER   = Software Rasterizer
GL_VERSION    = 2.1 Mesa 8.0.5
GL_VENDOR     = Mesa Project
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture .................snip....
Output from glxinfo:

Code: Select all

[email protected] ~ $ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, 
    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_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_multithread_makecurrent, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_EXT_texture_from_pixmap
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 8.0.5
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture, 
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object, 
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture, 
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters, 
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters, 
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color, 
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_ARB_multitexture, GL_IBM_multimode_draw_arrays, 
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix, 
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 
    GL_EXT_secondary_color, GL_EXT_texture_env_add, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias, 
    GL_INGR_blend_func_separate, GL_MESA_resize_buffers, GL_NV_blend_square, 
    GL_NV_light_max_exponent, GL_NV_texgen_reflection, 
    GL_NV_texture_env_combine4, GL_SUN_multi_draw_arrays, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_EXT_framebuffer_object, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_MESA_window_pos, GL_NV_packed_depth_stencil, 
    GL_NV_texture_rectangle, GL_NV_vertex_program, GL_ARB_depth_texture, 
    GL_ARB_occlusion_query, GL_ARB_shadow, GL_ARB_shadow_ambient, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_window_pos, GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, 
    ....snip...
anholt.livejournal.com

Try the HARDWARE driver. The software one is useless.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24175
Joined: Sat Jul 30, 2011 7:41 pm

Re: GLX optimizations?

Mon Dec 29, 2014 9:42 am

The SW driver clearly isn't 'useless'

It works exactly as expected.

But to the OP, the glxgears stuff uses software rendering because it's in OpenGL, but the GPU on the Pi uses OpenGL ES. If you modified the glxgears stuff to use ES, you would get 100's of frames per second.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: GLX optimizations?

Mon Dec 29, 2014 9:44 am

jamesh wrote:The SW driver clearly isn't 'useless'

It works exactly as expected.

But to the OP, the glxgears stuff uses software rendering because it's in OpenGL, but the GPU on the Pi uses OpenGL ES. If you modified the glxgears stuff to use ES, you would get 100's of frames per second.
But is too slow, ...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24175
Joined: Sat Jul 30, 2011 7:41 pm

Re: GLX optimizations?

Mon Dec 29, 2014 9:47 am

mimi123 wrote:
jamesh wrote:The SW driver clearly isn't 'useless'

It works exactly as expected.

But to the OP, the glxgears stuff uses software rendering because it's in OpenGL, but the GPU on the Pi uses OpenGL ES. If you modified the glxgears stuff to use ES, you would get 100's of frames per second.
But is too slow, ...
For what?

When I was learning 3D we were lucky to get a frame rendered every half an hour....
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: GLX optimizations?

Mon Dec 29, 2014 10:47 am

If you're particularly bored , you can try this OpenGL to OpenGL
ES translator.

http://www.raspberrypi.org/forums/viewt ... 78&t=63264

It might or might not be what you are looking for.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: GLX optimizations?

Mon Dec 29, 2014 12:58 pm

ghans wrote:If you're particularly bored , you can try this OpenGL to OpenGL
ES translator.

http://www.raspberrypi.org/forums/viewt ... 78&t=63264

It might or might not be what you are looking for.

ghans
OpenGL 1.x only...

JeffD
Posts: 16
Joined: Tue Jul 02, 2013 2:52 am
Location: Nova Scotia, Canada

Re: GLX optimizations?

Mon Jan 26, 2015 4:50 am

There is an old thread that shows glxgears converted to gles 1.x and 2.0 for the Rpi.

http://www.raspberrypi.org/forums/viewtopic.php?t=50418

Return to “Advanced users”