Bug 105262 - [R600] [BISECTED] ttf fonts are invisible in many programs
Summary: [R600] [BISECTED] ttf fonts are invisible in many programs
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 22:10 UTC by Pavel Vinogradov
Modified: 2018-03-05 19:16 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
gvim main window as an example (14.26 KB, image/png)
2018-02-26 22:10 UTC, Pavel Vinogradov
Details
Xorg.log (44.16 KB, text/plain)
2018-02-26 22:17 UTC, Pavel Vinogradov
Details
LO Writer example (75.05 KB, image/png)
2018-02-27 23:47 UTC, Pavel Vinogradov
Details
copy over export color mask (532 bytes, patch)
2018-03-03 01:58 UTC, Roland Scheidegger
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Vinogradov 2018-02-26 22:10:13 UTC
Created attachment 137622 [details]
gvim main window as an example

Video: Radeon 4650HD PRO
Xorg: 1.19.6
Kernel: 4.15.6

Non-TTF fonts are rendered fine. Also, Firefox and LibreOffice can render TTF in their work areas, but not in gtk interface.

Mesa 17.3.5 is unaffected.

Attached screenshot illustrates the bug.
Comment 1 Pavel Vinogradov 2018-02-26 22:17:04 UTC
Created attachment 137623 [details]
Xorg.log

Xorg.log with today's build of mesa from git.
Comment 2 LoneVVolf 2018-02-27 22:55:47 UTC
This looks very similar to my issue, see 
https://bbs.archlinux.org/viewtopic.php?id=234852

The libreoffice screenshots shown at https://ask.libreoffice.org/en/question/90910/writer-displays-no-text/ are almost exactly what i encounter.

Going back in the log of my package manager i have been able to narrow the cause down somewhat.

https://cgit.freedesktop.org/mesa/mesa/commit/?id=2f0db33527fc5415858e60d76d5b82c5492151fa from 2018-01-31 works

https://cgit.freedesktop.org/mesa/mesa/commit/?id=3f7a7bd897ce4d7da50d4f25b1549001abef05cc from 2018-02-08 fails

The cause should be somewhere between these two commits.

Pavel, could you check the libreoffice screenshots to verify we have the same issue ?
Comment 3 Pavel Vinogradov 2018-02-27 23:47:02 UTC
Created attachment 137675 [details]
LO Writer example
Comment 4 Pavel Vinogradov 2018-02-27 23:51:39 UTC
I got a bit different picture here. Added attachment above. Menus and tooltips aren't rendered. The text is fine.

(In reply to LoneVVolf from comment #2)
> This looks very similar to my issue, see 
> https://bbs.archlinux.org/viewtopic.php?id=234852
> 
> The libreoffice screenshots shown at
> https://ask.libreoffice.org/en/question/90910/writer-displays-no-text/ are
> almost exactly what i encounter.
> 
> Going back in the log of my package manager i have been able to narrow the
> cause down somewhat.
> 
> https://cgit.freedesktop.org/mesa/mesa/commit/
> ?id=2f0db33527fc5415858e60d76d5b82c5492151fa from 2018-01-31 works
> 
> https://cgit.freedesktop.org/mesa/mesa/commit/
> ?id=3f7a7bd897ce4d7da50d4f25b1549001abef05cc from 2018-02-08 fails
> 
> The cause should be somewhere between these two commits.
> 
> Pavel, could you check the libreoffice screenshots to verify we have the
> same issue ?
Comment 5 LoneVVolf 2018-02-28 11:22:02 UTC
Installed gvim to verify, and that has no menus AND shows no text.
It looks like both of us have the same issue, but i have an additonal one: no text at all in affected programs.

I'm running archlinux x86_64 with xf86-video-ati on an AMD HD 4870.
xorg 1.19.6, kernel 4.15.5
 
programs without text in menus on my system : 
openbox, lxde, gvim, libreoffice, firefox gtk-filechooser, thunderbird gtk-filechooser

No issues at all in qt programs like lxqt, kwin, gwenview , okular, calligra .

Could you verify whether qt programs have issues ?
Comment 6 LoneVVolf 2018-02-28 11:25:22 UTC
It appears most recent commits wrt r600 were written by Dave Airlie.
Added him to CC list
Comment 7 LoneVVolf 2018-02-28 16:46:40 UTC
I started bisecting this. Had to move head several times due to build failures and runtime problems, but managed to find some more good commits.

$ git bisect log
git bisect start
# good: [aa2f609f7009199999f824970f9c13f016994364] broadcom/vc5: Ignore samplers for finding uniform offsets.
git bisect good aa2f609f7009199999f824970f9c13f016994364
# bad: [3f7a7bd897ce4d7da50d4f25b1549001abef05cc] r600: implement tg4 integer workaround. (v2)
git bisect bad 3f7a7bd897ce4d7da50d4f25b1549001abef05cc
# good: [4081e088962315b5c3f4e7030868faf01e7c4a69] winsys/amdgpu: allow non page-aligned size bo creation from pointer
git bisect good 4081e088962315b5c3f4e7030868faf01e7c4a69
$
Comment 8 Pavel Vinogradov 2018-03-01 02:39:40 UTC
Sorry, no qt stuff here, but I have rxvt-unicode with the same problem. So, it's not gtk specific.

(In reply to LoneVVolf from comment #5)
> Installed gvim to verify, and that has no menus AND shows no text.
> It looks like both of us have the same issue, but i have an additonal one:
> no text at all in affected programs.
> 
> I'm running archlinux x86_64 with xf86-video-ati on an AMD HD 4870.
> xorg 1.19.6, kernel 4.15.5
>  
> programs without text in menus on my system : 
> openbox, lxde, gvim, libreoffice, firefox gtk-filechooser, thunderbird
> gtk-filechooser
> 
> No issues at all in qt programs like lxqt, kwin, gwenview , okular, calligra
> .
> 
> Could you verify whether qt programs have issues ?
Comment 9 LoneVVolf 2018-03-02 00:59:59 UTC
# first bad commit: [5b14e06d8b42e2b08ebc52b6c314ef8647d87a1f] r600: work out shader export mask at shader build time (v1.1)

mesa-git from this commit on doesn't render TTF fonts anymore in openbox, gvim, libreoffice, rxvt-unicode and firefox / thunderbird gtk-interfaces .
qt programs don't appear to be affected.

Affected videocards :
Radeon 4650HD Pro
Radeon HD 4870 with AMD RV770 chipset
Comment 10 LoneVVolf 2018-03-02 11:06:07 UTC
The first bad commit was submitted by Dave Airlie and reviewed by Roland Scheidegger

Added Roland Scheidegger to CC List.
Comment 11 Roland Scheidegger 2018-03-03 01:58:56 UTC
Created attachment 137762 [details] [review]
copy over export color mask

Would this patch help?
I think the r600 code forgot to copy over the export mask (at least the eg code does it).
Comment 12 LoneVVolf 2018-03-04 16:47:07 UTC
Patch applied to trunk rev 411aa8c322f6703b20d32c7c263fd7ea8639cf3f cleanly and appears to solve all problems.

Pavel, can you or other sourcemage users with r600 cards also test ?
Comment 13 Pavel Vinogradov 2018-03-04 19:07:14 UTC
Confirmed, the patch works. Thank you all for quick solution.

(In reply to LoneVVolf from comment #12)
> Patch applied to trunk rev 411aa8c322f6703b20d32c7c263fd7ea8639cf3f cleanly
> and appears to solve all problems.
> 
> Pavel, can you or other sourcemage users with r600 cards also test ?
Comment 14 Roland Scheidegger 2018-03-05 19:16:29 UTC
Fixed by 434523cf2a6738b0250de2a0e36e93b13f88832a.
Thanks for bisecting!


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.