Bug 110502 - Steam client has graphical glitches
Summary: Steam client has graphical glitches
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/Iris (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-24 04:54 UTC by leozinho29_eu
Modified: 2019-09-25 18:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description leozinho29_eu 2019-04-24 04:54:11 UTC
The Steam client has graphical bugs, mainly on the window borders. While they are minor and does not seem to affect the usability, they are very noticeable. The image from https://i.imgur.com/6eNstFa.png shows the problem on window borders.

Processor: Intel Core i3-6100U;
Video: Intel HD Graphics 520;
Architecture: amd64;
Mesa: 19.1.0-devel (git-21223acf7d);
Kernel version: 4.18.0-17-lowlatency;
Distribution: Xubuntu 18.04.2 amd64.
Comment 1 Sergii Romantsov 2019-04-26 11:37:25 UTC
As workaround can be used LIBGL_DRI3_DISABLE=1 - with than here is no mis-rendering.
Comment 2 leozinho29_eu 2019-04-26 23:03:02 UTC
This option makes Steam crash here. The gdb output is:

Installing breakpad exception handler for appid(steam)/version(1555457005)
warning: Error reading shared library list entry at 0x4b40
warning: Error reading shared library list entry at 0x6ae0
warning: Corrupted shared library list: 0x569f0ac0 != 0x636f6c2f
steam: ../src/gallium/drivers/iris/iris_resource.c:813: iris_resource_from_handle: Assertiva “res->bo->tiling_mode == isl_tiling_to_i915_tiling(res->surf.tiling)” falhou.

Program received signal SIGABRT, Aborted.
0xf7fd5939 in __kernel_vsyscall ()
(gdb) bt
#0  0xf7fd5939 in __kernel_vsyscall ()
#1  0xf7a1f832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xf7a20cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xf7a177bb in ?? () from /lib/i386-linux-gnu/libc.so.6
#4  0xf7a17819 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
#5  0xf6e0c9d1 in iris_resource_from_handle (pscreen=0x569b1da8, templ=0xffffa92c, whandle=0xffffa910, usage=1)
    at ../src/gallium/drivers/iris/iris_resource.c:777
#6  0xf67d5a6e in dri2_allocate_textures (ctx=0x569fdc80, drawable=0x56b71930, statts=0x56b71ecc, 
    statts_count=2) at ../src/gallium/state_trackers/dri/dri2.c:606
#7  0xf67d68ce in dri_st_framebuffer_validate (stctx=0x56b644e0, stfbi=0x56b71930, statts=0x56b71ecc, count=2, 
    out=0xffffaa50) at ../src/gallium/state_trackers/dri/dri_drawable.c:85
#8  0xf695ea62 in st_framebuffer_validate (stfb=0x56b71b40, st=st@entry=0x56b644e0)
    at ../src/mesa/state_tracker/st_manager.c:222
#9  0xf695eda3 in st_api_make_current (stapi=0xf7403100 <st_gl_api>, stctxi=0x56b644e0, stdrawi=0x56b71930, 
    streadi=0x56b71930) at ../src/mesa/state_tracker/st_manager.c:1082
#10 0xf67d62b3 in dri_make_current (cPriv=0x569fdc60, driDrawPriv=0x56b71900, driReadPriv=0x56b71900)
    at ../src/gallium/state_trackers/dri/dri_context.c:301
#11 0xf67cff8f in driBindContext (pcp=0x569fdc60, pdp=0x56b71900, prp=0x56b71900)
    at ../src/mesa/drivers/dri/common/dri_util.c:579
#12 0xf7615a4a in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#13 0xf75eb8f4 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#14 0xf75ebb16 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#15 0xf76ab05f in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
#16 0xf76abab5 in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
#17 0xf76ad0ad in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
#18 0x565a9411 in CBaseLinuxUpdateUI::GatherGLInfo() ()
#19 0x565a997f in CBaseLinuxUpdateUI::BaseCreateWindow() ()
#20 0x565aa4fe in CXWindowsUpdateUI::BCreateWindow() ()
#21 0x5658e5a4 in ?? ()
#22 0x565793ac in ?? ()
#23 0xf7a0ae81 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
#24 0x5657ce09 in _start ()
Comment 3 Denis 2019-05-16 15:32:51 UTC
Hi, agree, that flag works only for apitrace madden. And crashes steam. Investigating
Comment 4 asimiklit 2019-06-13 13:18:48 UTC
(In reply to leozinho29_eu from comment #2)
> This option makes Steam crash here. The gdb output is:
> 
> Installing breakpad exception handler for appid(steam)/version(1555457005)
> warning: Error reading shared library list entry at 0x4b40
> warning: Error reading shared library list entry at 0x6ae0
> warning: Corrupted shared library list: 0x569f0ac0 != 0x636f6c2f
> steam: ../src/gallium/drivers/iris/iris_resource.c:813:
> iris_resource_from_handle: Assertiva “res->bo->tiling_mode ==
> isl_tiling_to_i915_tiling(res->surf.tiling)” falhou.
> 
> Program received signal SIGABRT, Aborted.
> 0xf7fd5939 in __kernel_vsyscall ()
> (gdb) bt
> #0  0xf7fd5939 in __kernel_vsyscall ()
> #1  0xf7a1f832 in raise () from /lib/i386-linux-gnu/libc.so.6
> #2  0xf7a20cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
> #3  0xf7a177bb in ?? () from /lib/i386-linux-gnu/libc.so.6
> #4  0xf7a17819 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
> #5  0xf6e0c9d1 in iris_resource_from_handle (pscreen=0x569b1da8,
> templ=0xffffa92c, whandle=0xffffa910, usage=1)
>     at ../src/gallium/drivers/iris/iris_resource.c:777
> #6  0xf67d5a6e in dri2_allocate_textures (ctx=0x569fdc80,
> drawable=0x56b71930, statts=0x56b71ecc, 
>     statts_count=2) at ../src/gallium/state_trackers/dri/dri2.c:606
> #7  0xf67d68ce in dri_st_framebuffer_validate (stctx=0x56b644e0,
> stfbi=0x56b71930, statts=0x56b71ecc, count=2, 
>     out=0xffffaa50) at ../src/gallium/state_trackers/dri/dri_drawable.c:85
> #8  0xf695ea62 in st_framebuffer_validate (stfb=0x56b71b40,
> st=st@entry=0x56b644e0)
>     at ../src/mesa/state_tracker/st_manager.c:222
> #9  0xf695eda3 in st_api_make_current (stapi=0xf7403100 <st_gl_api>,
> stctxi=0x56b644e0, stdrawi=0x56b71930, 
>     streadi=0x56b71930) at ../src/mesa/state_tracker/st_manager.c:1082
> #10 0xf67d62b3 in dri_make_current (cPriv=0x569fdc60,
> driDrawPriv=0x56b71900, driReadPriv=0x56b71900)
>     at ../src/gallium/state_trackers/dri/dri_context.c:301
> #11 0xf67cff8f in driBindContext (pcp=0x569fdc60, pdp=0x56b71900,
> prp=0x56b71900)
>     at ../src/mesa/drivers/dri/common/dri_util.c:579
> #12 0xf7615a4a in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> #13 0xf75eb8f4 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> #14 0xf75ebb16 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> #15 0xf76ab05f in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> #16 0xf76abab5 in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> #17 0xf76ad0ad in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> #18 0x565a9411 in CBaseLinuxUpdateUI::GatherGLInfo() ()
> #19 0x565a997f in CBaseLinuxUpdateUI::BaseCreateWindow() ()
> #20 0x565aa4fe in CXWindowsUpdateUI::BCreateWindow() ()
> #21 0x5658e5a4 in ?? ()
> #22 0x565793ac in ?? ()
> #23 0xf7a0ae81 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
> #24 0x5657ce09 in _start ()

I have been investigating the mentioned Steam crash.
I managed to reproduce this crash just under CFL+manjaro+LIBGL_DRI3_DISABLE=1
I found out that the crash happens due to fail of a "isl_surf_init" function
in "iris_resource_from_handle". The "isl_surf_init" function fails due
to incorrect parameters which are passed to it:

info->width        = 400
info->height       = 129
info->row_pitch_B  = 1536
info->format       = 233 (ISL_FORMAT_B8G8R8X8_UNORM)
info->tiling_flags = X-tiling mode

The "isl_surf_init" fails on function "isl_calc_row_pitch" because "min_row_pitch_B" calculated as 2048 byte. So according to row_pitch_B=1536 we calculate incorrectly a X-Tiling blocks quantity needed to cover 400pixels. There is not enough 1536/512=3blocks because one block according to PRM cover just 128pixels (for 32bpp). So 3blocks could cover just 384pixels. (hope B8G8R8X8 has 32bpp for Intel case because
I didn't find anything about 24bit case with X-Tiling in PRMs)


But at same time on KBL+ubuntu19.10+LIBGL_DRI3_DISABLE=1 this crash doesn't appear at all. This fact was interesting for me and I checked the params different so under KBL+ubuntu19.10:

info->width        = 400
info->height       = 129
info->row_pitch_B  = 2048
info->format       = 233 (ISL_FORMAT_B8G8R8X8_UNORM)
info->tiling_flags = X-tiling mode

So for some reason XServer under KBL+ubuntu19.10 calculates it correctly.
"info->row_pitch_B" came from: 
DRI2GetBuffersWithFormat glx/dri2.c:465
line: "buffers[i].pitch = repBuffer.pitch;"

So now I am trying to find the location of the code which processing X_DRI2GetBuffersWithFormat request and calculates this 'pitch'. But unfortunately looks like XServer delegates the 'pitch' calculations to some other place. Please let me know If somebody know the location where this 'pitch' is calculated.

Note: I used the same Mesa revision on both machines 17c2c9cd677
Comment 5 Denis 2019-06-18 14:29:01 UTC
(In reply to asimiklit from comment #4)
> (In reply to leozinho29_eu from comment #2)
> > This option makes Steam crash here. The gdb output is:
> > 
> > Installing breakpad exception handler for appid(steam)/version(1555457005)
> > warning: Error reading shared library list entry at 0x4b40
> > warning: Error reading shared library list entry at 0x6ae0
> > warning: Corrupted shared library list: 0x569f0ac0 != 0x636f6c2f
> > steam: ../src/gallium/drivers/iris/iris_resource.c:813:
> > iris_resource_from_handle: Assertiva “res->bo->tiling_mode ==
> > isl_tiling_to_i915_tiling(res->surf.tiling)” falhou.
> > 
> > Program received signal SIGABRT, Aborted.
> > 0xf7fd5939 in __kernel_vsyscall ()
> > (gdb) bt
> > #0  0xf7fd5939 in __kernel_vsyscall ()
> > #1  0xf7a1f832 in raise () from /lib/i386-linux-gnu/libc.so.6
> > #2  0xf7a20cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
> > #3  0xf7a177bb in ?? () from /lib/i386-linux-gnu/libc.so.6
> > #4  0xf7a17819 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
> > #5  0xf6e0c9d1 in iris_resource_from_handle (pscreen=0x569b1da8,
> > templ=0xffffa92c, whandle=0xffffa910, usage=1)
> >     at ../src/gallium/drivers/iris/iris_resource.c:777
> > #6  0xf67d5a6e in dri2_allocate_textures (ctx=0x569fdc80,
> > drawable=0x56b71930, statts=0x56b71ecc, 
> >     statts_count=2) at ../src/gallium/state_trackers/dri/dri2.c:606
> > #7  0xf67d68ce in dri_st_framebuffer_validate (stctx=0x56b644e0,
> > stfbi=0x56b71930, statts=0x56b71ecc, count=2, 
> >     out=0xffffaa50) at ../src/gallium/state_trackers/dri/dri_drawable.c:85
> > #8  0xf695ea62 in st_framebuffer_validate (stfb=0x56b71b40,
> > st=st@entry=0x56b644e0)
> >     at ../src/mesa/state_tracker/st_manager.c:222
> > #9  0xf695eda3 in st_api_make_current (stapi=0xf7403100 <st_gl_api>,
> > stctxi=0x56b644e0, stdrawi=0x56b71930, 
> >     streadi=0x56b71930) at ../src/mesa/state_tracker/st_manager.c:1082
> > #10 0xf67d62b3 in dri_make_current (cPriv=0x569fdc60,
> > driDrawPriv=0x56b71900, driReadPriv=0x56b71900)
> >     at ../src/gallium/state_trackers/dri/dri_context.c:301
> > #11 0xf67cff8f in driBindContext (pcp=0x569fdc60, pdp=0x56b71900,
> > prp=0x56b71900)
> >     at ../src/mesa/drivers/dri/common/dri_util.c:579
> > #12 0xf7615a4a in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> > #13 0xf75eb8f4 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> > #14 0xf75ebb16 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
> > #15 0xf76ab05f in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> > #16 0xf76abab5 in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> > #17 0xf76ad0ad in ?? () from /usr/lib/i386-linux-gnu/libGLX.so.0
> > #18 0x565a9411 in CBaseLinuxUpdateUI::GatherGLInfo() ()
> > #19 0x565a997f in CBaseLinuxUpdateUI::BaseCreateWindow() ()
> > #20 0x565aa4fe in CXWindowsUpdateUI::BCreateWindow() ()
> > #21 0x5658e5a4 in ?? ()
> > #22 0x565793ac in ?? ()
> > #23 0xf7a0ae81 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
> > #24 0x5657ce09 in _start ()
> 
> I have been investigating the mentioned Steam crash.
> I managed to reproduce this crash just under CFL+manjaro+LIBGL_DRI3_DISABLE=1
> I found out that the crash happens due to fail of a "isl_surf_init" function
> in "iris_resource_from_handle". The "isl_surf_init" function fails due
> to incorrect parameters which are passed to it:
> 
> info->width        = 400
> info->height       = 129
> info->row_pitch_B  = 1536
> info->format       = 233 (ISL_FORMAT_B8G8R8X8_UNORM)
> info->tiling_flags = X-tiling mode
> 
> The "isl_surf_init" fails on function "isl_calc_row_pitch" because
> "min_row_pitch_B" calculated as 2048 byte. So according to row_pitch_B=1536
> we calculate incorrectly a X-Tiling blocks quantity needed to cover
> 400pixels. There is not enough 1536/512=3blocks because one block according
> to PRM cover just 128pixels (for 32bpp). So 3blocks could cover just
> 384pixels. (hope B8G8R8X8 has 32bpp for Intel case because
> I didn't find anything about 24bit case with X-Tiling in PRMs)
> 
> 
> But at same time on KBL+ubuntu19.10+LIBGL_DRI3_DISABLE=1 this crash doesn't
> appear at all. This fact was interesting for me and I checked the params
> different so under KBL+ubuntu19.10:
> 
> info->width        = 400
> info->height       = 129
> info->row_pitch_B  = 2048
> info->format       = 233 (ISL_FORMAT_B8G8R8X8_UNORM)
> info->tiling_flags = X-tiling mode
> 
> So for some reason XServer under KBL+ubuntu19.10 calculates it correctly.
> "info->row_pitch_B" came from: 
> DRI2GetBuffersWithFormat glx/dri2.c:465
> line: "buffers[i].pitch = repBuffer.pitch;"
> 
> So now I am trying to find the location of the code which processing
> X_DRI2GetBuffersWithFormat request and calculates this 'pitch'. But
> unfortunately looks like XServer delegates the 'pitch' calculations to some
> other place. Please let me know If somebody know the location where this
> 'pitch' is calculated.
> 
> Note: I used the same Mesa revision on both machines 17c2c9cd677

Today after a Steam upgrade the crash disappeared.
So at the moment it works fine with iris driver under CFL+manjaro+LIBGL DRI3_DISABLE=1
But unfortunately the original bug with graphical glitches is still there.
Comment 6 GitLab Migration User 2019-09-25 18:47:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1355.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.