Bug 247138 - graphics/mesa-dri: No blur effect in PLasma 5 and QML (again)
Summary: graphics/mesa-dri: No blur effect in PLasma 5 and QML (again)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL: https://reviews.freebsd.org/D25265
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-10 08:14 UTC by Roman
Modified: 2020-06-16 15:40 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman 2020-06-10 08:14:14 UTC
After upgrading to 19.0.8_2, I again had problems with transparency in Plasma 5 and QML. The same bug was 230772: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230772 . You may see examples in this bug.

Simple code to reproduce a bug with any picture:

import QtQuick 2.0
import QtGraphicalEffects 1.0

Item {
    width: 300
    height: 300

    Image {
        id: bug
        source: "images/bug.png"
        sourceSize: Qt.size(parent.width, parent.height)
        smooth: true
        visible: false
    }

    FastBlur {
        anchors.fill: bug
        source: bug
        radius: 64.0
    }
}
Comment 1 Niclas Zeising freebsd_committer 2020-06-10 08:48:39 UTC
There has been some changes to mesa in the last couple of days.  Is this still a problem with the latest version of mesa-libs and mesa-dri from ports?
Comment 2 Roman 2020-06-10 08:58:58 UTC
And I have a red video in Zoom conference in Firefox browser.
I updated the system today through pkg, using the latest branch. And I have And now I have mesa-dri-19.0.8_2
Comment 3 Niclas Zeising freebsd_committer 2020-06-10 09:35:11 UTC
(In reply to Roman from comment #2)

The latest version of mesa-dri is 19.0.8_4 and the latest version of mesa-libs is 19.0.8_1.  They have probably not reached the package servers yet, but will in a couple of days.
Comment 4 Roman 2020-06-10 09:40:27 UTC
(In reply to Niclas Zeising from comment #3)
OBS Studio recording video in black and white.
Ok, I will try to compile this port from ports.
Comment 5 Roman 2020-06-10 12:47:56 UTC
(In reply to Niclas Zeising from comment #3)
The problem still exist after I compiled and installed latest version form ports:

# pkg info mesa-dri
mesa-dri-19.0.8_4
Name           : mesa-dri
Version        : 19.0.8_4
Installed on   : Wed Jun 10 15:43:28 2020 MSK

# pkg info mesa-libs
mesa-libs-19.0.8_1
Name           : mesa-libs
Version        : 19.0.8_1
Installed on   : Wed Jun 10 15:43:11 2020 MSK

I compiled with default options.
Comment 6 Roman 2020-06-10 14:05:36 UTC
I downgraded graphics/mesa-dri port to revision 537998, compiled and installed. This did not solve the problem.

After I downgraded graphics/mesa-dri port to revision 534936, compiled and installed. And that solved the problem.

I do not know what the problem was, in meson or something else.

But now i have mesa-libs compiled with meson (port version 19.0.8_1) and mesa-dri compiled without meson (port version 19.0.8 revision 534936). And it is look well.
Comment 7 Roman 2020-06-11 15:05:40 UTC
I tried the latest version of the port (19.0.8_5). The problem still exists for me. At the moment I am using revision 534936, it does not have this problem.
Some information about my system (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230772 for more information):

# uname -a
FreeBSD 12.1-RELEASE-p5 FreeBSD 12.1-RELEASE-p5 GENERIC  amd64

# pkg info | grep drm
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS components
libdrm-2.4.102,1               Userspace interface to kernel Direct Rendering Module services

# Xorg -version

X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 12.1-RELEASE-p5 amd64 
Current Operating System: FreeBSD 12.1-RELEASE-p5 FreeBSD 12.1-RELEASE-p5 GENERIC amd64
Build Date: 06 June 2020  12:53:38PM
 
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.

vgapci0@pci0:0:2:0:     class=0x030000 card=0x17011d72 chip=0x59178086 rev=0x07 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'UHD Graphics 620'
    class      = display
    subclass   = VGA
Comment 8 Serge Volkov 2020-06-12 20:32:48 UTC
I tried the latest versions of the mesa-libs-19.0.8_1 and mesa-dri-19.0.8_6. And I have the same problems. Also on the greeter screen of SDDM all text labels became invisible. If I add `export QSG_DISTANCEFIELD_ANTIALIASING=gray` to /etc/xprofile, then text labels becomes normal. But the problem with transparency in Plasma 5 using a variable QSG_DISTANCEFIELD_ANTIALIASING is not solved.

Maybe it looks like a bug 241506?
Comment 9 Roman 2020-06-14 07:25:02 UTC
Yes, it looks the same. But, as far as I see, port 19.0.8_6 contains a patch from bug 241506
Comment 10 Jan Beich freebsd_committer 2020-06-14 07:28:58 UTC
(In reply to Roman from comment #9)
> port 19.0.8_6 contains a patch from bug 241506

Where? files/patch-configure is gone ports r537998 but https://gitlab.freedesktop.org/mesa/mesa/commit/b4f508ab5990 wasn't backported.
Comment 11 Roman 2020-06-14 07:35:05 UTC
(In reply to Jan Beich from comment #10)

Oh, sorry, my mistake. I looked this up for another revision.
Comment 12 Niclas Zeising freebsd_committer 2020-06-14 08:25:05 UTC
(In reply to Roman from comment #11)

Can you try the patch in https://reviews.freebsd.org/D25265 ?
It should fix this, as well as a couple of other misc fixes I found when working on this.
Comment 13 Roman 2020-06-14 08:55:22 UTC
(In reply to Niclas Zeising from comment #12)

I applied the patch from https://reviews.freebsd.org/D25265 to mesa-dri v19.0.8_6. The compilation process ended without problems. After restarting X session, the problem disappeared for me.
Comment 14 Serge Volkov 2020-06-14 18:49:22 UTC
I confirm. I applied the patch from https://reviews.freebsd.org/D25265 too. And the problem has disappeared for me too.
Comment 15 commit-hook freebsd_committer 2020-06-16 15:38:53 UTC
A commit references this bug:

Author: zeising
Date: Tue Jun 16 15:38:31 UTC 2020
New revision: 539358
URL: https://svnweb.freebsd.org/changeset/ports/539358

Log:
  graphics/mesa: Fix minor issues from meson switch

  Fix a couple of minor issues with mesa related ports after the switch to
  meson.
  Define _GNU_SOURCE when building on FreeBSD.  This fixes blur effects in
  Plasma 5 and issues with the SDDM greeter.  This fix was originally applied
  in r516100 but got lost in the switch to meson. [1]
  Properly detect sys/sysctl.h on FreeBSD.  On FreeBSD sys/sysctl.h needs
  sys/types.h as well, patch the meson build script to take this into account.
  Fix a broken sed command to properly set ${LOCALBASE}/etc and
  ${LOCALBASE}/share/ as appropriate.

  Bump portrevision of all mesa related ports.

  PR:		247138 [1]
  Reported by:	Roman [1]
  Reviewed by:	manu
  Tested by:	Roman, Serge Volkov
  Differential Revision:	https://reviews.freebsd.org/D25265

Changes:
  head/graphics/libosmesa/Makefile
  head/graphics/libxatracker/Makefile
  head/graphics/mesa-dri/Makefile
  head/graphics/mesa-dri/Makefile.targets
  head/graphics/mesa-dri/files/patch-meson.build
  head/graphics/mesa-libs/Makefile
  head/lang/clover/Makefile
Comment 16 Niclas Zeising freebsd_committer 2020-06-16 15:40:23 UTC
Committed, thanks for help in diagnosing and testing the fix!