Bug 74863

Summary: [r600g] HyperZ broken on RV770 and CYPRESS (Left 4 Dead 2 trees corruption) bisected!
Product: Mesa Reporter: Benjamin Bellec <b.bellec>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: b.bellec, david
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 75112    
Attachments: tree correctly rendered
tree not correctly rendered one second later in the same scene

Description Benjamin Bellec 2014-02-11 22:54:26 UTC
Created attachment 93888 [details]
tree correctly rendered

Probably the same issue than:
https://bugs.freedesktop.org/show_bug.cgi?id=74803

Trees in Left 4 Dead 2 have some rendering issue when you move, so in fact they looks like to blink. See the screenshots attached.

This hits my RV770 (HD4850) and CYPRESS (HD5850).

When R600_DEBUG=nohyperz is set, there is no problem.
R600_DEBUG=nosb doesn't fix.

First bad commit is:
r600g: defer shader variant selection and depending state updates
commit a144bc29b5bb8322a54308603c5d0a8467448164
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Note that the bug happens in L4D2 only when the option "Effects details" in the graphic options of the game is set to Medium or High, but not when set to Low.
Comment 1 Benjamin Bellec 2014-02-11 22:55:28 UTC
Created attachment 93889 [details]
tree not correctly rendered one second later in the same scene
Comment 2 Benjamin Bellec 2014-02-11 23:00:08 UTC
I forgot to mention that I compiled mesa with:

./autogen.sh --with-gallium-drivers=r600 --with-dri-drivers= --enable-texture-float --disable-dri3 --disable-r600-llvm-compiler --disable-gallium-llvm --enable-32-bit CFLAGS="-O2 -m32" CXXFLAGS="-O2 -m32" --libdir=/usr/lib


The screenshots have been taken in the level "Dead Center" stage "2 - Street".
Comment 3 Marek Olšák 2014-09-01 20:36:49 UTC
Is this fixed with current Mesa git?

If not, could you please make and upload a trace file using apitrace:

https://github.com/apitrace/apitrace

Thanks.
Comment 4 Benjamin Bellec 2014-09-01 23:23:36 UTC
Problem still persists with current master (git-e8f8353). Tested on Evergreen.

The apitrace can be downloaded here :
https://drive.google.com/file/d/0B7D2Y0QXFND2bUlVc1JyMHZKVWc
(364 MB, md5sum 3e80394465612a7f29aced09ea02bd78)
Comment 5 smoki 2014-09-02 00:06:59 UTC
(In reply to comment #4)
> Problem still persists with current master (git-e8f8353). Tested on
> Evergreen.
> 
> The apitrace can be downloaded here :
> https://drive.google.com/file/d/0B7D2Y0QXFND2bUlVc1JyMHZKVWc
> (364 MB, md5sum 3e80394465612a7f29aced09ea02bd78)

 Just as info... can not reproduce it on radeonsi with this apitrace, seems like r600 only issue :).
Comment 6 Benjamin Bellec 2014-09-02 10:12:56 UTC
This is also not fixed on RV770.
Comment 7 Marek Olšák 2014-09-03 09:51:19 UTC
Fixed by 8abdc3c4a9c81e359d5dc1694253b05dd5562c95. Closing.

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.