Bug 98518

Summary: [r600g, bisected] regression: NI/Turks MSAA texture corruption with FreeCAD and Wine games
Product: Mesa Reporter: Dieter Nützel <Dieter>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: CLOSED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium CC: emil.l.velikov
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: FreeCAD-MSAA-8x-Texure-Bug.png
LS2015-Wine-nine-MSAA-2x+-Texure-Bug.png

Description Dieter Nützel 2016-10-31 18:34:45 UTC
Created attachment 127646 [details]
FreeCAD-MSAA-8x-Texure-Bug.png

It show up as texture corruption with FreeCAD (MSAA 8x context)
and under LS2015 (wine-1.9.21~gallium_nine+staging / MSAA 2+).

/opt/mesa> git bisect good
81a95946dab730c1cfcf04ac1373cea5f7908f65 is the first bad commit
commit 81a95946dab730c1cfcf04ac1373cea5f7908f65
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Thu Oct 20 22:57:03 2016 +0200

    gallium/radeon: fold radeon_winsys::surface_best into radeon/winsys
    
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

:040000 040000 2f6cc85574d5748ddd083215bca3a47496d58f3d 097994b4a81f267d45346adea94746745bb0085f M src

git revert 81a9594

will NOT work.
Comment 1 Dieter Nützel 2016-10-31 18:35:44 UTC
Created attachment 127647 [details]
LS2015-Wine-nine-MSAA-2x+-Texure-Bug.png
Comment 2 Dieter Nützel 2016-11-03 03:08:54 UTC
Fix is underway.

Have a look at Mesa-dev:
https://lists.freedesktop.org/archives/mesa-dev/2016-November/134137.html

src/gallium/winsys/radeon/drm/radeon_drm_surface.c

-    if (!(surf_ws->flags & RADEON_SURF_IMPORTED)) {
+    if (!(flags & (RADEON_SURF_IMPORTED | RADEON_SURF_FMASK))) {

A combination of Marek's idea plus Michel's patch
[Mesa-dev] [PATCH 3/4] gallium/radeon: Use flags parameter in radeon_winsys_surface_init

SOLVED

both (FreeCAD and LS2015 on Wine) for me.
Comment 3 Marek Olšák 2016-11-05 17:37:33 UTC
The fix has been pushed to master. Please test and close the bug if it's fixed. Thanks.
Comment 4 Dieter Nützel 2016-11-05 19:08:51 UTC
Fixed by git commit in master.
Closing.

Thanks Marek!

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.