i915_drv OpenGL very CPU intensive under Qt5/QtQuick 2
Submitted by jps..@..on.net
Assigned to Ian Romanick
Description
Hi, I am testing Qt5/QtQuick 2 on an admittedly old desktop with an Intel Corporation 82915G/GV/910GL Integrated Graphics Controller. The issue I'm seeing is very high i915_drv CPU usage for all QML scripts. The problem is related to the way QtQuick 2 renders: entire scene redraws are triggered on each change in the scene (rather than simply redrawing what has in fact changed). For example, a static full screen scene with a text field in the center is fully redrawn on each cursor blink. The result is continual very high (60-80% ) CPU usage. Here is a partial (oprofile) report (approx 5-10 sec):
CPU: P4 / Xeon, speed 3200.2 MHz (estimated)
samples % image name symbol name 100478 30.4292 i915_dri.so fetch_texel_2d_A_UNORM8 55176 16.7097 i915_dri.so fetch_vector4 42980 13.0162 i915_dri.so _mesa_execute_program 25721 7.7895 i915_dri.so store_vector4 20444 6.1913 i915_dri.so linear_texel_locations 19952 6.0423 i915_dri.so _mesa_unpack_ubyte_rgba_row 11530 3.4918 i915_dri.so sample_linear_2d 10194 3.0872 i915_dri.so unpack_uint_z_Z24_UNORM_X8_UINT 7353 2.2268 i915_dri.so _swrast_write_rgba_span 6993 2.1178 i915_dri.so pack_uint_Z24_UNORM_S8_UINT 3505 1.0615 i915_dri.so __x86.get_pc_thunk.bx 3229 0.9779 i915_dri.so fetch_texel_lod 2717 0.8228 i915_dri.so _swrast_exec_fragment_program 2562 0.7759 no-vmlinux /no-vmlinux 2379 0.7205 i915_dri.so fetch_vector1 1609 0.4873 i915_dri.so blend_general 1503 0.4552 i915_dri.so blend_general_float.isra.1 1459 0.4418 libc-2.20.so _int_free 1414 0.4282 libc-2.20.so malloc 1197 0.3625 i915_dri.so general_triangle 1190 0.3604 libc-2.20.so _int_malloc 1095 0.3316 i915_dri.so _swrast_depth_test_span 952 0.2883 i915_dri.so _mesa_convert_colors 372 0.1127 i915_dri.so pack_row_ubyte_B8G8R8A8_UNORM 290 0.0878 i915_dri.so run_vp 262 0.0793 libQt5Quick.so.5.4.0 /usr/lib/libQt5Quick.so.5.4.0 219 0.0663 i915_dri.so _mesa_pack_ubyte_rgba_row 196 0.0594 i915_dri.so _mesa_get_format_bytes 179 0.0542 i915_dri.so _swrast_span_interpolate_z 175 0.0530 libc-2.20.so free 170 0.0515 libQt5Core.so.5.4.0 /usr/lib/libQt5Core.so.5.4.0
In comparison, if I uninstall the i915_drv to force the use of the llvm swast driver I get 25% CPU usage, still too high, but much lower than i915_drv.
Can anyone familiar with the i915_drv code think of where the bottleneck is occurring and possibly suggest code modifications which might improve things here? Note that using Qt4 or Qt5 OpenGL Widget-based GUIs with the i915_drv driver presents no problems, the problem lies squarely with the implementation of QtQuick 2 in that most rendering decisions have been off-loaded to the GPU and associated driver). I'd be happy to test patches and even mess with the code. Any help or suggestions would be greatly appreciated.
thanks much for your time, John
Version: 10.4