[vtkusers] Rendering slowed down after recent CVS update
Paul Melis
paul at science.uva.nl
Tue Jan 15 05:33:30 EST 2008
Hello,
I'm having a really hard time solving the following issue, perhaps
someone on the list has a good suggestion for the next step to take.
Some system details as background:
- Linux 2.6.17 Fedora Core 4 system w/ dual Xeon 2.4Ghz
- NVidia Quadro4 900 XGL card with 87.56 drivers on X.org 6.8.2, using
AGP 4x. Drivers have not been recently updated.
After using the CVS version of VTK for about a year without problems for
developing Python-based applications (both standalone as well as using
wxPython) I recently did a CVS update (few days ago) and recompiled from
scratch. Ever since I did this the graphics performance (read framerate)
has been horrible, even for the simplest VTK applications. Furthermore,
the framerate seemed to degrade with a larger viewport (together with
increased CPU usage) strongly suggesting that software rendering was
suddenly being used. However, I'm fairly certain that Mesa isn't used at
run-time because:
- The relevant Mesa flags in the CMake config were set to "off"
(VTK_USE_MANGLED_MESA and VTK_OPENGL_HAS_OSMESA) during build.
- A simple C++ VTK application showing a scene consisting of a single
cylinder with 6 sides is rendering very slow, while ldd shows it using
the same OpenGL libraries as other non-VTK OpenGL applications that
still run fine (Blender, OpenSceneGraph and some of my own GLUT-based
apps). These libs are /usr/lib/libGL.so.1 and /usr/lib/libGLcore.so.1,
btw. The former is definitely the NVidia library as it contains loads of
references to the word "NVidia".
I used the attached cone.py script to get some info on the RenderWindow
used and it tells me that it uses a vtkXOpenGLRenderWindow with direct
rendering. The ReportCapabilities() output is also showing it uses the
NVidia driver. Similarly, the Renderer used is a vtkOpenGLRenderer.
One strange thing running this test script revealed was that
multisampling was suddenly defaulting to 4 samples. Explicitly turning
it off with a call to renWin.SetMultiSamples(0) improved performance a
bit of course, but the framerate was still very poor (estimated 2-3 fps
on a single cone with 10 sides at 800x600 resolution). I'm not sure why
multisampling is defaulting to 4 suddenly, because I can't find any
reference to it being initialized to that value in the code. I'm not
overriding any settings with NVidia's environment variables, nor through
nvidia-settings.
I'm kind of suspecting that a different visual is being used now than
compared to the previous CVS version I used, one that isn't (fully)
hardware-accelerated, although it seems pretty unlikely. Perhaps this
has to do with the color depth of my X server (see diagnostics at the
end of this mail). I could not find an API call that returns the exact
visual used, is there one?
Any help with this would be greatly appreciated...
Regards,
Paul
Output from cone.py:
RenderWindow:
vtkXOpenGLRenderWindow (0x9008fa8)
Debug: Off
Modified Time: 146
Reference Count: 4
Registered Events: (none)
Erase: On
Window Name: Visualization Toolkit - OpenGL
Position: (0, 0)
Size: (800, 600)
Mapped: 1
OffScreenRendering: 0
Double Buffered: 1
DPI: 120
TileScale: (1, 1)
TileViewport: (0, 0, 1, 1)
Borders: On
IsPicking: Off
Double Buffer: On
Full Screen: Off
Renderers:
Debug: Off
Modified Time: 147
Reference Count: 1
Registered Events: (none)
Number Of Items: 1
Stereo Capable Window Requested: No
Stereo Render: Off
Point Smoothing: Off
Line Smoothing: Off
Polygon Smoothing: Off
Anti Aliased Frames: 0
Abort Render: 0
Current Cursor: 0
Desired Update Rate: 0.0001
Focal Depth Frames: 0
In Abort Check: 0
NeverRendered: 0
Interactor: 0x9007eb0
Motion Blur Frames: 0
Swap Buffers: On
Stereo Type: RedBlue
Number of Layers: 1
AccumulationBuffer Size 0
AlphaBitPlanes: Off
AnaglyphColorSaturation: 0.65
AnaglyphColorMask: 4 , 3
PainterDeviceAdapter:
Debug: Off
Modified Time: 143
Reference Count: 1
Registered Events: (none)
MultiSamples: 0
StencilCapable: False
ReportGraphicErrors: Off
ContextId: 0x9179428
Color Map: 56623105
Display Id: 0x913c4d8
Next Window Id: 0
Window Id: 56623106
Direct rendering: 1
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions: GLX_EXT_visual_info GLX_EXT_visual_rating
GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync
GLX_SGI_swap_control GLX_ARB_multisample GLX_NV_swap_group
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions: GLX_ARB_get_proc_address GLX_ARB_multisample
GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context
GLX_SGI_video_sync GLX_NV_swap_group GLX_NV_video_out GLX_SGIX_fbconfig
GLX_SGIX_pbuffer GLX_SGI_swap_control GLX_NV_float_buffer
GLX_ARB_fbconfig_float
glx extensions: GLX_EXT_visual_info GLX_EXT_visual_rating
GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync
GLX_SGI_swap_control GLX_ARB_multisample GLX_NV_swap_group
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro4 900 XGL/AGP/SSE2
OpenGL version string: 1.5.6 NVIDIA 87.56
OpenGL extensions: GL_ARB_depth_texture GL_ARB_imaging
GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query
GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite
GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100
GL_ARB_texture_border_clamp GL_ARB_texture_compression
GL_ARB_texture_cube_map GL_ARB_texture_env_add
GL_ARB_texture_env_combine GL_ARB_texture_env_dot3
GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle
GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object
GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_S3_s3tc
GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color
GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array
GL_EXT_Cg_shader GL_EXT_draw_range_elements GL_EXT_fog_coord
GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture
GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal
GL_EXT_secondary_color GL_EXT_separate_specular_color
GL_EXT_shadow_funcs GL_EXT_shared_texture_palette GL_EXT_stencil_wrap
GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map
GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object
GL_EXT_timer_query GL_EXT_vertex_array GL_HP_occlusion_test
GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat
GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color
GL_NV_depth_clamp GL_NV_fence GL_NV_fog_distance
GL_NV_light_max_exponent GL_NV_multisample_filter_hint
GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range
GL_NV_point_sprite GL_NV_register_combiners GL_NV_register_combiners2
GL_NV_texgen_reflection GL_NV_texture_compression_vtc
GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_NV_texture_shader
GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range
GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1
GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod
GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum
X Extensions: DOUBLE-BUFFER, SHAPE, MIT-SUNDRY-NONSTANDARD,
BIG-REQUESTS, SYNC, MIT-SCREEN-SAVER, XC-MISC, XFree86-VidModeExtension,
XFree86-Misc, XFree86-DGA, DPMS, TOG-CUP, Extended-Visual-Information,
XVideo, XVideo-MotionCompensation, X-Resource, GLX, RECORD, NV-GLX,
NV-CONTROL, MIT-SHM, XInputExtension, XTEST, XKEYBOARD, LBX,
XC-APPGROUP, SECURITY, XFIXES, XFree86-Bigfont, RENDER, RANDR, DAMAGE
Renderer:
vtkOpenGLRenderer (0x90085c8)
Debug: Off
Modified Time: 1221
Reference Count: 3
Registered Events:
Registered Observers:
vtkObserver (0x9007898)
Event: 3
EventName: StartEvent
Command: 0x9005bc8
Priority: 0
Tag: 1
Aspect: (1, 1)
PixelAspect: (1, 1)
Background: (0, 0, 0)
Viewport: (0, 0, 1, 1)
Displaypoint: (0, 0, 0)
Viewpoint: (0, 0, 0)
Worldpoint: (0, 0, 0, 0)
Pick Position X1 Y1: -1 -1
Pick Position X2 Y2: -1 -1
IsPicking boolean: 0
Props:
Debug: Off
Modified Time: 140
Reference Count: 1
Registered Events: (none)
Number Of Items: 1
PickResultProps:
NULL
Near Clipping Plane Tolerance: 0.001
Ambient: (1, 1, 1)
Backing Store: Off
Display Point: (0, 0, 0)
Lights:
Debug: Off
Modified Time: 134
Reference Count: 1
Registered Events: (none)
Number Of Items: 0
Light Follow Camera: On
View Point: (0, 0, 0)
Two Sided Lighting: On
Automatic Light Creation: On
Layer = 0
Interactive = On
Allocated Render Time: 10000
Last Time To Render (Seconds): -1
TimeFactor: 1
Erase: On
Draw: On
UseDepthPeeling: Off
OcclusionRation: 0
MaximumNumberOfPeels: 4
LastRenderingUsedDepthPeeling: Off
Number Of Lights Bound: 0
PickBuffer 0
PickedId0
NumPicked0
PickedZ 0
Some relevant info from /var/log/Xorg.0.log:
(II) Setting vga for screen 0.
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Enabling RENDER acceleration
(II) NVIDIA(0): NVIDIA GPU Quadro4 900 XGL at PCI:1:0:0
(--) NVIDIA(0): VideoRAM: 131072 kBytes
(--) NVIDIA(0): VideoBIOS: 04.25.00.29.06
(II) NVIDIA(0): Detected AGP rate: 4X
(--) NVIDIA(0): Interlaced video modes are supported on this GPU
(--) NVIDIA(0): Connected display device(s) on Quadro4 900 XGL at PCI:1:0:0:
(--) NVIDIA(0): Iiyama AS4314UT (CRT-1)
(--) NVIDIA(0): Iiyama AS4314UT (CRT-1): 350 MHz maximum pixel clock
(II) NVIDIA(0): Assigned Display Device: CRT-1
(WW) NVIDIA(0): No valid modes for "1600x1200"; removing.
(II) NVIDIA(0): Validated modes:
(II) NVIDIA(0): "1400x1050"
(II) NVIDIA(0): "1280x1024"
(II) NVIDIA(0): "1024x768"
(II) NVIDIA(0): "800x600"
(II) NVIDIA(0): "640x480"
(II) NVIDIA(0): Virtual screen size determined to be 1400 x 1050
(--) NVIDIA(0): DPI set to (95, 96); computed from "UseEdidDpi" X config
option
(--) Depth 24 pixmap format is 32 bpp
...
(II) Loading extension NV-GLX
(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized
(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture
...
(II) NVIDIA(0): Setting mode "1280x1024"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cone.py
Type: text/x-python
Size: 962 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080115/e3859e9a/attachment.py>
More information about the vtkusers
mailing list