Description of problem: The current Mesa packages provided in Fedora 29 (18.3.4-1.fc29) contain a debug Mesa build. This means that the build includes a lot of extra performance-impacting debug assertions and validation. In particular, it includes extra shader validation at pipeline creation time in RADV, which leads to extremely long loading times in Vulkan games. https://bugs.freedesktop.org/show_bug.cgi?id=109939 - this Mesa bug report has a comment from a user reporting long loading times in Rise of the Tomb Raider on Fedora, and I am able to reproduce the same on the current Fedora 29 packages (takes 20 minutes to load the largest level in the game compared to 2 minutes on a release build that I have done myself). From looking at the spec file (https://src.fedoraproject.org/rpms/mesa/blob/8410b5cfd86eda6e01fc435a9088401a3e9f17c0/f/mesa.spec), the buildtype option isn't being passed to meson - the default without this is debugoptimized (compiled with optimization but includes asserts/validation/etc). -Dbuildtype=release is needed for a release build. Spec file in current master also has the same problem so presumably rawhide is affected too. Version-Release number of selected component (if applicable): 18.3.4-1.fc29
We use buildtype=plain which is intended to be used in distributions. Please open upstream issue (for mesa) if that is causing problems.
I don't see how it's not your bug that right now you are currently shipping a package that causes severe issues for users? The documentation for buildtype=plain says "no extra build flags are used, even for compiler warnings, useful for distro packagers and other cases where you need to specify all arguments by yourself". "need to specify all arguments by yourself" - you are not specifying -DNDEBUG, if upstream were to add it in that case it would be going against the specified behaviour of plain?
I think you need to add -Db_ndebug=true.
meson-0.50.0-2.fc29 mesa-18.3.5-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bd5988554
meson-0.50.0-2.fc30 mesa-19.0.0-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-adc3f3e82e
mesa-19.0.0-2.fc30, meson-0.50.0-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-adc3f3e82e
For posterity, the workaround is: https://github.com/mesonbuild/meson/commit/da1bb49787b2f65ca3a4c3c3fb0d9eda822f3275 And it's properly fixed by: https://github.com/mesonbuild/meson/commit/d88bf0eb80e2531a8017de4efd4eb02f1e3081ec
mesa-18.3.5-2.fc29, meson-0.50.0-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bd5988554
Tested mesa-18.3.5-2.fc29 and can confirm that it is no longer a debug build, and solves the issue with long load times in Rise of the Tomb Raider. Thanks.
mesa-18.3.5-2.fc29, meson-0.50.0-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
mesa-19.0.0-2.fc30, meson-0.50.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
This change is causing packages that rely on assert() to break, see e.g. bug 1696264. Any reason you can't just add -Db_ndebug to the mesa build, instead of changing the behaviour of the build system?
Traditionally, some packages expect to be compiled with NDEBUG and others simply don't. It's kinda expected that this change will break packages that haven't tested release builds. Keep in mind this is just making plain builds (distro builds) more similar to release builds.