Bug 91890 - [nve7] witcher2: blurry image & DATA_ERRORs (class 0xa097 mthd 0x2380/0x238c)
Summary: [nve7] witcher2: blurry image & DATA_ERRORs (class 0xa097 mthd 0x2380/0x238c)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-05 23:35 UTC by Marcin Slusarz
Modified: 2015-09-10 17:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Witcher2 on Nouveau (1.09 MB, image/png)
2015-09-05 23:35 UTC, Marcin Slusarz
Details
Witcher2 on Intel (1.41 MB, image/png)
2015-09-05 23:36 UTC, Marcin Slusarz
Details
cb management patch (6.82 KB, patch)
2015-09-06 05:43 UTC, Ilia Mirkin
Details | Splinter Review

Description Marcin Slusarz 2015-09-05 23:35:17 UTC
Created attachment 118091 [details]
Witcher2 on Nouveau

Witcher 2 looks blurry on nouveau and spams dmesg with a lot of:

[  390.489069] nouveau E[  PGRAPH][0000:01:00.0] DATA_ERROR [INVALID_BITFIELD] ch 5 [0x007f853000 witcher2[5663]] subc 0 class 0xa097 mthd 0x2380 data 0x00024000
[  390.489156] nouveau E[  PGRAPH][0000:01:00.0] DATA_ERROR [INVALID_BITFIELD] ch 5 [0x007f853000 witcher2[5663]] subc 0 class 0xa097 mthd 0x238c data 0x00010500

Screenshots comparing intel and nouveau attached.
Apitrace: http://people.freedesktop.org/~mslusarz/witcher2.trace.xz (130MB)
Comment 1 Marcin Slusarz 2015-09-05 23:36:35 UTC
Created attachment 118092 [details]
Witcher2 on Intel
Comment 2 Ilia Mirkin 2015-09-05 23:38:45 UTC
Hmmm... that's the CB_SIZE which is 64K max, aka 0x10000. Somehow it's trying to write to 0x24000 which is well past that. Should probably throw some asserts in to see where it's happening.

IIRC I fixed some issues with CB writes at some point, can you confirm that this happens on a semi-recent mesa? Preferably Mesa 11-rcN or git?
Comment 3 Marcin Slusarz 2015-09-05 23:42:23 UTC
This happens on mesa git (3c6c4d4f298ec81fe57992790a68aaab2e573519).
Comment 4 Ilia Mirkin 2015-09-06 05:43:26 UTC
Created attachment 118094 [details] [review]
cb management patch

This is a very preliminary patch, but in replaying the above trace, I get the same results as on intel (at least on the last frame). And at least with mesa 10.6.3, I do see the same blurriness as you did. (Fun, looks like it makes use of GL_DEPTH_BOUNDS_TEST_EXT, which wasn't available in 10.6.3.)

Please confirm that the included patch fixes the blurriness. It's a pile-o-hacks right now, but could definitely be cleaned up. I've been aware of this issue for a while, but didn't have a reason to fix until now.
Comment 5 Marcin Slusarz 2015-09-06 11:04:44 UTC
This patch resolves both blurriness and DATA_ERRORs. 
Thanks!
Comment 6 Ilia Mirkin 2015-09-10 17:42:54 UTC
Pushed out this commit:

commit e50c01d5af305e07110cb4a38d5a655437058f04
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Wed Sep 9 03:17:38 2015 -0400

    nvc0: keep track of cb bindings per buffer, use for upload settings


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.