Bug 35095

Summary: [r300g] HiZ broken in WoW
Product: Mesa Reporter: Chris Rankin <rankincj>
Component: Drivers/Gallium/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Deleted.

Description Chris Rankin 2011-03-07 14:09:06 UTC
There is now a large horizontal swathe of corruption across the middle of the entire screen. This corruption vanishes as soon as I stop exporting RADEON_HYPERZ.

This corruption appears with my M66GL (RV530 class) (but not with my RV350), and is very recent - probably since the most recent HyperZ patches. Basically, the corruption looks like lots of little tiles are missing from the picture.
Comment 1 Marek Olšák 2011-03-07 14:14:43 UTC
Hi Chris,

this is a known bug. Honestly I have no idea why the magic black line shows up. Please follow bug 33648 instead.

*** This bug has been marked as a duplicate of bug 33648 ***
Comment 2 Chris Rankin 2011-03-07 14:19:24 UTC
That tiny pencil-line of corruption in 33648 looks nothing like what I'm seeing.

WoW is looking more like someone has wiped away most of the tiles with a large paint brush. (Think: the width of the entire screen and one third of its height.)
Comment 3 Marek Olšák 2011-03-07 14:23:56 UTC
Could you post a screenshot?
Comment 4 Chris Rankin 2011-03-08 13:15:50 UTC
Created attachment 44249 [details]
Deleted.

This corruption only seems to happen when playing full-screen, which (unfortunately) means 1920x1200.
Comment 5 Chris Rankin 2011-03-08 13:21:00 UTC
Comment on attachment 44249 [details]
Deleted.

Deleted.
Comment 6 Marek Olšák 2011-03-08 14:25:28 UTC
Please enable HyperZ and try either of these:

RADEON_DEBUG=nozmask
RADEON_DEBUG=nohiz
Comment 7 Chris Rankin 2011-03-08 15:13:22 UTC
The git commit that does this to WoW is:

d99ec708afbb785ce05031661222b38c9447059f is the first bad commit
commit d99ec708afbb785ce05031661222b38c9447059f
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Feb 28 13:38:01 2011 +0100

    r300g: fix HiZ memory size computation and deciding when to use HiZ
    
    I removed the HiZ memory management, because the HiZ RAM is too small
    and I also did it in hope that HiZ will be enabled more often.
    
    This also sets aligned strides to HIZ_PITCH and ZMASK_PITCH.

:040000 040000 06b80f252cf7a052ef8be4dd098fd90de5d4a4e7 9dea1e6fda15ca3704c9324157a6e43c15140396 M	src
Comment 8 Chris Rankin 2011-03-08 15:24:28 UTC
(In reply to comment #6)
> Please enable HyperZ and try either of these:
> 
> RADEON_DEBUG=nozmask

This makes no difference.

> RADEON_DEBUG=nohiz

And this removes the corruption.
Comment 9 Marek Olšák 2011-05-14 18:40:57 UTC
Could you test the latest Mesa master branch? There are some new HiZ fixes.
Comment 10 Chris Rankin 2011-05-15 05:06:36 UTC
(In reply to comment #9)
> Could you test the latest Mesa master branch? There are some new HiZ fixes.

At best, those HiZ fixes didn't help. But I suspect the corrupt area on the login screen may actually be larger now.
Comment 11 Chris Rankin 2011-06-23 00:55:35 UTC
I've just retested WoW with HiZ enabled on my M66GL and the 2.6.39.1 kernel, and my dmesg log now fills up with these messages:

[drm:r100_cs_track_check] *ERROR* [drm] No buffer for z buffer !
[drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

RADEON_DEBUG=nohiz "fixes" it still.
Comment 12 Chris Rankin 2011-06-25 07:18:01 UTC
(In reply to comment #11)
> I've just retested WoW with HiZ enabled on my M66GL and the 2.6.39.1 kernel,
> and my dmesg log now fills up with these messages:
> 
> [drm:r100_cs_track_check] *ERROR* [drm] No buffer for z buffer !
> [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

This is no longer happening with 2.6.39.2 kernel and latest Mesa from git. Original corruption has been restored.
Comment 13 Marek Olšák 2012-12-02 06:13:13 UTC
Is this still an issue with current Mesa git?
Comment 14 Chris Rankin 2012-12-02 12:38:46 UTC
(In reply to comment #13)
> Is this still an issue with current Mesa git?

That's tricky: WoW has changed its login screen since I first reported this bug. And I'm going to need to upgrade to libdrm-2.4.40 in order to compile the latest Mesa anyway. (Fedora 17 only has 2.4.39).
Comment 15 Chris Rankin 2012-12-02 21:49:40 UTC
(In reply to comment #13)
> Is this still an issue with current Mesa git?

I've just tested WoW on my M66GL (RV535?) with the latest Mesa which has head:

commit 54ff536823bf5a431efe1f2becdb21174c146948
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 2 22:22:39 2012 +0100

    r300g: increment num_z_clears only if we have Hyper-Z

And it seems to work OK; no artifacts seen. Unfortunately, the new WoW login screen didn't have the problem that the previous one had anyway.
Comment 16 Marek Olšák 2012-12-02 22:00:27 UTC
Ok. I guess you can't try the old login screen anymore, so I'll just close this bug. You can re-opened it if you encounter the same issue.

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.